BobaBanana API

Rate limits, quotas and size limits of the BobaBanana API

The BobaBanana API limits each key to 200 jobs per rolling 24 hours and 10 unfinished jobs by default, caps request and file sizes, and answers 429 with a Retry-After header when a limit is reached. Every number on this page is read from the server code when the docs are built.

View as Markdown

At a glance

Per key
200 jobs per 24 hours, 10 unfinished (defaults)
Per workspace
5 live keys, 1000 live uploads, 2 URL downloads at once
Request body
JSON up to 100 MB, uploads up to 64 MB
Files
images 25 MB, audio 60 MB, inline base64 about 25 MB
When reached
429 (or 413, 400, 507) with a stable code
Retry
wait for Retry-After seconds

Per-key limits#

Per-key limits
Limit Default Highest When reached
Jobs per rolling 24 hours 200 5000 429 daily_limit_reached
Unfinished jobs at once 10 50 429 too_many_active_jobs

A workspace owner sets both for each key in Settings → API keys. A deleted job still counts toward the 24-hour limit. A request with dry_run: true is not counted and is not refused by these two limits.

Per-workspace limits#

Per-workspace limits
Limit Value When reached
Live API keys 5 by default Revoke a key to make a new one
Live uploads (POST /v1/files) 1000 429 too_many_files
URL inputs downloading at once 2 429 too_many_downloads
Steps waiting in the queue set per workspace 429 queue_full
Storage 5 GB by default 507 storage_quota_exceeded

An upload no job uses is deleted after 24 hours; one a job uses is kept with the job.

Request and file size limits#

Request and file size limits
What Limit When over
JSON request body 100 MB 413 too_large
POST /v1/files request 64 MB 413 too_large
Image file 25 MB; pictures are scaled to at most 2048 px on the long side 400 file_too_large
Audio file 60 MB 400 file_too_large
Inline base64 data about 25 MB of file 400 file_too_large
Motion clip (motion_video) 50 MB, 1 to 15 s 400 file_too_large or invalid_video
Clip to extend (extend_video) 100 MB, up to 15 s 400 file_too_large or invalid_video
Reference pictures per request 10 (a character asset counts as two) 400 too_many_references
URL input length 2000 characters 422 invalid_request
URL download time 30 s for all URL inputs of a request 400 fetch_timeout
metadata 16 keys, keys 40 and values 500 characters 400 invalid_metadata
Idempotency-Key 255 characters, kept 24 hours 400 invalid_request

Text fields have their own lengths, listed in each reference page: for example a prompt up to 1500 characters and a script up to 600.

Failed-key throttling#

30 requests with a wrong key from one address within 5 minutes switch that address to 429 too_many_attempts until the window ends. Retry-After says how many seconds are left. A valid key is not affected by other addresses' failures.

Retry-After values#

These codes carry a Retry-After header, with the number of seconds the server sends:

Retry-After values
Code Status Retry-After (seconds)
idempotency_in_progress 409 5
webhook_pending 409 60
daily_limit_reached 429 3600
network_busy 429 5
too_many_active_jobs 429 30
too_many_attempts 429 set by the server each time; read the header
too_many_downloads 429 10
too_many_files 429 3600
engine_unavailable 503 300
maintenance 503 set by the server each time; read the header

How to stay under the limits#

  1. Wait with ?wait=30 instead of polling in a tight loop; one long-poll replaces many polls.
  2. Keep fewer than 10 jobs unfinished per key; queue the rest on your side.
  3. Upload a file once and reuse its file_id instead of sending the same base64 in every request.
  4. Delete uploads and jobs you no longer need, to stay under the upload count and storage.
  5. Honour Retry-After on every 429 and 503; retrying sooner only gets refused again.
  6. Use one key per app or agent, so each gets its own job limits.
  7. Price with dry_run: true: it does not count toward the job limits.

Frequently asked questions#

Is there a requests-per-second limit?#

There is no fixed requests-per-second limit on reads. Jobs are limited per key (200 per 24 hours and 10 unfinished by default), URL downloads per workspace, and wrong keys per address.

Can the per-key limits be raised?#

Yes, up to 5000 jobs per 24 hours and 50 unfinished jobs. A workspace owner changes them for each key in Settings → API keys.

Why was my request refused with 413?#

The body was larger than 100 MB (JSON) or 64 MB (an upload). Give large files as a url, or upload them first with POST /v1/files.

Do canceled or failed jobs count toward the daily limit?#

A job counts once it has been accepted, whatever happens to it later, and deleting it does not undo that. Requests refused before a job is made do not count.

Last updated · View as Markdown · llms.txt