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-flare",
"prompt": "晨光中的海边城市,水彩插画。",
"resolution": "1K",
"aspect_ratio": "1:1",
"quality": "high"
}
'{
"task_id": "task_2041350318103396352",
"model": "gpt-image-2.6-flare",
"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"
}
}图像模型 API
GPT Image 2.6 Flare
PNG 生成与编辑、GIF 动图和 SVG 输出。
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-flare",
"prompt": "晨光中的海边城市,水彩插画。",
"resolution": "1K",
"aspect_ratio": "1:1",
"quality": "high"
}
'{
"task_id": "task_2041350318103396352",
"model": "gpt-image-2.6-flare",
"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 | 尺寸参数 | 参考图与限制 |
|---|---|---|
png(默认) | resolution、aspect_ratio | 支持参考图;仅 PNG 使用 background 和图生图蒙版 extra_params.mask。 |
gif | extra_params.size,默认 512x512 | 支持参考图;不使用 resolution、aspect_ratio、背景或蒙版。 |
svg | resolution、aspect_ratio,默认 1K、1:1 | 仅文生图;非空 images 返回 400。不使用 GIF 尺寸、背景或蒙版。 |
extra_params 中设置 frame_count 和 frame_duration_ms:
frame_count默认9;768x768支持 2–12 帧,其他尺寸支持 2–16 帧。frame_duration_ms默认200;范围 20–2000 ms,步长 10 ms。
aspect_ratio 时按首图预扣;输出升档可能补扣差额。指定 resolution 和固定比例可锁定档位。
提交后查询任务状态。参见模型价格。授权
Bearer YOUR_API_KEY。在 API Keys 管理密钥。
请求体
application/json

