- Qwen
- Text
- 1M context
- Reasoning
Qwen3.8 Flash API: pricing, capabilities and setup
Qwen3.8 Flash API through llmbox: Alibaba's Qwen3.8-generation model for code, agents and high-volume requests, with a 1M-token context window and Codex CLI support.
pay as you go · no subscription · key right after sign-up
How much Qwen3.8 Flash costs
- Input$0.072per 1M tokens
$0.15−52% - Output$0.2115per 1M tokens
$0.47−55% - Cache read$0.0072per 1M tokens
- Cache write$0.072per 1M tokens · same as input
Cost calculator
100 M tokens
75%
The rest is output
- Direct from the provider
$23- With llmbox
- $11
- Savings
- $12
What a typical task costs
| Task | Tokens (input / output) | With llmbox | Direct |
|---|---|---|---|
| Short chat | 2 000 / 500 | $0.00025 | $0.00054 |
| Code review | 20 000 / 2 000 | $0.00186 | $0.00394 |
| Document summary | 40 000 / 2 000 | $0.0033 | $0.00694 |
| Agent session | 600 000 / 30 000 | $0.04955 | $0.1041 |
Specs
- Context1Mtokens
- Max output131Ktokens
- Inputtext
Capabilities
- Tool calling
- JSON schema output
- Reasoning
- Streaming
- Prompt caching
Endpoints
/v1/chat/completions/v1/responses/v1/messages
Setup in three steps
- 01Get a key
Sign up and create an API key in the dashboard.
Get a key → - 02Set the base URL
In any OpenAI-compatible client, point the API address to:
- 03Pass the model id
Put this identifier in the model field:
import os
from openai import OpenAI
client = OpenAI(
base_url="https://llmbox.cc/v1",
api_key=os.environ["LLMBOX_API_KEY"],
)
resp = client.chat.completions.create(
model="qwen/qwen3.8-flash",
messages=[{"role": "user", "content": "Hi! Tell me about yourself in two sentences."}],
)
print(resp.choices[0].message.content)What Qwen3.8 Flash is good for
Qwen3.8 Flash is the fast model of Alibaba's Qwen3.8 generation. According to the Alibaba Cloud Model Studio documentation, it combines reasoning with speed and is built for coding assistance and agent scenarios under high load at a low cost. The context window is 1,000,000 tokens and a single response can run up to 131,072 tokens. Through llmbox the model accepts and returns text.
What it's good for
Qwen3.8 Flash is the line's model for high volume. It suits coding work in Codex CLI and similar tools, where an agent takes many short steps: reads a file, proposes an edit, runs a command. Alibaba explicitly names Codex among the tools the model works with. An agent session can contain a lot of such steps, so measure spend on a typical task.
The second typical job is pipelines with a heavy flow of uniform requests: labeling support tickets, extracting fields into strict JSON, short chat answers. In such a pipeline the same instruction with the response schema sits at the start of every request, so caching is especially useful here: a repeated request prefix can be billed at the cache-read rate.
When to pick another model
- Complex multi-step tasks where Flash's quality falls short — compare the result with Qwen3.8 Max using the same key.
- Analyzing screenshots and photos — through llmbox, Qwen3.7 Plus accepts images as input.
How to connect
The model is available in Chat Completions for Cursor, OpenCode and the OpenAI SDK, and in the Responses API for Codex CLI. You don't need an Alibaba Cloud account — an llmbox key, the model ID qwen/qwen3.8-flash and the base URL from the Quickstart are enough. Tool settings are collected in Integrations, with a dedicated guide for Codex CLI. You can compare Flash with the other Qwen models on the Qwen API page.
Pricing and billing
Rates per 1M input tokens, output tokens and cache reads are listed on this page. Reasoning tokens count as output. You pay from a prepaid balance as you go, with no subscription and no monthly fee. Spend for every request is visible in the request log in your dashboard, and by day and by model in the Usage section.
Typical tasks
- Coding assistant in Codex CLI, Cursor and OpenCode
- Auxiliary agent steps with function calling
- Classification, labeling and data extraction into JSON
- Chatbots with a heavy flow of requests
Qwen3.8 Flash or Qwen3.8 Max?
| Model | Input · 1M | Output · 1M |
|---|---|---|
| Qwen3.8 Flash | $0.072 | $0.2115 |
| Qwen3.8 Max | $0.225 | $0.7875 |
Qwen3.8 Flash vs neighbours
| Model | Input · 1M | Output · 1M |
|---|---|---|
| Qwen3.8 Flash | $0.072 | $0.2115 |
| Qwen3.7 Plus | $0.11 | $0.44 |
| Qwen3.7 Max | $0.19 | $0.57 |
| Qwen3.8 Omni Flash | $0.216 | $0.666 |
| Qwen3.8 Max | $0.225 | $0.7875 |
| DeepSeek V4.1 Flash 1017 DeepSeek | $0.09 | $0.36 |
Qwen3.8 Flash is also compared with
Other Qwen models
Articles about the model

How to move code from the OpenAI SDK to other models: changing base_url
How to move code from the OpenAI SDK to DeepSeek, Gemini, Qwen and GPT models: base_url and key in Python, Node, curl, environment variables and LangChain.

How much does 1M tokens cost: GPT, Gemini, DeepSeek, Qwen
Current per-million-token rates for GPT, Gemini, DeepSeek and Qwen models: what input, output, cache and reasoning mean, and how to estimate a project's usage.

How to get a Qwen API key
Two ways to get a Qwen API key: directly in Alibaba Cloud Model Studio, or with one llmbox key for all models, including a ready-to-run request example.
FAQ
How is Qwen3.8 Flash different from Qwen3.8 Max?
They are two models of the same generation with the same 1M-token context window and a 131,072-token response cap. Max is the flagship for the hardest tasks, while Alibaba describes Flash as a model for coding assistance and agent scenarios under high load. The rates for both are listed on the model pages.
Does Qwen3.8 Flash work in Codex CLI?
Yes. Alibaba names Codex among the tools the model works with, and on llmbox it's available in the Responses and Chat Completions formats — for Codex CLI, Cursor and OpenCode. Setup steps are in the Integrations section of the docs.
What model name do I pass to the API?
Pass qwen/qwen3.8-flash together with your llmbox key. You don't need an Alibaba Cloud account or a DashScope key; the key is created in the API keys section of your dashboard.
Can I get output strictly in JSON?
Yes. The model supports JSON-schema output, which is handy for extracting fields from emails, invoices and support tickets. How to set a schema is described in the Request parameters section of the docs.
How is Qwen3.8 Flash billed?
Per input and output token at the per-1M-token rates on this page, from a prepaid balance as you go, with no subscription. A repeated request prefix can hit the cache; the cache rate is listed on this page too.