Qwen and Wan image models use the image generation endpoint with an input.messages payload. Use the same request shape for qwen-image-2.0, qwen-image-2.0-pro, wan2.7-image, and wan2.7-image-pro; choose model-specific options inside parameters.
curl --location --request POST "https://api.getopenmodels.com/v1/images" \--header "Authorization: Bearer $OM_API_KEY" \--header "Content-Type: application/json" \--data-raw '{"model": "qwen-image-2.0-pro","route": { "provider": "<provider-for-this-model>" },"route_mode": "balanced","input": {"messages": [{"role": "user","content": [{"text": "Create a high-quality ecommerce poster for a white ceramic coffee cup, clean layout, realistic lighting, clear Chinese and English typography."}]}]},"parameters": {"n": 1,"watermark": false,"size": "2048*2048","negative_prompt": "low resolution, blurry text, distorted hands, cluttered composition","prompt_extend": true}}'
For Wan models, use the same payload shape and switch to Wan-specific parameter values:
curl --location --request POST "https://api.getopenmodels.com/v1/images" \--header "Authorization: Bearer $OM_API_KEY" \--header "Content-Type: application/json" \--data-raw '{"model": "wan2.7-image-pro","route": { "provider": "<provider-for-this-model>" },"route_mode": "balanced","input": {"messages": [{"role": "user","content": [{"text": "A cinematic product photo of a premium black ceramic coffee cup on a marble table, soft side lighting, luxury ecommerce style."}]}]},"parameters": {"n": 1,"watermark": false,"size": "2K","thinking_mode": true}}'
For Qwen and Wan image models, set output options inside parameters.
| Field | Type | Notes |
|---|---|---|
model | string | Supported values: qwen-image-2.0, qwen-image-2.0-pro, wan2.7-image, wan2.7-image-pro. |
input.messages | array | Required. Use a single user message with content parts. |
input.messages[].content[].text | string | Required for text-to-image prompts. Qwen 2.0 prompts support up to 1300 tokens; Wan prompts support up to 5000 characters. |
input.messages[].content[].image | string | Optional image input for image editing or reference-image workflows when the selected model route supports image input. Use a public image URL or a base64 Data URL. |
parameters.n | integer | Number of images. Qwen 2.0 currently requires 1; Wan supports 1-4 when group generation is off, and 1-12 when enable_sequential is true. |
parameters.size | string | Output size. Qwen 2.0 uses explicit pixel sizes such as 2048*2048, 2688*1536, or 1536*2688. Wan supports 1K and 2K; wan2.7-image-pro also supports 4K for text-to-image. Wan also accepts custom WIDTH*HEIGHT values within its pixel limits. |
parameters.watermark | boolean | Whether to add a watermark. Default: false. |
parameters.seed | integer | Optional random seed in the range [0, 2147483647]. A fixed seed improves reproducibility but does not guarantee identical results. |
parameters.negative_prompt | string | Qwen-only negative prompt, used to describe content to avoid. |
parameters.prompt_extend | boolean | Qwen-only prompt optimization switch. Default: true. |
parameters.enable_sequential | boolean | Wan-only group generation switch. Default: false. |
parameters.thinking_mode | boolean | Wan-only quality mode. Default: true; only applies when group generation is off. |
parameters.color_palette | array | Wan-only color theme control. Provide 3-10 color objects with hex and ratio; all ratios must sum to 100.00%. |