API reference · Images

Create images

One to four images from a prompt, with eleven models up to 4K. Returns a job straight away.

POST https://api.framera.ai/v1/images

From $0.007 an image, charged on success. See the image prices or get the exact price first with POST /v1/quotes. Needs the images permission.

Headers

Authorizationstringrequired
Bearer fr_live_….
Idempotency-Keystring
Any unique string up to 200 characters. Retrying with the same key returns the first job instead of making a second one. The SDKs set one for you.

Body

modelstringrequired
The image model, such as nano-banana-pro or z-image-turbo. See the model ids.
promptstringrequired
What the image shows. Up to 4,000 characters.
sizeenum
1k (default), 2k or 4k, as the model offers.
aspectRatioenum
1:1 (default), 4:3, 3:4, 16:9, 9:16, 3:2 or 2:3, as the model offers.
countinteger
1 (default) to 4 images, each charged. GET /v1/models lists each model's maxCount.
referencesstring[]
Up to 8 images to edit or to follow: people, products, styles. Each a public https URL or an upload_… id from POST /v1/uploads. For models with a maxReferences above 0, such as the Nano Banana models.
webhookUrlstring
A public https URL. We POST a signed job.succeeded, job.failed or job.cancelled event to it when the job finishes.
metadataobject
Up to 20 string values of your own (keys up to 40 characters, values up to 500), such as an order id. Returned on the job and in webhooks.

Returns

201 Created with a job object: status: "queued", the settings you sent and its price. Once it succeeds, outputs holds one image per count.

Errors

StatusCodeWhen
400invalid_requestA field is missing, wrong or out of range. The message says which; details.issues lists the fields.
401unauthorizedThe key is missing, wrong or revoked.
402insufficient_balanceYour balance is lower than the price. Top up or turn on auto-recharge.
403permission_deniedThe key lacks the permission, a monthly limit would be passed, or the address is not allowed. details.reason says which: key_permission, key_monthly_limit, monthly_limit or ip_not_allowed.
409idempotency_conflictThe Idempotency-Key was used with a different body, or the first request with it is still running.
422content_refusedThe request breaks the use rules. Nothing is charged.
429rate_limitedToo many requests. Retry after Retry-After seconds.
503model_pausedThe model is paused for a short while. Retry later.
500 or 503server_errorSomething went wrong on our side, or a service is briefly unavailable. Any hold is released at once.