Create an image

Generates one image from a text prompt. If you still send model, it is ignored and does not return 400.

An image usually takes 1 to 2 minutes, so the call answers 202 with status: "queued" or "processing"; read the result with GET /v1/generations/{id} or receive it on webhookUrl. A job that finishes within about 20 seconds comes back 200. Send ?wait=false to always answer at once.

Pricing: A 1K image costs 45 credits (US$ 0.045). The price is held from the balance when the job is accepted (402 when the available balance cannot cover it and auto-recharge is off) and charged only when the image is delivered. Failed jobs cost nothing. Prompts blocked by content moderation are retried with new seeds up to 3 times; if every attempt is blocked the job ends in error with content_moderation: ... and nothing is charged.

PNG output. Images are kept for 7 days. GET /v1/generations/tiers lists sizes, pixel dimensions and prices.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Query Params
string
enum

false answers at once with the job queued

Allowed:
Body Params
string
required
length ≤ 4000

What to draw, up to 4,000 characters

string
enum
Defaults to 1K

Accepts only 1K or 2K. A value like 1024x1024 returns 400. Area of 1024x1024 or 2048x2048 spread over the aspect ratio

Allowed:
string
enum
Defaults to standard
Allowed:
string
enum
Defaults to 1:1
Allowed:
string
enum
Defaults to png
Allowed:
integer
0 to 2147483647

Random when omitted

uri

Public http/https URL. Receives POST { "data": { "id", "status" } } when the job ends, retried for about 7 hours 40 minutes (at least once; dedupe on id)

Responses

Language
Credentials
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json