curl --request POST \
--url https://openapi.imini.ai/imini/router/v1/images/generate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "google/nano-banana",
"prompt": "A cute shiba inu in a spacesuit standing on the moon, 3D cartoon style",
"aspect_ratio": "1:1",
"resolution": "1K"
}
'{
"task_id": "task_2041350318103396352",
"model": "google/nano-banana",
"created_at": "2026-04-07T03:00:17.062Z",
"request_id": "285f20ce-8158-401b-945c-7bc6a7ef6ead"
}{
"error": {
"code": "INVALID_PROMPT",
"message": "Prompt contains disallowed content",
"status": 400,
"request_id": "req_abc123"
}
}图像模型 API
Nano Banana
谷歌 Gemini 2.5 Flash 图像生成模型,速度快、成本低,支持文生图与图生图
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": "google/nano-banana",
"prompt": "A cute shiba inu in a spacesuit standing on the moon, 3D cartoon style",
"aspect_ratio": "1:1",
"resolution": "1K"
}
'{
"task_id": "task_2041350318103396352",
"model": "google/nano-banana",
"created_at": "2026-04-07T03:00:17.062Z",
"request_id": "285f20ce-8158-401b-945c-7bc6a7ef6ead"
}{
"error": {
"code": "INVALID_PROMPT",
"message": "Prompt contains disallowed content",
"status": 400,
"request_id": "req_abc123"
}
}授权
在请求 Header 中传入 Authorization: Bearer <YOUR_API_KEY>。前往 API Keys 管理页 创建和管理 API Key。
请求体
application/json
固定值 google/nano-banana
提示词,不超过 6000 字符。支持中英文,推荐使用细节丰富的描述以获得更好的生成效果。
示例:
"An orange cat napping under a cherry blossom tree, watercolor style, soft lighting"
参考图列表。不传或传空数组则为文生图模式;传入图像则进入图生图/风格参考模式。最多 3 张。
Maximum array length:
3Show child attributes
Show child attributes
输出宽高比,可选值:
1:1 2:3 3:2 3:4 4:3 4:5 5:4 9:16 16:9 21:9
传入参考图时若不指定该参数,模型会自动识别参考图比例并以此作为输出比例。
可用选项:
1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9 输出质量档位,当前仅支持 1K,传入其他值将被降级处理。
可用选项:
1K 
