curl --request POST \
--url https://openapi.imini.ai/imini/router/v1/images/generate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gpt-image-2.6-sunburst",
"prompt": "A watercolor illustration of a seaside city at sunrise.",
"resolution": "1K",
"aspect_ratio": "1:1",
"quality": "high"
}
'{
"task_id": "task_2041350318103396352",
"model": "gpt-image-2.6-sunburst",
"created_at": "2026-11-16T07:00:00.000Z",
"request_id": "task_2041350318103396352"
}{
"error": {
"code": "INVALID_PARAMETER",
"message": "Parameter value is out of range or has incorrect type",
"status": 400,
"request_id": "req_example"
}
}{
"error": {
"code": "INSUFFICIENT_CREDITS",
"message": "Insufficient credits. Upgrade your plan or purchase additional credits.",
"status": 402,
"request_id": "req_example"
}
}{
"error": {
"code": "PAYLOAD_TOO_LARGE",
"message": "Request payload exceeds the supported size",
"status": 413,
"request_id": "req_example"
}
}Image Models
GPT Image 2.6 Sunburst
PNG generation and editing, animated GIF, and SVG output.
POST
/
v1
/
images
/
generate
curl --request POST \
--url https://openapi.imini.ai/imini/router/v1/images/generate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gpt-image-2.6-sunburst",
"prompt": "A watercolor illustration of a seaside city at sunrise.",
"resolution": "1K",
"aspect_ratio": "1:1",
"quality": "high"
}
'{
"task_id": "task_2041350318103396352",
"model": "gpt-image-2.6-sunburst",
"created_at": "2026-11-16T07:00:00.000Z",
"request_id": "task_2041350318103396352"
}{
"error": {
"code": "INVALID_PARAMETER",
"message": "Parameter value is out of range or has incorrect type",
"status": 400,
"request_id": "req_example"
}
}{
"error": {
"code": "INSUFFICIENT_CREDITS",
"message": "Insufficient credits. Upgrade your plan or purchase additional credits.",
"status": 402,
"request_id": "req_example"
}
}{
"error": {
"code": "PAYLOAD_TOO_LARGE",
"message": "Request payload exceeds the supported size",
"status": 413,
"request_id": "req_example"
}
}Output format
output_format | Size parameters | References and restrictions |
|---|---|---|
png (default) | resolution, aspect_ratio | Accepts reference images. Only PNG uses background and the edit mask extra_params.mask. |
gif | extra_params.size, default 512x512 | Accepts reference images. Does not use resolution, aspect_ratio, background, or mask. |
svg | resolution, aspect_ratio, defaults 1K and 1:1 | Text-to-image only. Nonempty images returns 400. Does not use GIF size, background, or mask. |
frame_count and frame_duration_ms in extra_params:
frame_countdefaults to9.768x768supports 2–12 frames; other sizes support 2–16.frame_duration_msdefaults to200. Set 20–2000 ms in 10 ms increments.
aspect_ratio are billed initially by the first reference image. A higher output tier may cost more. Set resolution and a fixed ratio to lock the tier.
After submission, poll the task. See pricing.Authorizations
Bearer YOUR_API_KEY. Manage keys in API Keys.
Body
application/json

