Operation
Generate Image
Generate a still image with Cannon Studio's current image model stack and reference support.
Operation: image.generate
Submit via POST /api/v1/requests
Credits: dynamic
Seedream 4.5Seedream 5.0 LiteGrokNano BananaNano Banana 2Wan 2.7 ImageWan 2.7 Image ProFlux 2Flux 2 ProGPT Image 2
Request fields
promptmodelaspect_ratioqualityresolutionstylereference_image_urlsreference_prompt_balance
Example request
{
"operation": "image.generate",
"input": {
"prompt": "A lone detective in a rain-soaked alley under neon signage.",
"model": "gptimage2",
"aspect_ratio": "16:9",
"quality": "high",
"resolution": "4K",
"style": "moody neo-noir, glossy pavement, cinematic contrast",
"reference_image_urls": [
"https://example.com/reference-1.jpg"
]
}
}curl -X POST https://www.cannonstudio.app/api/v1/requests \
-H "Content-Type: application/json" \
-H "x-api-key: $CANNON_API_KEY" \
-H "x-idempotency-key: image-generate-001" \
-d @- <<'JSON'
{
"operation": "image.generate",
"input": {
"prompt": "A lone detective in a rain-soaked alley under neon signage.",
"model": "gptimage2",
"aspect_ratio": "16:9",
"quality": "high",
"resolution": "4K",
"style": "moody neo-noir, glossy pavement, cinematic contrast",
"reference_image_urls": [
"https://example.com/reference-1.jpg"
]
}
}
JSONNotes
- Uses the same image model stack as the Cannon Studio app.
- Supported models are currently Nano Banana, Nano Banana 2, Wan 2.7 Image, Wan 2.7 Image Pro, Flux 2, Flux 2 Pro, GPT Image 2, Seedream 4.5, Seedream 5.0 Lite, and Grok.
- GPT Image 2 accepts `resolution` values of `1K`, `2K`, or `4K`; square `1:1` outputs are capped below `4K`.
- The request object tracks the downstream image task until the final asset URL is ready.
Success output
{
"task_id": "img_123",
"asset_type": "image",
"status": "succeeded",
"image_url": "https://storage.googleapis.com/.../image.png",
"image_urls": [
"https://storage.googleapis.com/.../image.png"
],
"provider_image_urls": [
"https://tempfile.aiquickdraw.com/.../image.png"
],
"provider_image_count": 1,
"provider": "cannon",
"model": "seedream45",
"aspect_ratio": "16:9"
}