Image generation.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | A model ID in the IMAGE category |
prompt | string | Yes | 1–4000 characters |
n | integer | No | Number of images to generate, 1–10 (default 1) |
size | string | No | 256x256 · 512x512 · 1024x1024 (default) · 1792x1024 · 1024x1792 · 1536x1024 · 1024x1536 · auto |
quality | string | No | standard (default) · hd · low · medium · high · auto — mapped or ignored depending on the backend |
response_format | string | No | url (default) · b64_json |
user | string | No | End-user identifier |
Some models have a lower limit on n (see the Imagen model notes).
For the image models you can use, check GET /v1/models for entries whose category is IMAGE.
Request
{
"model": "<IMAGE model ID from GET /v1/models>",
"prompt": "a beautiful sunset over mountains",
"n": 1
}Response
{
"created": 1709884800,
"data": [
{ "url": "https://..." }
]
}url is a presigned URL valid for 10 minutes. To keep an image longer, download and store it yourself.
Once it expires you can re-issue one through GET /v1/outputs/{requestId} for up to 24 hours.