Unlimited Open Source Models

Get Plan
Skip to main content
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.

Last updated · 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 idModelInput / 1MOutput / 1M
qwen-qwen3-235b-a22b-2507Qwen3 235B A22B Instruct 2507$0.0875$0.35
qwen-qwen3-235b-a22b-thinking-2507Qwen3 235B A22B Thinking 2507$0.23$2.30
qwen-qwen3-coderQwen3 Coder 480B A35B$0.30$1.00
qwen-qwen3-coder-30b-a3b-instructQwen3 Coder 30B A3B$0.07$0.28
qwen-qwen3.7-flashQwen3.7 Flash$0.03$0.13
qwen-qwen3.5-9bQwen3.5 9B$0.10$0.15
qwen-qwen3-vl-32b-instructQwen3 VL 32B (vision)$0.104$0.416
qwen-qwen3.8-max-0902Qwen3.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
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)

curl

bash
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 }'

Claude Code

bash
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"

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.

Get Expert Support in Seconds

We're Here to Help.

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

View Docs

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.