curl --request POST \
--url https://openapi.imini.ai/imini/router/v1/images/generate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "nano-banana-2.1",
"prompt": "晨光中的海边城市,水彩插画。",
"resolution": "1K",
"aspect_ratio": "1:1"
}
'{
"task_id": "task_2041350318103396352",
"model": "nano-banana-2.1",
"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
Nano Banana 2.1
文生图与参考图编辑。
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": "nano-banana-2.1",
"prompt": "晨光中的海边城市,水彩插画。",
"resolution": "1K",
"aspect_ratio": "1:1"
}
'{
"task_id": "task_2041350318103396352",
"model": "nano-banana-2.1",
"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"
}
}授权
Bearer YOUR_API_KEY。在 API Keys 管理密钥。
请求体
application/json

