API Reference

Banana Nano Pro API

REST API for AI image and video generation. The same endpoints that power the Banana Nano Pro studio are available for programmatic access.

Coming soon: Public API keys with per-key rate limiting and usage dashboards. Currently, the API is used internally by the web studio. Sign up to be notified when public access launches.

Base URL

https://banananano2pro.com

Authentication

All API requests require an authenticated session. The web studio handles this automatically via Better Auth session cookies. Public API key authentication is on the roadmap.

// Future: Bearer token auth
Authorization: Bearer bnp_your_api_key

Credits

Each API call consumes credits from your account balance. Credits are deducted server-side before the generation starts and refunded automatically if the generation fails. See pricing for credit costs per model.

Endpoints

POST/api/image/fal/generate

Generate Image

Generate an AI image from a text prompt or source image. Supports text-to-image, image-to-image, and style transfer workflows. Returns a URL to the generated image.

Parameters

NameTypeRequiredDescription
promptstringYesText description of the desired image
modelstringYesModel ID (e.g., 'flux-pro', 'seedream-4.5', 'gpt-image-1.5')
imageUrlstringNoSource image URL for image-to-image or style transfer
aspectRatiostringNoOutput aspect ratio (e.g., '1:1', '16:9', '9:16')

Response

{ "imageUrl": "https://fal.media/files/...", "seed": 12345 }
POST/api/video/fal/generate

Generate Video

Generate an AI video from a text prompt, source image, or reference video. Supports text-to-video, image-to-video, video extend, and lip sync workflows.

Parameters

NameTypeRequiredDescription
promptstringYesText description of the desired video
modelstringYesModel ID (e.g., 'kling-1.6', 'minimax-video', 'wan-2.1')
imageUrlstringNoSource image for image-to-video generation
durationnumberNoVideo duration in seconds (model-dependent, typically 5-10s)

Response

{ "videoUrl": "https://fal.media/files/...", "duration": 5 }
POST/api/image/fal/upscale

Upscale Image

Upscale an image to higher resolution using AI super-resolution. Supports 2x and 4x scaling with detail enhancement.

Parameters

NameTypeRequiredDescription
imageUrlstringYesURL of the image to upscale
scalenumberNoScale factor: 2 or 4 (default: 2)

Response

{ "imageUrl": "https://fal.media/files/...", "width": 4096, "height": 4096 }
POST/api/image/fal/remove-bg

Remove Background

Remove the background from an image using AI segmentation. Returns a transparent PNG suitable for compositing.

Parameters

NameTypeRequiredDescription
imageUrlstringYesURL of the image to process

Response

{ "imageUrl": "https://fal.media/files/..." }

Available Models

Image Models

  • Flux Pro / Dev / Schnell
  • Seedream 4.0 / 4.5
  • GPT Image 1.5
  • Flux Kontext
  • Recraft V3
  • Ideogram V3

Video Models

  • Kling 1.6 Pro
  • MiniMax Video
  • Wan 2.1
  • Sora 2
  • Veo 3.1
  • Seedance 1.5 Pro
  • LTX Video

Rate Limits

Rate limits are based on your subscription tier:

PlanRequests/minConcurrent jobs
Free51
Basic ($4.90/mo)153
Standard ($9.90/mo)305
Pro ($39.90/mo)6010

Start building with AI

10 free credits on signup. Try every model and endpoint.