Media

Image generation

Text and reference to image across every image model.

POST/api/image-generate

Models (credit cost in parentheses):

  • Nano Banana 2 Lite — nano-banana-2-lite (500 cr flat) — fastest / cheapest tier. 1K native. Accepts up to 10 image_input references. No upscale.
  • Nano Banana 2.1 — nano-banana-2 (1,000 cr flat; the id is unchanged, the model behind it is now 2.1) — fast general-purpose image model. 1K native. Accepts up to 10 image_input references. No upscale.
  • Meta AI — meta (1,500 cr flat) — text-to-image and image-to-image. Aspects 1:1 / 9:16 / 16:9 only. Uses named components character_image / scene_image / style_image (any one switches it into i2i) instead of image_input; a single image_input entry is mapped onto character_image.
  • Meta Muse — meta-muse (2,000 cr flat) — text-to-image, or image-to-image with up to 14 image_input references, used in the order given. Ten aspects: 16:9, 9:16, 1:1, 4:3, 3:4, 3:2, 2:3, 5:4, 4:5, 21:9. An aspect ratio outside that list is a 400 before any charge. One image per request, no upscale.
  • Nano Banana Pro — nano-banana-pro (3,500 cr flat, reduced from 5,000) — premium quality. 1K native. Accepts up to 10 image_input references; supports an optional upscale via resolution: "2K" or "4K" at the same price.
  • Google Pics — google-pics (1,000 cr flat) — Google's image model. Text-to-image, or image-to-image with up to 14 image_input references. Ten aspects: 16:9, 9:16, 1:1, 4:3, 3:4, 3:2, 2:3, 5:4, 4:5, 21:9. One image per request, logo removed, no upscale.
  • Grok Image — grok-image (1,000 cr) — xAI Grok. Text-to-image and image-to-image; supply up to 5 image_input references and Grok auto-switches into i2i mode. Native aspects: 1:1, 9:16, 16:9, 2:3, 3:2, 4:3, 21:9, 5:2.
  • GPT Image 2 — gpt-image-2 (15,000 cr flat, replacing the old 4,500-80,000 mode × resolution matrix) — OpenAI GPT Image 2. Photorealistic with strong text rendering. Supports nine aspect ratios (1:1, 9:16, 16:9, 3:4, 4:3, 2:3, 3:2, 21:9, 4:5). Output is capped at ~1.57 MP and follows the aspect ratio — there is no 2K/4K tier and no upscale, so resolution is ignored. Accepts up to 5 positional image_input references (no @tag binding). Model-specific controls: quality, prompt_mode, reasoning, web_search (see the table below) — these change the output, not the price.

All listed prices are final — there is no surcharge or fallback markup. Failures are refunded automatically.

Monthly plans do not apply here. Image Max and Veo Max make covered models free in the dashboard only. An API-key request is always billed in credits, and never consumes a plan's daily allowance.

Rate limit: 10 requests / minute per user on POST /api/image-generate. Exceeding it returns 429 Too Many Requests with a Retry-After header and a limit_per_minute field.

Concurrency limit: at most 3 image generations in flight per user at any moment. A 4th request while 3 are already processing returns 429 Too Many Requests — wait for one to finish before retrying.

Nano Banana Pro quota (per user, rolling windows — applies ONLY to nano-banana-pro):

  • Daily — 300 images.
  • Weekly — 6,000 images.
  • Monthly — 30,000 images.

nano-banana-2 (Nano Banana 2.1) is unmetered — no per-window cap. Only nano-banana-pro consumes the budget. Hitting any window returns 429 Too Many Requests with a quota_window field (daily / weekly / monthly) and a resets_at ISO timestamp. Check your current usage via GET /api/image-generate/quota.

GET/api/image-generate/quota

Returns the caller's current Nano Banana Pro usage:

JSON
{
  "models": ["nano-banana-pro"],
  "limits": { "daily": 300, "weekly": 6000, "monthly": 30000 },
  "usage": {
    "daily":   { "used": 12,  "limit": 300,   "remaining": 288,   "resetsAt": "..." },
    "weekly":  { "used": 87,  "limit": 6000,  "remaining": 5913,  "resetsAt": "..." },
    "monthly": { "used": 342, "limit": 30000, "remaining": 29658, "resetsAt": "..." }
  }
}
FieldTypeRequiredDescription
promptstringyesImage description (max 2,000 chars).
modelstringyesOne of the model IDs above.
aspect_ratiostringnoModel-dependent. Nano Banana family: 1:1 / 9:16 / 16:9 / 3:4 / 4:3. Grok: adds 2:3 / 3:2 / 21:9 / 5:2, drops 3:4. Meta: 1:1 / 9:16 / 16:9 only. GPT Image 2: all nine (adds 21:9 / 4:5). Google Pics and Meta Muse: the ten listed above. Default when omitted: 4:3 (Meta falls back to 16:9). A value outside the global list (1:1, 4:3, 3:4, 16:9, 9:16, 21:9, 2:3, 3:2, 4:5, 5:2, 5:4) becomes 4:3. Pick a ratio from the chosen model's own list.
resolutionstringnoOnly meaningful as Nano Banana Pro's upscale tier — pass "2K" or "4K" (same price as native). Every other model is 1K native and ignores it.
qualitystringnoGPT Image 2 only. low / medium / high (default high). Affects output only — the price is flat.
prompt_modestringnoGPT Image 2 only. auto (default — the model refines your prompt) / direct (used verbatim).
reasoningstringnoGPT Image 2 only. none (default) / low / medium / high / xhigh / max. Higher follows the prompt more closely but is slower.
web_searchbooleannoGPT Image 2 only. true grounds the generation with a web search first. Default false.
image_inputstring[]noReference images (base64 data URIs or http(s) URLs). Per-model limits: Google Pics 14 / Meta Muse 14 / Nano Banana family 10 / Grok 5 / GPT Image 2 5. Every reference within the limit is used. Use http(s) URLs for large sets; the request body is capped at 4.5 MB. Meta uses the named component fields instead.
reference_imagesstring[]noAlias of image_input.
cURL
curl -X POST "https://www.dubvoice.ai/api/image-generate" \
  -H "Authorization: Bearer sk_..." \
  -H "Content-Type: application/json" \
  -d '{ "prompt": "A futuristic city skyline at sunset", "model": "nano-banana-2" }'

Most requests finish synchronously and return { "success": true, "image_url": "...", "credits_used": 1000, "remaining_credits": ... }. A long-running one returns HTTP 202 { "success": true, "status": "processing", "job_id": "...", "credits_used": ... }; poll it with the endpoint below. image_url is a URL on our storage (or an /api/image-proxy?t=... fallback path on https://www.dubvoice.ai).

GET/api/image-generate/status?job_id=<job_id>

Poll long-running image tasks. Returns { "status": "processing" }, then { "status": "completed", "image_url": "..." } or { "status": "failed", "error": "..." }.

Search docs

Find a page or an endpoint