Qwen API

Qwen API through llmbox: Qwen3.8 Max, Qwen3.8 Flash, Qwen3.7 Plus and Qwen-Image models with one API key — no Alibaba Cloud account, one shared balance, pay as you go.

8
Qwen models behind one key
−92%
below direct rates

Qwen models and pricing

ModelTypeInput · 1MOutput · 1M
Qwen3.8 Flashqwen/qwen3.8-flashText$0.072$0.2115
Qwen3.7 Plusqwen/qwen3.7-plusText$0.11$0.44
Qwen3.7 Maxqwen/qwen3.7-maxText$0.19$0.57
Qwen3.8 Omni Flashqwen/qwen3.8-omni-flashText$0.216$0.666
Qwen3.8 Maxqwen/qwen3.8-maxText$0.225$0.7875
Qwen-Image-3.0qwen/qwen-image-3.0Images$0.09 per image
Qwen-Image-2.1qwen/qwen-image-2.1Images$0.135 per image
Qwen-Image-3.0 Proqwen/qwen-image-3.0-proImages$0.203 per image

Text model prices are per 1M tokens. Reasoning counts as output tokens.

About the Qwen API

Qwen models on llmbox

Qwen is Alibaba's model family: text models for code, agents and document work, and Qwen-Image models for image generation. llmbox gives you these models through an OpenAI-compatible API with one key and one base URL, alongside models from other vendors. You don't need an Alibaba Cloud account or a DashScope key, and usage across all models is deducted from a single prepaid balance as you go.

The catalog has eight main Qwen models:

  • Qwen3.8 Max — Alibaba's flagship; per the provider's documentation, an MoE model with 2.4 trillion parameters for code, office and professional work, and long autonomous tasks;
  • Qwen3.8 Flash — the fast model of the Qwen3.8 generation for code, agents and high-volume requests; Alibaba says it works with coding tools such as Codex;
  • Qwen3.8 Omni Flash — the omni-modal model of the Qwen3.8 generation, working with text on llmbox;
  • Qwen3.7 Max — the top model of the previous generation for agents, programming and long tasks, text only;
  • Qwen3.7 Plus — a model that balances capability and cost and also accepts image input;
  • Qwen-Image-3.0 Pro — the larger image model, for dense layouts with a lot of text;
  • Qwen-Image-3.0 — an image model for everyday generation with crisp lettering in 12 languages;
  • Qwen-Image-2.1 — a compact image model of the Qwen-Image 2 line with a choice of aspect ratios.

According to the Alibaba Cloud Model Studio documentation, all five text models share the same 1,000,000-token context window and a 131,072-token cap on a single response. All of them support reasoning, calling your own functions, JSON-schema output and streaming. The current list of models and their rates is in the table on this page.

What you get

Access works the same way for every vendor on llmbox:

  • one API key for every model in the catalog;
  • Qwen text models in the Chat Completions and Responses formats;
  • image generation for Qwen-Image models in the OpenAI Images format;
  • one prepaid balance that covers usage across all models;
  • a request log with the status, tokens and cost of every call;
  • separate keys per project, each with its own spend limit.

Text models and Qwen-Image are called from one client with one key. That helps when a product has several steps: say, Qwen3.8 Flash tags incoming tickets, Qwen3.8 Max writes copy for an ad campaign, and Qwen-Image-3.0 draws a banner with that copy — all paid from the same balance.

How to connect

  1. Create an API key in the API keys section of your dashboard. You can copy it later with the Show key button.
  2. Give your client the key and the llmbox base URL from the Quickstart.
  3. Pick a model, for example qwen/qwen3.8-flash, and send your first request.

Topping up is described in Balance and pricing. Don't ship the key in browser or mobile code: it can be extracted from a client app. If requests start in a front end, send them through your own server.

Which Qwen model to choose

Text model names read as generation plus tier. The generation is Qwen3.7 or the newer Qwen3.8. The tier is Max for the hardest tasks, Plus for a balance of capability and cost, and Flash for speed and high volume. Omni is a separate branch that Alibaba builds around audio and video understanding.

TaskStart withCompare with
Complex code, agents with a long planQwen3.8 MaxQwen3.7 Max
Coding assistant in Codex CLI, Cursor, OpenCodeQwen3.8 FlashQwen3.8 Max
Screenshots, mockups, photos and scans as inputQwen3.7 Plus—
Labeling, data extraction, chatbotsQwen3.8 FlashQwen3.8 Omni Flash
Whole long documentsQwen3.8 MaxQwen3.7 Plus
Banners and covers with letteringQwen-Image-3.0Qwen-Image-2.1
Menus, posters, storyboardsQwen-Image-3.0 ProQwen-Image-3.0

A practical approach: start with the smallest model that fits, test it on real data, and move up only where results fall short. The key stays the same when you switch models, but check the result on your own workload — image models, for example, set the frame size in different ways.

Max, Plus, Flash and Omni: the differences

Qwen3.8 Max is the current flagship. Pick it when a mistake costs more than the tokens: multi-step agents, large code edits, analysis of long contracts and reports. Qwen3.7 Max is the previous generation's flagship with the same context window; it's useful when your prompts are already tuned on Qwen3.7, or for comparing generations on your own task set.

