curl --request POST \
--url https://api.apimart.ai/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "qwen-image-3.0",
"prompt": "A cafe poster with the title Autumn Limited, warm tones, refined layout",
"size": "16:9",
"resolution": "1K"
}'
import requests
url = "https://api.apimart.ai/v1/images/generations"
payload = {
"model": "qwen-image-3.0",
"prompt": "A cafe poster with the title Autumn Limited, warm tones, refined layout",
"size": "16:9",
"resolution": "1K",
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json",
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
const url = "https://api.apimart.ai/v1/images/generations";
const payload = {
model: "qwen-image-3.0",
prompt: "A cafe poster with the title Autumn Limited, warm tones, refined layout",
size: "16:9",
resolution: "1K",
};
const headers = {
Authorization: "Bearer <token>",
"Content-Type": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
body: JSON.stringify(payload),
})
.then((response) => response.json())
.then((data) => console.log(data))
.catch((error) => console.error("Error:", error));
{
"code": 200,
"data": [
{
"status": "submitted",
"task_id": "task_01JGXYZ1234567890ABCDEF"
}
]
}
{
"error": {
"code": 400,
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}
{
"error": {
"code": 401,
"message": "Authentication failed, please check your API key",
"type": "authentication_error"
}
}
{
"error": {
"code": 402,
"message": "Insufficient account balance, please top up and try again",
"type": "payment_required"
}
}
{
"error": {
"code": 429,
"message": "Too many requests, please try again later",
"type": "rate_limit_error"
}
}
Qwen Image 3.0
Qwen Image 3.0 Image Generation
- Asynchronous processing mode, returns a task ID for subsequent queries
- Supports text-to-image and image-to-image (1-3 reference images for editing)
- Supports 1K / 2K resolution, up to 6 images per request
- Standard and Pro variants (Pro is stronger for dense layout and text)
POST
/
v1
/
images
/
generations
curl --request POST \
--url https://api.apimart.ai/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "qwen-image-3.0",
"prompt": "A cafe poster with the title Autumn Limited, warm tones, refined layout",
"size": "16:9",
"resolution": "1K"
}'
import requests
url = "https://api.apimart.ai/v1/images/generations"
payload = {
"model": "qwen-image-3.0",
"prompt": "A cafe poster with the title Autumn Limited, warm tones, refined layout",
"size": "16:9",
"resolution": "1K",
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json",
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
const url = "https://api.apimart.ai/v1/images/generations";
const payload = {
model: "qwen-image-3.0",
prompt: "A cafe poster with the title Autumn Limited, warm tones, refined layout",
size: "16:9",
resolution: "1K",
};
const headers = {
Authorization: "Bearer <token>",
"Content-Type": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
body: JSON.stringify(payload),
})
.then((response) => response.json())
.then((data) => console.log(data))
.catch((error) => console.error("Error:", error));
{
"code": 200,
"data": [
{
"status": "submitted",
"task_id": "task_01JGXYZ1234567890ABCDEF"
}
]
}
{
"error": {
"code": 400,
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}
{
"error": {
"code": 401,
"message": "Authentication failed, please check your API key",
"type": "authentication_error"
}
}
{
"error": {
"code": 402,
"message": "Insufficient account balance, please top up and try again",
"type": "payment_required"
}
}
{
"error": {
"code": 429,
"message": "Too many requests, please try again later",
"type": "rate_limit_error"
}
}
curl --request POST \
--url https://api.apimart.ai/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "qwen-image-3.0",
"prompt": "A cafe poster with the title Autumn Limited, warm tones, refined layout",
"size": "16:9",
"resolution": "1K"
}'
import requests
url = "https://api.apimart.ai/v1/images/generations"
payload = {
"model": "qwen-image-3.0",
"prompt": "A cafe poster with the title Autumn Limited, warm tones, refined layout",
"size": "16:9",
"resolution": "1K",
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json",
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
const url = "https://api.apimart.ai/v1/images/generations";
const payload = {
model: "qwen-image-3.0",
prompt: "A cafe poster with the title Autumn Limited, warm tones, refined layout",
size: "16:9",
resolution: "1K",
};
const headers = {
Authorization: "Bearer <token>",
"Content-Type": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
body: JSON.stringify(payload),
})
.then((response) => response.json())
.then((data) => console.log(data))
.catch((error) => console.error("Error:", error));
{
"code": 200,
"data": [
{
"status": "submitted",
"task_id": "task_01JGXYZ1234567890ABCDEF"
}
]
}
{
"error": {
"code": 400,
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}
{
"error": {
"code": 401,
"message": "Authentication failed, please check your API key",
"type": "authentication_error"
}
}
{
"error": {
"code": 402,
"message": "Insufficient account balance, please top up and try again",
"type": "payment_required"
}
}
{
"error": {
"code": 429,
"message": "Too many requests, please try again later",
"type": "rate_limit_error"
}
}
Supported Models
| Model | Description | Max images | Resolution |
|---|---|---|---|
qwen-image-3.0 | Clear instruction following, stable text rendering; better value for general use | 6 | 1K / 2K |
qwen-image-3.0-pro | Richer content; best for newspapers, storyboards, menus, exams, dense layout | 6 | 1K / 2K |
Prefer
-pro for dense text/layout. Use qwen-image-3.0 for general images. Prompt max ~4.5k tokens. Model names are not interchangeable with the 2.0 series.Authorizations
string
required
All endpoints require Bearer Token authenticationGet your API Key from the API Key Management Page:
Authorization: Bearer YOUR_API_KEY
Body
string
required
Model name
qwen-image-3.0- Standardqwen-image-3.0-pro- Pro (dense text / layout)
boolean
default:"false"
Whether to run content moderation before submitting the image task.
true: useomni-moderation-latestto review prompts and input imagesfalseor omitted: do not send a moderation request, adding no moderation cost or latency (default)
string
required
Text description for image generation, max ~4.5k tokens
string[]
Reference image URL array (image-to-image / editing), 1-3 images
- Public
http(s)://URL ordata:image/png;base64,...(base64 is re-uploaded first) - Formats: JPG / JPEG / PNG / BMP / TIFF / WEBP / GIF
- Per file ≤ 10MB; width/height recommended 384-2048 px
string
default:"1K"
Resolution tier (affects billing tier)
1K(default; lowercase accepted)2K
size (e.g. 1600x900). With raw pixels, area > 2.25M pixels bills as 2K.string
default:"1:1"
Aspect ratio, or explicit pixel sizeSupported ratios:
1:1(default)4:3/3:416:9/9:163:2/2:3
16x9 style, or pixels like 1024x1024. For custom pixels, each edge (width and height) must be 512–2048, aspect ratio 1:8 ~ 8:1.If neither size nor resolution is set, output is fixed at 1024×1024.integer
default:"1"
Number of images, 1-6. Values above 6 are clamped to 6.
string
Negative prompt: content to avoid
boolean
default:"false"
Intelligent prompt rewritingDefaults to off for predictable results. Set to
true to enable intelligent rewriting.string
Rewrite mode (3.0 series only; requires
prompt_extend: true)direct- works for text-to-image and image-to-imageagent- text-to-image only, more aggressive rewrite
Size Reference Table
Combineresolution (tier) + size (ratio):
| Resolution | 1:1 | 4:3 | 3:4 | 16:9 | 9:16 | 3:2 | 2:3 |
|---|---|---|---|---|---|---|---|
| 1K | 1024×1024 | 1152×864 | 864×1152 | 1280×720 | 720×1280 | 1248×832 | 832×1248 |
| 2K | 2048×2048 | 2048×1536 | 1536×2048 | 2048×1152 | 1152×2048 | 2048×1360 | 1360×2048 |
Use Cases
Text-to-image (multiple)
{
"model": "qwen-image-3.0",
"prompt": "Flat illustration of a city skyline at dusk, warm orange tones",
"size": "16:9",
"resolution": "1K",
"n": 4
}
Dense layout with rewrite
{
"model": "qwen-image-3.0-pro",
"prompt": "A Western restaurant menu with appetizers, mains, and desserts columns, five dishes each with prices, serif font, cream background",
"size": "3:4",
"resolution": "2K",
"prompt_extend": true,
"prompt_extend_mode": "agent"
}
Image-to-image (edit)
{
"model": "qwen-image-3.0-pro",
"prompt": "Change the sign text to Open, keep everything else the same",
"image_urls": ["https://example.com/shop.jpg"],
"size": "1:1"
}
Negative prompt
{
"model": "qwen-image-3.0",
"prompt": "Photorealistic mountain cabin in morning mist",
"negative_prompt": "text, watermark, people, low resolution",
"size": "3:2"
}
Limits
| Item | Limit |
|---|---|
| Prompt | ≤ 4.5k tokens |
| Output size | Custom pixels: each edge 512–2048; aspect 1:8 ~ 8:1 |
| Image count | 1-6 (excess clamped) |
| Reference images | 1-3 |
| Reference formats | JPG / JPEG / PNG / BMP / TIFF / WEBP / GIF |
| Reference size | ≤ 10MB; width/height recommended 384-2048 px |
Response
integer
Status code; 200 on success
array
Differences from 2.0
| 2.0 series | 3.0 series | |
|---|---|---|
| Prompt length | Shorter | ~4.5k tokens |
prompt_extend_mode | Not supported | direct / agent |
| Resolution | 1K / 2K | 1K / 2K (Pro 2K costs more) |
| Reference images | Supported | 1-3 images |
Notes
- Async: Submit returns a
task_id. Poll Get Task Status every 3~5 seconds; client timeout ~3 minutes (2K + multi-image is slower). - Storage: Generated images are mirrored to the platform CDN and remain available long-term.
- Billing: Per delivered image × resolution tier by actual pixel area (> 2.25M pixels = 2K).
qwen-image-3.0charges the same for 1K/2K;-pro2K is 2× 1K. Failures are fully refunded; reference images are free. - Errors: Custom
sizeedge outside 512–2048, invalid ratio,agenton image-to-image, unreachable/oversized references → 400; rate limit → 429.
Query resultsUse Get Task Status for progress and
result.images.