curl --request POST \
--url https://api.vidgo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "nano-banana-2-new",
"callback_url": "https://your-domain.com/callback",
"input": {
"prompt": "A cyberpunk street scene with neon signs and rain",
"size": "16:9",
"resolution": "2K"
}
}
'{
"code": 200,
"data": {
"task_id": "task-unified-1757165031-uyujaw3d",
"status": "not_started",
"created_time": "2025-11-12T10:30:00"
}
}{
"code": 400,
"error": {
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"code": 401,
"error": {
"message": "Unauthorized - Invalid API key",
"type": "authentication_error"
}
}Google
Nano Banana 2
Nano Banana 2 API 由 Gemini 3.1 Flash Image Preview 驱动,提供新一代 AI 图像生成。
POST
/
api
/
generate
/
submit
curl --request POST \
--url https://api.vidgo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "nano-banana-2-new",
"callback_url": "https://your-domain.com/callback",
"input": {
"prompt": "A cyberpunk street scene with neon signs and rain",
"size": "16:9",
"resolution": "2K"
}
}
'{
"code": 200,
"data": {
"task_id": "task-unified-1757165031-uyujaw3d",
"status": "not_started",
"created_time": "2025-11-12T10:30:00"
}
}{
"code": 400,
"error": {
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"code": 401,
"error": {
"message": "Unauthorized - Invalid API key",
"type": "authentication_error"
}
}- 提交后会返回
task_id。如果提供了callback_url,当任务状态变为finished或failed时,系统会向callback_url发送 POST 请求。 - 无论是否提供
callback_url,都可以通过统一的查询任务状态接口获取结果。
模型
- nano-banana-2-new - 文生图和图生图
- nano-banana-2-new-edit - 高级图像编辑
授权
所有 API 接口都需要 Bearer Token 认证
获取 API Key:
前往 仪表盘 → API 密钥 获取 API Key
将其添加到请求头:
Authorization: Bearer VIDGO_API_KEY
请求体
application/json