Image generator
Create image
Queue an AI image generation job and poll until complete.
POST
Creates an image generation job. Credits are deducted when the job is queued. Poll Poll generation status with the returned
generation.id until status is COMPLETED or FAILED.
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer uns_live_* API key or Clerk JWT |
Idempotency-Key | No | Max 128 chars. Replays the same response for 24h on API key requests |
Content-Type | Yes | application/json |
Request body
Text prompt for the image.
Model key. Default:
nano-banana-2.model | Display name | resolution values | aspectRatio |
|---|---|---|---|
nano-banana-2 | Google Nano Banana 2 | 1k, 2k, 4k | auto, 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 4:5, 5:4, 21:9, 1:4, 4:1, 1:8, 8:1 |
nano-banana-pro | Google Nano Banana Pro | 1k, 2k, 4k | 1:1, 2:3, 3:4, 4:5, 3:2, 4:3, 5:4, 16:9, 21:9 |
seedream-v5-lite | ByteDance Seedream v5.0 Lite | basic, high (quality) | 1:1, 4:3, 3:4, 16:9, 9:16, 2:3, 3:2, 21:9 |
gpt-image-1.5 | OpenAI GPT-Image 1.5 | 1024x1024, 1024x1536, 1536x1024 (use as resolution) | — |
gpt-image-2 | OpenAI GPT Image 2 | 1k, 2k, 4k | auto, 1:1, 9:16, 16:9, 4:3, 3:4 |
Aspect ratio. Must be allowed for the chosen
model. Default: auto (where supported).Output size or quality tier. Must match the chosen
model (see table above). Default: 2k for most models.Reference image URLs (public HTTPS). Use for style or subject guidance. Max count depends on model (up to 14–16).
Enable NSFW filtering when supported by the provider pipeline.
Async completion
Poll Poll generation status withgeneration.id until status is COMPLETED or FAILED. Webhooks are not supported on the public API.
Response
Example
Errors
| HTTP | When |
|---|---|
400 | Missing/invalid prompt, model, ratio, resolution, or too many reference images |
401 | Invalid auth |
402 | Insufficient credits |
404 | User not found |
429 | Rate limit exceeded |
500 | Server error |
Authorizations
Clerk session JWT or Unsora API key (uns_live_*)
Headers
Optional. Replays the original response for 24h when using an API key.
Maximum string length:
128Body
application/json
Text prompt for the image
Model key: nano-banana-2, nano-banana-pro, seedream-v5-lite, gpt-image-1.5, gpt-image-2
Aspect ratio; allowed values depend on model
Output size or quality; allowed values depend on model
Reference image URLs; max count depends on model

