Authorization: Bearer or x-api-key) and governed by the same
per-client rate limits as every other /v1 route. Requests are synchronous —
multi-image or high-quality generations can take tens of seconds, so set client timeouts
accordingly.
Request parameters
Response
The response follows the OpenAI images shape —created (unix seconds), a
data array with one entry per generated image, and an optional
usage object on token-priced models:
- With
response_format: "url"(the default), each image is stored by the gateway and returned as a signed download URL valid for ~24 hours — download promptly and persist on your side. - With
response_format: "b64_json", each entry carries the base64-encoded PNG bytes inline instead. revised_promptappears when the provider rewrites your prompt before generating.
Models & pricing
Token-based models report token counts in the response
usage object. Every
request’s cost is metered against your key exactly like chat traffic and counts toward
the same spend caps. The fal-served models accept n (1–4 for nano-banana-2) and
size as "WxH" (256–4096 per side, at most 2048x2048 pixels).
Image editing
POST /v1/images/edits edits existing images: send model, a prompt
describing the change, and images — one to nine public HTTPS URLs. The
response is a job (202, { id, status }); poll GET /v1/images/edits/{id}
until status is succeeded and read the output URL from result. Editing
is billed per output image at the provider’s list price (plus a per-input
fee where the provider charges one).
All image-editing models are served by fal in the United States.
Qwen Image 3. The
qwen-image-3.0 family is served by Alibaba Cloud
Model Studio and is China-hosted under the gateway’s provider-jurisdiction
labeling — organizations must have the China-hosted model opt-in enabled to
use it, same as the Qwen chat models. These models accept only n and
size of the optional parameters (quality, style, and other
provider-specific fields are ignored), and qwen-image-3.0-pro carries a
low upstream rate limit (5 requests / minute) — expect 429s under parallel
load and retry with backoff.Reliability. Upstream image backends occasionally stall with a 503 for a
few minutes. There is deliberately no automatic fallback to a different
image model — silently swapping models would change output style and quality — so callers
should retry instead. The SDKs already retry 503s with jittered backoff
up to their configured retry budget.
Using the SDKs
All five SDKs ship an image-generation helper as of SDK v0.4.0, with the same auth, error mapping (401 →AccessDeniedException, 402 →
ServiceQuotaExceededException, 429 → ThrottlingException), and
retry policy as Converse:
invalid_request_error for a
malformed body, 401 invalid_api_key, 402 usage_cap_exceeded when
a spend cap is reached (never retried), and 429 rate_limit_exceeded with a
Retry-After header. See Errors & retries for the
full exception mapping in each SDK.