---
title: Qwen API — Qwen3, Qwen3 Coder & VL on One Endpoint
description: Qwen API on an OpenAI-compatible endpoint: Qwen3 235B from $0.0875/1M input tokens, Qwen3 Coder from $0.07. Works with Claude Code and the OpenAI SDK.
url: https://modelslab.com/qwen-api
canonical: https://modelslab.com/qwen-api
type: website
component: Seo/QwenApi
generated_at: 2026-09-23T18:32:53.546166Z
---

LLM API

Qwen API — Every Qwen LLM on One Endpoint
---

Qwen3, Qwen3 Coder and Qwen3 VL on an OpenAI-compatible endpoint at /api/v7/llm on modelslab.com. Qwen3 235B costs $0.0875 per 1M input tokens. Keep your OpenAI SDK or Claude Code setup and change the base URL.

[Get a Qwen API Key](https://modelslab.com/register) [API Documentation](https://docs.modelslab.com/llm-api/coding-tools)

Last updated Sep 23, 2026 · By ModelsLab Engineering

What the Qwen API gives you
---

### One endpoint for every Qwen model

The Qwen API on ModelsLab is the OpenAI chat completions format at /api/v7/llm on modelslab.com. Authenticate with your ModelsLab key as a Bearer token and set `model` to a Qwen id. Streaming, tools, `response\_format` and reasoning parameters work the same way they do against OpenAI.

The same base URL also accepts the Anthropic Messages format at /api/v7/llm/v1/messages. That is what lets Claude Code run on a Qwen model: point ANTHROPIC\_BASE\_URL at the endpoint and pass a Qwen id to `--model`.

- Qwen3: 235B A22B Instruct and Thinking, 30B A3B, 32B, 14B, 8B
- Qwen3 Coder: 480B A35B, 30B A3B, Flash, Plus and Next
- Qwen3 VL vision models: 235B, 32B, 30B A3B and 8B
- Qwen3.5, Qwen3.6, Qwen3.7 and Qwen3.8 releases
- Qwen2.5 Instruct, Qwen2.5 Coder 32B and QwQ-32B

Qwen models and prices
---

Send the model id as `model` on /api/v7/llm/chat/completions.

| model id | Model | Input / 1M | Output / 1M |
|---|---|---|---|
| qwen-qwen3-235b-a22b-2507 | Qwen3 235B A22B Instruct 2507 | $0.0875 | $0.35 |
| qwen-qwen3-235b-a22b-thinking-2507 | Qwen3 235B A22B Thinking 2507 | $0.23 | $2.30 |
| qwen-qwen3-coder | Qwen3 Coder 480B A35B | $0.30 | $1.00 |
| qwen-qwen3-coder-30b-a3b-instruct | Qwen3 Coder 30B A3B | $0.07 | $0.28 |
| qwen-qwen3.7-flash | Qwen3.7 Flash | $0.03 | $0.13 |
| qwen-qwen3.5-9b | Qwen3.5 9B | $0.10 | $0.15 |
| qwen-qwen3-vl-32b-instruct | Qwen3 VL 32B (vision) | $0.104 | $0.416 |
| qwen-qwen3.8-max-0902 | Qwen3.8 Max | $2.00 | $6.00 |

Rates are per 1M tokens as listed on each model page on 2026-09-23. The Qwen LLMs run on third-party inference providers and are metered per token on every plan.

Qwen API quick start
---

The OpenAI SDK, curl and Claude Code, all on one key.

### OpenAI SDK (Python)

Python

```
<code>1from openai import OpenAI
2

3client = OpenAI(
4    api_key="YOUR_MODELSLAB_API_KEY",
5    base_url="https://modelslab.com/api/v7/llm",
6)
7

8response = client.chat.completions.create(
9    model="qwen-qwen3-235b-a22b-2507",
10    messages=[{"role": "user", "content": "Summarise this changelog in three bullets."}],
11    stream=False,
12)
13

14print(response.choices[0].message.content)</code>
```

### curl

bash

```
<code>1curl https://modelslab.com/api/v7/llm/chat/completions \
2  -H "Authorization: Bearer $MODELSLAB_API_KEY" \
3  -H "Content-Type: application/json" \
4  -d '{
5    "model": "qwen-qwen3-coder",
6    "messages": [{"role": "user", "content": "Write a Python function that parses ISO dates."}],
7    "stream": true
8  }'</code>
```

### Claude Code

bash

```
<code>1ANTHROPIC_BASE_URL="https://modelslab.com/api/v7/llm" \
2ANTHROPIC_AUTH_TOKEN="YOUR_MODELSLAB_API_KEY" \
3ANTHROPIC_SMALL_FAST_MODEL="qwen-qwen3.7-flash" \
4claude --model "qwen-qwen3-coder"</code>
```

### Which Qwen model to start with

For general chat and agents, start with Qwen3 235B A22B Instruct 2507. It costs $0.0875 per 1M input tokens and $0.35 per 1M output tokens. For coding agents, Qwen3 Coder 480B is the strongest option and Qwen3 Coder 30B A3B is the low-cost one. For high-volume classification or extraction, Qwen3.7 Flash is $0.03 in and $0.13 out.

Thinking variants spend more output tokens on reasoning, and output tokens are the expensive side. Measure one real request before you switch a whole workload to a thinking model.

### Using Qwen in Claude Code and other coding agents

Cursor, Continue, Aider, Hermes and LiteLLM accept a custom OpenAI base URL. Set it to https://modelslab.com/api/v7/llm, use your ModelsLab key as the API key and pass a Qwen model id. Claude Code uses the Anthropic format instead: set ANTHROPIC\_BASE\_URL to the same URL, ANTHROPIC\_AUTH\_TOKEN to your key, and ANTHROPIC\_SMALL\_FAST\_MODEL to a small Qwen model for its background calls.

Codex CLI is the exception for now: current versions call the OpenAI Responses API, and /api/v7/llm serves chat completions and Anthropic Messages, not Responses. Use Claude Code or a chat-completions tool until that changes.

The full per-tool setup, including persistent configuration files, is in the coding tools guide at docs.modelslab.com/llm-api/coding-tools.

### How Qwen is billed

Every call needs an active plan; plans start at $21/month. The Qwen LLMs are billed per token at the rate on each model page, because they run on third-party inference providers: on Basic and Standard the usage included in the plan is used first, then wallet balance. That is also true on the $149/month Open Source Unlimited plan: Unlimited covers the open-source image, video and audio models ModelsLab runs on its own GPUs, which includes the Qwen image models, but not hosted LLMs.

Qwen model pages
---

Each Qwen model has its own page with benchmarks, context length and a playground. The Qwen image models are covered on their own pages.

- [Qwen3 Coder 480B A35B](/qwen-qwen3-coder-480b-a35b)
- [Qwen3 235B A22B Thinking 2507](/qwen-qwen3-235b-a22b-thinking-2507)
- [Qwen3 VL 235B A22B Instruct](/qwen-qwen3-vl-235b-a22b-instruct)
- [Qwen3.5 397B A17B](/qwen-qwen35-397b-a17b)
- [Qwen3.5 35B A3B](/qwen-qwen35-35b-a3b)
- [Qwen3.6 Plus](/qwen-qwen36-plus)
- [Qwen QwQ-32B](/qwen-qwq-32b)
- [Qwen2.5 Coder 32B Instruct](/qwen25-coder-32b-instruct)
- [Qwen Image (text to image)](/qwen)

Related LLM pages
---

[### OpenAI API Alternative

The same OpenAI-compatible endpoint with every LLM family, plus image, video and speech on one key.](https://modelslab.com/openai-api-alternative) [### DeepSeek API

DeepSeek V4, V3.2 and R1 on the same base URL, from $0.07 per 1M tokens.](https://modelslab.com/deepseek-api) [### Qwen Image Edit API

Instruction-based image editing with Qwen Image Edit 2509 and 2511, up to four reference images.](/qwen-image-edit)

Get Expert Support in Seconds

We're Here to Help.
---

Want to know more? You can email us anytime at <support@modelslab.com>

Chat with support[View Docs](https://docs.modelslab.com)


Point an OpenAI client at https://modelslab.com/api/v7/llm, pass your ModelsLab API key as the Bearer token and set `model` to a Qwen id such as `qwen-qwen3-235b-a22b-2507`. The request and response shapes are the OpenAI chat completions ones, so an existing integration changes `base_url`, the key and the model name.


The Qwen3 family (235B A22B Instruct and Thinking, 30B A3B, 32B, 14B, 8B), Qwen3 Coder (480B A35B, 30B A3B, Flash, Plus, Next), Qwen3 VL vision models, the Qwen3.5 to Qwen3.8 releases, Qwen2.5 Instruct and Coder, and QwQ-32B. Every one is selected by `model` on the same endpoint.


LLMs are billed per token. In September 2026 the model pages list Qwen3 235B A22B Instruct 2507 at $0.0875 per 1M input tokens and $0.35 per 1M output tokens, Qwen3 Coder 480B at $0.30 in and $1.00 out, and Qwen3.7 Flash at $0.03 in and $0.13 out. You need an active plan (from $21/month) to call the API.


Claude Code, yes: set ANTHROPIC_BASE_URL to https://modelslab.com/api/v7/llm, ANTHROPIC_AUTH_TOKEN to your ModelsLab key and pass a Qwen id to `--model`; the endpoint accepts the Anthropic Messages format at /api/v7/llm/v1/messages. Chat-completions tools such as Cursor, Continue, Aider and LiteLLM work with the same base URL. Codex CLI is the exception for now: current versions call the OpenAI Responses API, and /api/v7/llm serves chat completions and Anthropic Messages, not Responses. Use Claude Code or a chat-completions tool until that changes.


Yes. Set `stream: true` on /api/v7/llm/chat/completions and the response comes back as server-sent events, the same as OpenAI. Tools, `response_format` and reasoning parameters are also accepted.


No. The Qwen LLMs are served through third-party inference providers, so they are metered per token on every plan. The Unlimited plan covers the open-source image, video and audio models ModelsLab runs on its own GPUs, which includes Qwen Image and Qwen Image Edit.


Yes. Qwen Image (text to image, $0.0047 per image) and Qwen Image Edit 2509 and 2511 ($0.008 and $0.022 per image) run on ModelsLab GPUs and are covered by the $149 Open Source Unlimited plan. They have their own pages, /qwen and /qwen-image-edit; this page covers the Qwen language models.

## Frequently Asked Questions

### How do I call the Qwen API?
Point an OpenAI client at https://modelslab.com/api/v7/llm, pass your ModelsLab API key as the Bearer token and set `model` to a Qwen id such as `qwen-qwen3-235b-a22b-2507`. The request and response shapes are the OpenAI chat completions ones, so an existing integration changes `base_url`, the key and the model name.

### Which Qwen models are available?
The Qwen3 family (235B A22B Instruct and Thinking, 30B A3B, 32B, 14B, 8B), Qwen3 Coder (480B A35B, 30B A3B, Flash, Plus, Next), Qwen3 VL vision models, the Qwen3.5 to Qwen3.8 releases, Qwen2.5 Instruct and Coder, and QwQ-32B. Every one is selected by `model` on the same endpoint.

### How much does the Qwen API cost?
LLMs are billed per token. In September 2026 the model pages list Qwen3 235B A22B Instruct 2507 at $0.0875 per 1M input tokens and $0.35 per 1M output tokens, Qwen3 Coder 480B at $0.30 in and $1.00 out, and Qwen3.7 Flash at $0.03 in and $0.13 out. You need an active plan (from $21/month) to call the API.

### Can I use Qwen in Codex or Claude Code?
Claude Code, yes: set ANTHROPIC_BASE_URL to https://modelslab.com/api/v7/llm, ANTHROPIC_AUTH_TOKEN to your ModelsLab key and pass a Qwen id to `--model`; the endpoint accepts the Anthropic Messages format at /api/v7/llm/v1/messages. Chat-completions tools such as Cursor, Continue, Aider and LiteLLM work with the same base URL. Codex CLI is the exception for now: current versions call the OpenAI Responses API, and /api/v7/llm serves chat completions and Anthropic Messages, not Responses. Use Claude Code or a chat-completions tool until that changes.

### Does the Qwen API support streaming?
Yes. Set `stream: true` on /api/v7/llm/chat/completions and the response comes back as server-sent events, the same as OpenAI. Tools, `response_format` and reasoning parameters are also accepted.

### Is Qwen covered by the $149 Open Source Unlimited plan?
No. The Qwen LLMs are served through third-party inference providers, so they are metered per token on every plan. The Unlimited plan covers the open-source image, video and audio models ModelsLab runs on its own GPUs, which includes Qwen Image and Qwen Image Edit.

### Does ModelsLab also host the Qwen image models?
Yes. Qwen Image (text to image, $0.0047 per image) and Qwen Image Edit 2509 and 2511 ($0.008 and $0.022 per image) run on ModelsLab GPUs and are covered by the $149 Open Source Unlimited plan. They have their own pages, /qwen and /qwen-image-edit; this page covers the Qwen language models.


---

*This markdown version is optimized for AI agents and LLMs.*

**Links:**
- [Website](https://modelslab.com)
- [API Documentation](https://docs.modelslab.com)
- [Blog](https://modelslab.com/blog)

---
*Generated by ModelsLab - 2026-09-24*