GuidesHow to Use Qwen Image Generation in Claude Code and Cursor?
Makernice Team · ·
Prices as of November 12, 2026 (price list v15).
Key takeaways
- Qwen3 Image, Alibaba's image model, can be used from Cursor and Claude Code through the Makernice MCP server.
- Qwen3 Image accepts negative_prompt and prompt_expansion, so an agent can exclude unwanted elements and keep a prompt exactly as written.
- Edits with Qwen3 Image take up to 3 reference images and are billed per output image, at a rate separate from text-to-image.
- Every request is quoted with estimate_cost first, and generate refuses any job priced above the max_cost_usd you approved.
Qwen3 Image, the Qwen image generation model from Alibaba, runs from Cursor and Claude Code when the Makernice MCP server is connected. The agent gets a price from estimate_cost, shows it to you and uses generate only after you agree. At price list v15 (November 12, 2026) a 1k image from text is $0.0236.
How do I generate Qwen3 Image pictures through an MCP server?
Qwen3 Image is reached through the Makernice MCP server, which each editor needs added a single time. In Cursor, follow the Cursor walkthrough: the Add to Cursor button writes the entry to ~/.cursor/mcp.json, and the sign-in next to makernice in MCP settings links your account. In Claude Code, follow the Claude Code walkthrough: run its claude mcp add --transport http --scope user makernice command, then /mcp inside Claude Code to sign in.
The connection carries limits of its own: a cap per job and, optionally, per day. The get_balance tool shows them together with available_usd and spent_today_usd.
Claude and ChatGPT chat
Qwen3 Image also runs outside coding agents, through the same server. In Claude, add it under Customize → Connectors → Add custom connector and sign in to Makernice; on Team and Enterprise plans an owner adds the connector first in Organization settings → Connectors. The Claude connect page has the URL to paste. In ChatGPT on the web, add it from Plugins as a custom MCP server with OAuth, using the separate ChatGPT address on the ChatGPT connect page; your plan or workspace has to allow custom MCP servers. From there a Qwen3 Image request runs the way it does in Claude Code and Cursor: estimate_cost prices it without holding that price, generate refuses a quote above your max_cost_usd, and check_job hands back the image.
Walkthrough: a 2k poster
You: Design a tall poster for a rooftop jazz night with the title in big block letters. Keep the text clean. What does a 2k version cost?
Cursor writes the request, adds a negative prompt for messy lettering and asks for a quote:
{
"name": "estimate_cost",
"arguments": {
"input": {
"model": "qwen3-image",
"mode": "t2i",
"prompt": "Poster for a summer jazz night on a rooftop: a saxophone silhouette against a coral sunset, the words JAZZ ON THE ROOF in bold block letters at the top",
"resolution": "2k",
"aspect_ratio": "2:3",
"negative_prompt": "blurry text, extra letters, watermark"
}
}
}Cursor: One 2k image from Qwen3 Image is $0.0236 at price list v15. That's an estimate only. Generate it?
You: Yes, go.
{
"name": "generate",
"arguments": {
"input": {
"model": "qwen3-image",
"mode": "t2i",
"prompt": "Poster for a summer jazz night on a rooftop: a saxophone silhouette against a coral sunset, the words JAZZ ON THE ROOF in bold block letters at the top",
"resolution": "2k",
"aspect_ratio": "2:3",
"negative_prompt": "blurry text, extra letters, watermark"
},
"max_cost_usd": "0.023658",
"request_id": "rooftop-jazz-poster-2k"
}
}On this call Makernice quotes the input afresh. If the result is above max_cost_usd or the connection's per-job cap, nothing is created; if not, the job starts, costs exactly that quote and a job_id is returned. A retried call with the same request_id and unchanged input returns the same job, which protects you from double charges when a response goes missing.
Without wait_s, check_job answers right away with the current status, which is handy for an agent juggling several jobs:
{
"name": "check_job",
"arguments": {
"job_id": "gen_..."
}
}When the status is succeeded, the image is linked at outputs[0].url. The link is signed and lasts 24 hours; any later check_job call gives a new one, and console_url leads to the run in your console. You can also have an account webhook notified when MCP jobs finish.
Negative prompts and prompt expansion
Qwen3 Image takes two prompt options next to the usual size fields, listed here with the values it accepts.
negative_prompt: a short list of things to keep out of the picture, such as watermarks or extra letters. It sits next topromptin the input.prompt_expansion: off keeps your wording exactly as sent; balanced lets the model elaborate on a short prompt before rendering.resolution: 1k or 2k (1k by default). Each tier has its own per-image rate; the 2k text-to-image rate is quoted above.aspect_ratio: 1:1, 3:2, 2:3, 4:3, 3:4, 16:9, 9:16, 21:9.
When a poster or sign has to carry exact wording, set prompt_expansion to off so the text in the agent's prompt reaches the model unchanged. The full specification is on the Qwen3 Image model page.
How do I edit images with Qwen3 Image, and does it support inpainting?
Qwen3 Image edits run in image-to-image mode: set mode to i2i, send 1 to 3 public https links in reference_images, and write the change in prompt. JPEG, PNG and WebP files up to 10 MB are accepted, but a local path won't reach the model. The request has no mask field, so inpainting a painted area is not supported; name the part of the picture to change in the prompt instead. The price is per output image: $0.0329 at 1k, regardless of how many references you attach. Here the agent prices a quick revision of the poster it just made:
{
"name": "estimate_cost",
"arguments": {
"input": {
"model": "qwen3-image",
"mode": "i2i",
"prompt": "Change the date line on the poster to FRIDAY 8PM and make the sky deep violet",
"reference_images": ["https://example.com/posters/rooftop-jazz-v1.png"],
"resolution": "1k",
"prompt_expansion": "off"
}
}
}Why did my Qwen3 Image generation fail, and is the failed task charged?
A Qwen3 Image call can be refused before any job exists or fail after the job starts, and Makernice charges neither; the one exception is a finished image that output moderation blocks. Makernice refuses over MCP with a plain sentence and leaves no job or charge behind. In the table, column one is the internal refusal name and column two is how the message the agent receives begins.
| Refusal | What the tool returns | What to do |
|---|---|---|
invalid_request | "Invalid parameters" | The message names the field; for Qwen3 Image a frequent one is more than 3 reference images |
price_exceeds_max_cost | "which exceeds max_cost_usd" | The request moved to 2k or into edit mode after approval; get a new estimate |
task_not_found | "Job not found. Check the job_id returned by generate." | The agent passed a wrong or truncated job_id; use the one from the generate reply |
insufficient_balance | "Insufficient balance for this job. Nothing was charged." | Add balance and call again with the same request_id |
If a job starts and then fails, for example because moderation rejects a reference image, check_job returns status failed with an error object and billing released, and the hold goes back to your balance. An image that output moderation blocks after it is made is still charged; the rules are on failed generations.
Why is my Qwen3 Image job stuck in the queue, and how long should it take?
Makernice doesn't publish a typical render time for Qwen3 Image, but check_job reports the stage a job is in: queued, generating, checking or moderating while it runs, then succeeded or failed. A job in moderating has finished rendering and is in the safety scan, so call check_job again after a few seconds. A prompt held for human moderation review can wait up to about one hour; if no decision is reached, the job is cancelled and the hold is released in full. Each account runs 2 jobs at once by default, and a third generate call is refused with concurrency_limit_reached rather than queued.
How do I call the Qwen3 Image API from Python?
Qwen3 Image is called from Python through the Makernice REST API in three steps. First POST the input to /v1/generations/quote, then POST it to /v1/generations with the returned quote id and an Idempotency-Key header, then poll the generation by its id until the status is succeeded. A REST quote holds its price for 12 minutes, which the MCP estimate does not. The API quickstart has a complete Python script built on requests; set the model to qwen3-image and the mode to t2i or i2i.
Can I run Qwen3 Image locally, or is it open source?
Qwen3 Image has no official open-weights release that we could find on the Qwen organization page on Hugging Face (checked 2026-11-12). That page lists open-weights Qwen-Image releases under other version names, such as Qwen-Image-2.1 and Qwen-Image-Edit-2511, each with its own model card and license. Makernice offers Qwen3 Image only as a hosted API and doesn't run local or custom weights, so a local setup would use one of those separate downloads.
