Qwen 3.0 Image Generator API documentation
Generate images with Qwen 3.0 Image Generator (Alibaba Qwen). Supports both text and image input modes.
Endpoints
| Contract item | Value |
|---|---|
| Capability | qwen-3-0-image-generator |
| Submit | POST https://vidmage.ai/api/v1/qwen-3-0-image-generator/submit |
| Query | POST https://vidmage.ai/api/v1/qwen-3-0-image-generator/query |
| Task identifier | taskId |
| Result field | imageUrl |
Authenticate with Authorization: Bearer YOUR_API_KEY. Save the task identifier and query the same capability. Use a stable Idempotency-Key for submission retries.
Product guide: Qwen Image API
Parameters and input rules
| Field | Type | Required | Default | Meaning and limits |
|---|---|---|---|---|
prompt | string | Yes | Not specified | Text prompt describing the image to generate (max 3000 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 characters: 1Maximum characters: 3000 |
imageUrl | string | No | Not specified | Optional input image URL. When provided, the task runs in image edit mode. |
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: 1Maximum items: 3 |
negativePrompt | string | No | Not specified | Describe content that should not appear in the image. Maximum characters: 600 |
size | string | No | Not specified | Exact output dimensions; leave unset to let Qwen choose automatically. Values: "1024*1024", "1600*1600", "768*1152", "1280*1920", "1152*768", "1920*1280", "768*1024", "1536*2048", "1024*768", "1792*1344", "576*1024", "1152*2048", "1024*576", "2048*1152" |
imageNum | string | No | "1" | Number of images to generate. Values: "1", "2", "3", "4", "5", "6" |
promptExtend | boolean | No | true | Rewrite and enrich the prompt automatically. |
promptExtendMode | string | No | "direct" | Choose direct prompt rewriting or agent-based planning. Values: "direct", "agent" |
enableThinking | boolean | No | true | Use deeper reasoning during prompt expansion. |
seed | integer | No | Not specified | Random seed; leave unset for a random result. Minimum: 0Maximum: 2147483647Multiple of: 1 |
text to image
These are public VidMage field names. The server maps them to provider fields. Input media selects the mode; use its limits together with the parameter table.
| Control | Mode-specific rule |
|---|---|
prompt | Required; 1–3000 characters. |
aspectRatio | Not used in this mode. |
resolution | Not used in this mode. |
negativePrompt | Describe content that should not appear in the image. Maximum characters: 600 |
size | Exact output dimensions; leave unset to let Qwen choose automatically. Values: "1024*1024", "1600*1600", "768*1152", "1280*1920", "1152*768", "1920*1280", "768*1024", "1536*2048", "1024*768", "1792*1344", "576*1024", "1152*2048", "1024*576", "2048*1152" |
imageNum | Number of images to generate. Values: "1", "2", "3", "4", "5", "6"Default: "1" |
promptExtend | Rewrite and enrich the prompt automatically. Default: true |
promptExtendMode | Choose direct prompt rewriting or agent-based planning. Values: "direct", "agent"Default: "direct" |
enableThinking | Use deeper reasoning during prompt expansion. Default: true |
seed | Random seed; leave unset for a random result. Minimum: 0Maximum: 2147483647Multiple of: 1 |
image edit
These are public VidMage field names. The server maps them to provider fields. Input media selects the mode; use its limits together with the parameter table.
| Control | Mode-specific rule |
|---|---|
prompt | Required; 1–3000 characters. |
aspectRatio | Not used in this mode. |
resolution | Not used in this mode. |
imageUrls | Up to 3 files. Maximum 10 MB per file. Formats: jpg, jpeg, png, webp, bmp. Minimum short edge: 384 px. |
negativePrompt | Describe content that should not appear in the edited image. Maximum characters: 600 |
size | Exact output dimensions; leave unset to let Qwen choose automatically. Values: "1024*1024", "1600*1600", "768*1152", "1280*1920", "1152*768", "1920*1280", "768*1024", "1536*2048", "1024*768", "1792*1344", "576*1024", "1152*2048", "1024*576", "2048*1152" |
imageNum | Number of edited images to generate. Values: "1", "2", "3", "4", "5", "6"Default: "1" |
promptExtend | Rewrite and enrich the edit instruction automatically. Default: true |
promptExtendMode | Choose direct prompt rewriting or agent-based planning. Values: "direct", "agent"Default: "direct" |
enableThinking | Use deeper reasoning during prompt expansion. Default: true |
seed | Random seed; leave unset for a random result. Minimum: 0Maximum: 2147483647Multiple of: 1 |
Example request
{
"prompt": "A bilingual design-festival poster with precise Chinese and English typography, bold geometric composition, and premium print texture",
"imageNum": "1",
"promptExtend": true,
"promptExtendMode": "direct",
"enableThinking": true
}# Set VIDMAGE_IDEMPOTENCY_KEY to a unique value for this task; preserve it for transport retries.
curl -X POST "https://vidmage.ai/api/v1/qwen-3-0-image-generator/submit" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Idempotency-Key: ${VIDMAGE_IDEMPOTENCY_KEY}" \
-H "Content-Type: application/json" \
-d '{"prompt":"A bilingual design-festival poster with precise Chinese and English typography, bold geometric composition, and premium print texture","imageNum":"1","promptExtend":true,"promptExtendMode":"direct","enableThinking":true}'
# -> { "success": true, "taskId": "...", "creditsConsumed": ... }Task results and recovery
URL of the generated image. Read imageUrl from the completed query response. Preserve taskId while the task is running.
curl -X POST "https://vidmage.ai/api/v1/qwen-3-0-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://..." } }Submission and task queries report the available task and usage information. A timeout is not a confirmed failure. Recover the existing task instead of resubmitting.
For face selection and error recovery, follow Task lifecycle. MCP uses the normalized taskId argument in get_task_result, including capabilities whose REST identifier is requestId.
Credits
| Component / option | Rate | Minimum |
|---|---|---|
| Base rate | 10 credits / generation | — |
Base charge is per generation at the selected resolution.
imageNum multiplies the base charge by the selected output count.
Each reference image adds 1 credit.
Use the Playground or the MCP credit estimator for your exact inputs. Credits and billing.
