Nano Banana AI Image Generator
POST /api/v1/nano-banana-ai-image-generator/submit
prompt is required.
Required inputs
promptstring- Text prompt describing the image to generate (max 20000 chars). For an unspecified character or figurine, use an original non-branded character with no logos and no resemblance to existing copyrighted superheroes; preserve any character the user explicitly names.
Edit the sample inputs for your own task before submitting.
# Set VIDMAGE_IDEMPOTENCY_KEY to a unique value for this task; preserve it for transport retries.
curl -X POST "https://vidmage.ai/api/v1/nano-banana-ai-image-generator/submit" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Idempotency-Key: ${VIDMAGE_IDEMPOTENCY_KEY}" \
-H "Content-Type: application/json" \
-d '{"prompt":"A playful corgi working as a barista in a bright modern cafe, detailed commercial illustration","aspectRatio":"3:4"}'
# -> { "success": true, "taskId": "...", "creditsConsumed": ... }Parameters and input rules4 fields
| Field | Type | Required | Default | Meaning and limits |
|---|---|---|---|---|
prompt | string | Yes | Not specified | Text prompt describing the image to generate (max 20000 chars). For an unspecified character or figurine, use an original non-branded character with no logos and no resemblance to existing copyrighted superheroes; preserve any character the user explicitly names. Minimum length: 1 · Maximum length: 20000 |
imageUrl | string | No | Not specified | Optional input image URL. When provided, the task runs in image edit mode. No additional field constraint listed. |
imageUrls | string[] | No | Not specified | Ordered input image URLs for image editing mode. The prompt can reference them by their one-based order. Minimum items: 1 · Maximum items: 5 |
aspectRatio | string | No | "3:4" | Output aspect ratio. Values: "auto", "1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3", "5:4", "4:5", "21:9" · Default: "3:4" |
Mode-specific fields & media limits
Text To Image rules
| Control | Mode-specific rule |
|---|---|
prompt | Required; minimum 1 characters; maximum 20000 characters |
aspectRatio | Values: "auto", "1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3", "5:4", "4:5", "21:9"; mode default: "3:4" |
Image Edit rules
| Control | Mode-specific rule |
|---|---|
prompt | Required; minimum 1 characters; maximum 20000 characters |
aspectRatio | Values: "auto", "1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3", "5:4", "4:5", "21:9"; mode default: "auto" |
imageUrls | Image input; up to 5 items |
Retrieve the result
Save taskId from the accepted submission and send it to this endpoint:
POST /api/v1/nano-banana-ai-image-generator/query
Use the same Bearer API key. On completion, read the imageUrl result field.
curl -X POST "https://vidmage.ai/api/v1/nano-banana-ai-image-generator/query" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "taskId": "TASK_ID_FROM_SUBMIT" }'
# -> { "success": true, "data": { "status": "...", "imageUrl": "https://..." } }