Qwen3.7 Plus is the choice when there's an image in the input. Per Alibaba's documentation, the model reads screens and interfaces and writes code from a visual reference, so it fits building pages from a mockup and agents that work with a user interface.

Qwen3.8 Flash is the workhorse for high volume: short agent steps, labeling, extracting fields into JSON, chatbots. Qwen3.8 Omni Flash works with text — for text tasks, compare it with Qwen3.8 Flash.

Context caching on llmbox is available for Qwen3.8 Max, Qwen3.8 Flash and Qwen3.7 Plus: a repeated request prefix, such as a long system prompt, can hit the cache and is billed at the cache rate.

Image generation

Qwen-Image models create images from a text prompt. Per Alibaba's documentation, the Qwen-Image-3.0 line accepts prompts of up to 4,500 tokens and renders crisp text at sizes as small as 10 pixels in 12 languages. The standard version is built for everyday generation, and Pro for dense layouts such as newspaper pages, menus and storyboards. Qwen-Image-2.1 is a compact model of the Qwen-Image 2 line that creates images in different aspect ratios.

Generation takes noticeable time, so run it in the background in your product. It pairs well with a text model: Qwen3.8 Flash or Max writes a detailed scene description and the exact lettering, and a Qwen-Image model draws from it. Image models from other vendors are collected on the image models page, and a sample request is in Images.

Developer tools

Qwen text models plug into popular coding tools. Codex CLI works with them through the Responses API, and Cursor and OpenCode through Chat Completions. Ready-made settings for each tool are in Integrations; individual guides are in Codex CLI, Cursor and OpenCode.

What's available through llmbox

You get Qwen text models with reasoning, calling your own functions, JSON-schema output and streaming, caching for some of the models, and image generation from a prompt.

Request formats and supported parameters are covered in Request parameters.

Pricing and balance

You pay from a prepaid balance as you go — no subscriptions and no mandatory monthly payments. Text models are billed per input and output token at rates per 1M tokens, and reasoning tokens count as output. Qwen-Image models are billed per generated image.

Your balance is shown in the Balance section of your dashboard. Spend by day and by model is in the Usage section, and every request with its cost is in the Logs section. That lets you compare Max, Plus and Flash not only on answer quality but on what the same workflow actually costs.

Keys and spend control

You can have several keys: one for production, one for testing, one per service. Each key gets its own spend limit; once it's reached, requests with that key stop while other keys keep working. A compromised key is revoked in the dashboard — then issue a new one and update it in your app's environment.

Getting started

  1. Pick a model in the table above and open its page — it lists the rates, a sample request and the use cases the model fits.
  2. Create a key in the dashboard and set up your client as described in How to connect; settings for Codex CLI, Cursor and OpenCode are in Integrations.
  3. Send test requests with a few typical inputs from your workload.
  4. Open the request log: status, tokens and cost per call show whether the model fits or whether to compare it with its neighbor in the table.

FAQ

Which Qwen models are available?

Text models Qwen3.8 Max, Qwen3.8 Flash, Qwen3.8 Omni Flash, Qwen3.7 Max and Qwen3.7 Plus, plus the image models Qwen-Image-3.0 Pro, Qwen-Image-3.0 and Qwen-Image-2.1. The rates for each model are in the table on this page.

Do I need a Qwen API key?

No. You don't need an Alibaba Cloud account or a DashScope key: create an llmbox key in the API keys section of your dashboard and pass it instead of a Qwen key. The same key works for every model in the catalog, including other vendors.

How is Qwen API pricing calculated?

Text models are billed per input and output token at rates per 1M tokens; reasoning tokens count as output. Qwen3.8 Max, Qwen3.8 Flash and Qwen3.7 Plus also have a cache-read rate. Qwen-Image models are billed per generated image. Every request with its cost shows up in the request log.

Is this a subscription?

No. You pay from a prepaid balance as you go: there is no subscription and no monthly fee, and only actual usage is deducted.

How do I top up my balance?

Open the Balance section of your dashboard and add the amount you need in US dollars. The same balance pays for Qwen and for every other model in the catalog.

Can I use Qwen models in Codex CLI, Cursor or OpenCode?

Yes. Qwen text models are available in the Responses API for Codex CLI and in Chat Completions for Cursor and OpenCode. If a coding agent makes many short steps, start with Qwen3.8 Flash, and switch to Qwen3.8 Max with the same key for complex edits and long tasks. Setup steps are in the Integrations section of the docs.

Which Qwen models accept images, audio or video?

Through llmbox, Qwen3.7 Plus accepts images as input — screenshots, photos, diagrams and scans. The other Qwen text models work with text.

What model name do I pass to the API?

The model ID with the vendor prefix, for example qwen/qwen3.8-flash or qwen/qwen-image-3.0. Each ID is listed in the table on this page and on the model's own page, next to a sample request.

Can I cap spend for one project?

Yes. Create a separate key for the project and set a spend limit on it in your dashboard. Once the limit is reached, that key stops accepting requests while your other keys keep working.

Other vendors