OpenAI-Compatible Image Generations
Generate images with Seedream, Wan, and gpt-image-2 via the standard POST /v1/images/generations endpoint. OpenAI-compatible request shape; Seedream routes require a minimum image size of 3,686,400 pixels (e.g., 1920×1920).
POST /v1/images/generations endpoint. As of July 28, 2026 it serves seedream-5-0-260128, wan2.7-image, wan2.7-image-pro, and gpt-image-2. The older seedream-4-5-251128 route is reached through Image Generation via Chat instead.
Routing at a glance
Supported models
Size constraint ⚠️ (Seedream routes)
Seedream’s upstream enforces a minimum of 3,686,400 pixels. Requests below that are rejected with:width × height ≥ 3,686,400.
Request
Request fields
Response
modelechoed at the rootdata[].size— actual dimensions of each returned imageusage— includesgenerated_images(drives billing), plusoutput_tokens/total_tokensfor token accounting
Common 4xx causes
400 InvalidParameter — image size must be at least 3686400 pixels—sizewas too small. Use1920x1920or larger.404 openai_error— you passed a model that isn’t routed through this endpoint (e.g.,wan2.7-image). Use the chat-based route instead.400 invalid_request— malformedsizestring (e.g.,1024instead of1024x1024).
Related
Image Generation via Chat
/v1/chat/completions route for the Wan 2.7 family.Gemini generateContent
Media Gen skill
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Image generation model. seedream-5-0-260128 ($0.035/request), wan2.7-image ($0.030/request), wan2.7-image-pro ($0.075/request), or gpt-image-2 ($0.03/request or $0.05 per 1024×1024 image).
seedream-5-0-260128, wan2.7-image, wan2.7-image-pro, gpt-image-2 Text description of the image to generate.
Number of images to generate. Each image is billed separately at the per-image rate.
x >= 1Image dimensions as WIDTHxHEIGHT. Seedream routes require width × height ≥ 3,686,400 (e.g. 1920x1920, 2048x2048); Wan and gpt-image-2 accept smaller sizes such as 1024x1024.
"2048x2048"