

Qwen Image 3.0 API Pricing and Setup Guide
Learn Qwen Image 3.0 API pricing, authentication, generation and editing parameters, asynchronous polling, retries, and production-ready integration patterns.
Qwen Image 3.0 combines text-to-image generation and reference-image editing in one asynchronous API. Through APIMart, you submit a task, poll its status, and retrieve one or more generated images when the task completes.
This guide covers the details that matter before integration: current Standard and Pro pricing, authentication, request parameters, response parsing, polling, retries, and output storage. For model capabilities and benchmark context, see the companion Qwen Image 3.0 release guide.
Qwen Image 3.0 Pricing and Access
APIMart offers two Qwen Image 3.0 model IDs:
qwen-image-3.0for Standard generationqwen-image-3.0-profor Pro generation
Pricing is per generated image rather than per input token. The following prices were listed on the APIMart pricing page on August 27, 2026 and may change over time.
Standard and Pro Price Comparison
| Model | Resolution | Approximate price per image | Approximate cost for 1,000 images |
|---|---|---|---|
| Qwen Image 3.0 Standard | 1K | $0.0205712 | $20.57 |
| Qwen Image 3.0 Standard | 2K | $0.0205712 | $20.57 |
| Qwen Image 3.0 Pro | 1K | $0.0285712 | $28.57 |
| Qwen Image 3.0 Pro | 2K | $0.0571432 | $57.14 |
For Standard, the listed 1K and 2K prices are currently the same. For Pro, 2K costs twice as much as 1K. Failed generations are refunded according to the Qwen Image 3.0 API documentation, while reference images do not add a separate generation charge.
Estimating a Real Workload
The basic estimate is:
monthly cost = completed images × price per image
Remember that n controls the number of outputs, so a request with n: 4 can bill four images. Prompt experiments, variations, and regenerated assets should all be included in the forecast.
Use Standard for most drafts and routine assets. Evaluate Pro when text rendering, composition, or fine detail justifies the higher price. If you choose Pro, use 1K during iteration and reserve 2K for approved high-resolution outputs.
Access and Authentication
Create an APIMart account, add sufficient balance, and generate an API key in the console. Keep the key in a server-side secret store or environment variable; never expose it in browser code or a NEXT_PUBLIC_* variable.
Base URL and Bearer Token
All examples in this guide use the following base URL:
https://api.apimart.ai/v1
Send the API key as a Bearer token:
Authorization: Bearer <your_api_key>
Content-Type: application/json
A missing or invalid key normally produces 401. Insufficient balance can produce 402, while rate limiting can produce 429. Log the response body and request context on the server, but redact the API key before storing logs.
Generation Requests and Async Workflow
Both generation and editing use POST /v1/images/generations. The API returns a task ID instead of waiting for the image to finish.
Core Request Parameters
| Field | Required | Description |
|---|---|---|
model | Yes | qwen-image-3.0 or qwen-image-3.0-pro |
prompt | Yes | Generation or editing instruction, up to about 4,500 tokens |
image_urls | Editing only | One to three HTTPS image URLs or supported base64 data URLs |
resolution | No | 1K or 2K |
size | No | Supported aspect ratio or custom dimensions |
n | No | Number of output images, from 1 to 6 |
prompt_extend | No | Whether APIMart should expand the prompt |
Custom dimensions must keep each edge between 512 and 2,048 pixels and the aspect ratio between 1:8 and 8:1. Reference images can use JPEG, PNG, BMP, TIFF, WebP, or GIF, with a documented limit of 10 MB per image. Check the generation reference before launch because parameter limits can evolve.
The official Qwen Image 3.0 announcement describes native text rendering across 12 languages. For text-heavy images, put the exact copy in quotation marks and test spelling, font style, and layout at the target resolution.
Text-to-Image Example
{
"model": "qwen-image-3.0",
"prompt": "A clean product banner with the exact text \"Summer Sale\", bold geometric typography, warm orange background",
"resolution": "1K",
"size": "16:9",
"n": 1,
"prompt_extend": true
}
Reference-Image Editing Example
Add image_urls when the request should transform or restyle an existing image:
{
"model": "qwen-image-3.0-pro",
"prompt": "Keep the product shape unchanged, replace the background with a softly lit studio scene",
"image_urls": [
"https://example.com/reference-product.png"
],
"resolution": "2K",
"n": 1
}
The reference URL must be reachable by the API. For private files, use a time-limited signed URL with enough validity for task submission and processing, or use a supported data URL when appropriate.
Asynchronous Task Workflow
The request flow has three stages:
- Submit a generation task with
POST /v1/images/generations. - Read
data[0].task_idfrom the response. - Poll
GET /v1/tasks/{task_id}until the task is completed or failed.
Submit Response
A successful submission has the following shape:
{
"code": 200,
"data": [
{
"status": "submitted",
"task_id": "task_example"
}
]
}
Do not read task_id from the top-level object. It is nested under the first item in data.
Polling and Completed Output
Poll every three to five seconds rather than sending a continuous stream of status requests. A completed task exposes generated files under data.result.images:
{
"code": 200,
"data": {
"status": "completed",
"result": {
"images": [
{
"url": [
"https://example-cdn.com/generated-image.png"
]
}
]
}
}
}
APIMart's current generation documentation says completed images are mirrored to its CDN for long-term availability. Even so, copy approved assets to storage you control when retention, deletion, access policy, or delivery performance matters.
Integration Examples
Python Integration
The following server-side example submits one task, polls it every three seconds, and stops after three minutes:
import os
import time
import requests
API_KEY = os.environ["QWEN_API_KEY"]
BASE_URL = "https://api.apimart.ai/v1"
HEADERS = {"Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json"}
def generate_image(prompt: str) -> str:
response = requests.post(
f"{BASE_URL}/images/generations",
headers=HEADERS,
json={"model": "qwen-image-3.0", "prompt": prompt, "resolution": "1K", "n": 1, "prompt_extend": True},
timeout=30,
)
response.raise_for_status()
task_id = response.json()["data"][0]["task_id"]
deadline = time.monotonic() + 180
while time.monotonic() < deadline:
poll = requests.get(f"{BASE_URL}/tasks/{task_id}", headers=HEADERS, timeout=30)
poll.raise_for_status()
task = poll.json()["data"]
if task["status"] == "completed":
return task["result"]["images"][0]["url"][0]
if task["status"] == "failed":
raise RuntimeError(task.get("fail_reason", "Generation failed"))
time.sleep(3)
raise TimeoutError(f"Task {task_id} did not finish within 180 seconds")
In an application, persist the task ID before polling. If the worker restarts, another worker can resume from the saved task instead of submitting and paying for a duplicate generation.
JavaScript Integration
Run this code only in a trusted server environment:
const apiKey = process.env.QWEN_API_KEY;
const baseUrl = "https://api.apimart.ai/v1";
const headers = { Authorization: `Bearer ${apiKey}`, "Content-Type": "application/json" };
async function requestJson(url, options = {}) {
const response = await fetch(url, { ...options, headers });
const payload = await response.json();
if (!response.ok) throw new Error(`APIMart ${response.status}: ${JSON.stringify(payload)}`);
return payload;
}
async function generateImage(prompt) {
const submission = await requestJson(`${baseUrl}/images/generations`, {
method: "POST",
body: JSON.stringify({
model: "qwen-image-3.0", prompt, resolution: "1K", n: 1, prompt_extend: true,
}),
});
const taskId = submission.data[0].task_id;
const deadline = Date.now() + 180_000;
while (Date.now() < deadline) {
await new Promise((resolve) => setTimeout(resolve, 3000));
const { data: task } = await requestJson(`${baseUrl}/tasks/${taskId}`);
if (task.status === "completed") return task.result.images[0].url[0];
if (task.status === "failed") throw new Error(task.fail_reason ?? "Generation failed");
}
throw new Error(`Task ${taskId} did not finish within 180 seconds`);
}
For a quick manual test, the same submit-and-poll flow works with cURL:
curl -X POST https://api.apimart.ai/v1/images/generations \
-H "Authorization: Bearer <your_api_key>" \
-H "Content-Type: application/json" \
-d '{"model":"qwen-image-3.0","prompt":"A minimalist product photograph","resolution":"1K","n":1}'
curl https://api.apimart.ai/v1/tasks/<task_id> \
-H "Authorization: Bearer <your_api_key>"
Production Integration Checklist
An API call that works once is only the start. A reliable image pipeline also needs bounded retries, durable task state, observability, and controlled storage.
Errors and Retry Policy
| Response | Meaning | Recommended action |
|---|---|---|
400 | Invalid parameters | Fix the payload; do not retry unchanged input |
401 | Invalid or missing API key | Fix server-side credentials |
402 | Insufficient balance | Add balance before retrying |
429 | Rate limit reached | Retry with exponential backoff and jitter |
5xx | Temporary service failure | Retry a limited number of times with backoff |
Do not blindly resubmit a generation after an ambiguous network timeout. If the server accepted the original request, a second submission can create a duplicate task and an extra charge. Persist every returned task ID and separate submission retries from polling retries.
Launch Checklist
- Keep the API key in a server-only secret.
- Validate
prompt,resolution,size,n, and reference images before submission. - Persist the task ID and current state.
- Poll every three to five seconds with an application-level timeout.
- Add exponential backoff with jitter for
429and retryable5xxresponses. - Limit concurrency according to observed rate limits and latency.
- Track completed, failed, timed-out, and duplicate tasks separately.
- Copy approved outputs to your own storage when you need explicit retention control.
- Recheck the live Qwen Image 3.0 model page, pricing page, and API documentation before production release.
Generate Images with Qwen Image 3.0
Use APIMart's unified API to test Standard and Pro, compare 1K and 2K output, and move your image workflow from prototype to production.
Explore Qwen Image 3.0Frequently Asked Questions
How long should I poll before timing out?
APIMart recommends polling every three to five seconds and suggests a client timeout of about three minutes. Treat that as a starting point: measure real latency, choose a timeout for your product, and keep the task ID so timed-out tasks can be reconciled later.
Do Qwen Image 3.0 result URLs expire after 24 hours?
The current APIMart generation documentation says outputs are mirrored to its CDN and remain available long-term, so the earlier 24-hour claim does not apply to this integration. Store business-critical assets in infrastructure you control rather than relying on an undocumented retention guarantee.
Can I send a base64 reference image?
Yes. The current API documentation accepts one to three public HTTP or HTTPS URLs or supported base64 data URLs in image_urls. Each reference image must stay within the documented format and 10 MB limits.
When should I choose 1K or 2K?
Use 1K for fast iteration and assets that do not require maximum detail. Choose 2K for final images with dense text, fine edges, or large display sizes. Standard currently lists the same price for both resolutions, while Pro 2K costs more than Pro 1K, so evaluate latency, image quality, and cost together.
Choose the model you want in the model marketplace
Try chat, image and video models in the APIMart model marketplace, and experience model capabilities quickly with one unified API.