curl --request POST \
--url https://api.maxapi.io/api/v1/task/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "nano-banana-pro",
"callBackUrl": "https://example.com/webhook",
"input": {
"prompt": "将这张图片转换为油画风格",
"ratio": "16:9",
"resolution": "2k",
"imageUrls": ["https://example.com/input.jpg"]
}
}'
curl --request POST \
--url https://api.maxapi.io/api/v1/task/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "nano-banana-pro",
"callBackUrl": "https://example.com/webhook",
"input": {
"prompt": "将背景改为日落海滩场景",
"ratio": "1:1",
"resolution": "2k",
"imageUrls": ["https://example.com/portrait.jpg"]
}
}'
{
"code": 0,
"msg": "ok",
"data": {
"taskId": "c3d4e5f6-a7b8-9012-cdef-234567890abc"
}
}
Nano Banana 图片
图片转换图片
Nano Banana 图片转换图片 — 使用 AI 转换现有图片
POST
/
api
/
v1
/
task
/
submit
curl --request POST \
--url https://api.maxapi.io/api/v1/task/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "nano-banana-pro",
"callBackUrl": "https://example.com/webhook",
"input": {
"prompt": "将这张图片转换为油画风格",
"ratio": "16:9",
"resolution": "2k",
"imageUrls": ["https://example.com/input.jpg"]
}
}'
curl --request POST \
--url https://api.maxapi.io/api/v1/task/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "nano-banana-pro",
"callBackUrl": "https://example.com/webhook",
"input": {
"prompt": "将背景改为日落海滩场景",
"ratio": "1:1",
"resolution": "2k",
"imageUrls": ["https://example.com/portrait.jpg"]
}
}'
{
"code": 0,
"msg": "ok",
"data": {
"taskId": "c3d4e5f6-a7b8-9012-cdef-234567890abc"
}
}
使用 Nano Banana 基于文本提示词转换现有图片。支持风格迁移、修改或创意编辑。
可用模型
nano-banana · nano-banana-2 · nano-banana-pro
模型名称,如
nano-banana、nano-banana-2、nano-banana-pro。Webhook 回调地址。
curl --request POST \
--url https://api.maxapi.io/api/v1/task/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "nano-banana-pro",
"callBackUrl": "https://example.com/webhook",
"input": {
"prompt": "将这张图片转换为油画风格",
"ratio": "16:9",
"resolution": "2k",
"imageUrls": ["https://example.com/input.jpg"]
}
}'
curl --request POST \
--url https://api.maxapi.io/api/v1/task/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "nano-banana-pro",
"callBackUrl": "https://example.com/webhook",
"input": {
"prompt": "将背景改为日落海滩场景",
"ratio": "1:1",
"resolution": "2k",
"imageUrls": ["https://example.com/portrait.jpg"]
}
}'
{
"code": 0,
"msg": "ok",
"data": {
"taskId": "c3d4e5f6-a7b8-9012-cdef-234567890abc"
}
}
查询结果
{
"code": 0,
"msg": "ok",
"data": {
"taskId": "c3d4e5f6-a7b8-9012-cdef-234567890abc",
"status": "SUCCESS",
"input": {
"model": "nano-banana-pro",
"prompt": "将这张图片转换为油画风格",
"ratio": "16:9",
"resolution": "2k",
"imageUrls": ["https://example.com/input.jpg"]
},
"result": {
"type": "image",
"urls": [
"https://example.com/output/image-c3d4e5f6.png"
]
},
"created_at": "2026-02-12T12:00:00.000000Z",
"updated_at": "2026-02-12T12:00:18.000000Z"
}
}
输入图片要求:
- 格式:JPEG、PNG、WebP
- 必须是公网可访问的 HTTPS 地址
- 建议大小:< 10MB
- 输出宽高比和分辨率与输入图片无关
⌘I