Generate images
POST /v1/images/generations — submit an asynchronous generation task.
POST /v1/images/generations
Submit a generation task; it returns a task_id immediately (generation is asynchronous). Then poll via Query tasks, or receive a terminal-state Webhook.
Image-to-image / reference images use this same endpoint — just pass source images via image_urls; there is no separate edit endpoint.
Paste your own sk- key to confirm your public API access is wired up correctly.
⚠ This makes a real API call with your key and consumes credits.
🔒 Your key is used only for this call and is never saved — it clears when you refresh.
Get a key in the console →Request parameters
| Field | Type | Required | Description |
|---|---|---|---|
prompt | string | Yes | The prompt |
model | string | No | Currently gpt-image-2 (more models coming soon) |
size | string | No | Aspect ratio (not pixels), e.g. 16:9 / 1:1 / 9:16 |
resolution | string | No | Quality tier: 1K / 2K / 4K |
n | integer | No | Number of images, default 1 |
image_urls | string[] | No | Reference / source image URLs, up to 15 |
webhook | string | No | Callback base URL; the platform POSTs to <webhook>/callback on terminal states only (see Webhook) |
language | string | No | Error-message language (zh / en / ko / ja) |
Field names follow the Jiufeng gateway: quality is resolution (not upscale), reference images are image_urls, and size is an aspect ratio, not a pixel dimension.
Examples
Response
Once you have the task_id:
- poll Query tasks, or
- if you passed a
webhook, wait for the terminal-state callback.