Qwen3 API setup: three ids, one base URL, first request.
Updated 2026-07-16
The Qwen3 line is three served ids here: qwen3.7-max, the May 2026 text flagship; qwen3.7-plus, the June 2026 multimodal volume tier; and qwen3.6-plus, the April 2026 predecessor. Point any OpenAI-compatible client at https://api.apisrouter.com/v1, pick the id, and the request is a standard chat completion with no Alibaba Cloud account involved.
Quick answer: base URL, key, and which of the three strings.
Every OpenAI-compatible SDK takes a base URL and a key. Set the base URL to https://api.apisrouter.com/v1, and choose the model string: qwen3.7-plus as the default for most work, qwen3.7-max when the task needs the strongest reasoning in the family, qwen3.6-plus only when an existing workload is pinned to it. The payload is the same /v1/chat/completions shape as every other chat model. Spell the ids exactly as served: lowercase qwen, version with a dot, suffix with a hyphen. The /v1/models listing is the authoritative source, and a typo returns model-not-found rather than silently downgrading.
curl https://api.apisrouter.com/v1/chat/completions \
-H "Authorization: Bearer $APISROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen3.7-plus",
"messages": [{"role": "user", "content": "Summarize the difference between Qwen 3.7 Max and Plus in two sentences."}]
}'What the three ids actually are.
Qwen3.7-Max is Alibaba's proprietary text flagship, announced at the Alibaba Cloud Summit on May 20, 2026 with API access live on Model Studio from May 19 per launch coverage. It targets the hardest text work: complex code generation, multi-step agent plans, long-horizon execution. Qwen3.7-Plus went generally available on June 1, 2026 (MarkTechPost, June 2, 2026): it bolts vision and video understanding onto the 3.7 text backbone and launched at a fraction of Max's per-token rate, which is what makes it the family's volume tier. Note that image and video input support through this catalog should be verified with a small request before you build on it; the entry here is served as a text chat-completions id. Qwen3.6-Plus is the April 2026 predecessor generation. One catalog fact to state plainly: qwen3.6-plus is priced above qwen3.7-plus here, matching how the vendor tiered the two at launch, so there is no cost reason to prefer it. It exists for workloads that were evaluated and pinned on 3.6 behavior and have not re-run their evals on 3.7 yet. All three ids serve a 1M-token context window in the catalog, matching Alibaba's published window for the 3.7 family.
Quickstart: Python and JavaScript with the OpenAI SDK.
Alibaba's own DashScope platform documents an OpenAI-compatible mode, and the gateway route here speaks the same protocol, so both official OpenAI SDKs work by changing the base URL at client construction. The model field passes through as a plain string, which is what makes the Max-or-Plus decision a config entry rather than an architecture decision. Keep the key in an environment variable and pin the id in one constant, so moving a workload between qwen3.7-plus and qwen3.7-max later is a one-line diff with a clean history.
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["APISROUTER_API_KEY"],
base_url="https://api.apisrouter.com/v1",
)
resp = client.chat.completions.create(
model="qwen3.7-plus",
messages=[
{"role": "system", "content": "You are a concise assistant."},
{"role": "user", "content": "Extract the action items from this meeting transcript: ..."},
],
max_tokens=2000,
)
print(resp.choices[0].message.content)
print(resp.usage) # prompt_tokens / completion_tokens per requestWhen each id, concretely.
Launch-season comparisons of the two 3.7 tiers reported the gap widest on agent-specific benchmarks and narrow on knowledge tasks, which matches the routing above: pay the flagship rate where plans are made, not where text is read. The dedicated Max-vs-Plus page linked below works that comparison in detail.
- qwen3.7-plus for the default seat: extraction, summarization, classification, chat, agent steps at volume. Its launch positioning was exactly this, capability close to the flagship at a rate built for traffic.
- qwen3.7-max for the hard seats: multi-step agent plans, complex code generation, tasks where independent launch-season comparisons put the largest Max-over-Plus gaps on agentic benchmarks. Route the few requests that need it, not the whole pipeline.
- qwen3.6-plus only for pinned workloads: it costs more than qwen3.7-plus here, so its one legitimate role is behavioral stability for systems evaluated on 3.6 that have not re-run evals yet. Schedule the re-run; the id is a bridge, not a destination.
- The planner-executor split works naturally in this family: qwen3.7-max holds the plan, qwen3.7-plus executes the steps, both behind one key so the split is two strings in one loop.
Budgeting against a 1M-token context.
All three Qwen ids serve 1M tokens of context here, which removes the truncation ceiling for whole-repository questions, large document sets, and very long agent sessions. It does not remove the bill: context tokens price as input on every request, and a loop that carries 300K tokens of state re-bills that state on every step. Practical guidance: treat the window as a ceiling, not a target. Scope prompts to what the task needs, carry long-lived state as summaries where possible, and reserve genuinely huge contexts for the requests that earn them, a full-corpus question, a repository-wide review, rather than every turn of a chat. The usage log's prompt_tokens column tells you within a day whether context discipline is holding. Output ceilings differ between the tiers upstream: launch-season spec sheets reported a higher maximum output for Max than Plus (roughly 64K vs 32K tokens). If a workload generates very long single responses, verify the ceiling on your route with one long-output test before wiring it in.
Pay-as-you-go · transparent per-model pricing
Selected models are priced below official list prices. Exact input, output, cache, and per-request prices are shown for each model.
| Model | Official Price | Our Price |
|---|---|---|
| Qwen 3.7 Max | $2.50 / $7.50 per M | $2.25 / $6.75 per M |
| Qwen 3.7 Plus | $0.29 / $1.14 per M | $0.26 / $1.03 per M |
| Qwen 3.6 Plus | $2.00 / $6.00 per M | $1.80 / $5.40 per M |
| Claude Sonnet 4.6 | $3.00 / $15.00 per M | $2.40 / $12.00 per M |
| GPT-5.5 | $5.00 / $30.00 per M | $4.00 / $24.00 per M |
Verify the endpoint and debug the first request.
List the served models first: all three Qwen ids should appear, spelled exactly as this page writes them. The first-request failure list is short and consistent. A 401 means the key was not exported into the shell running your code. A 404 on the path means the base URL is missing its /v1 suffix, since SDKs append /chat/completions to the base they are given. Model-not-found is a spelling issue, usually a missing dot or hyphen; qwen3.7-plus and qwen3.7-max are exact strings. A response truncated with finish_reason=length means max_tokens was set too tight; raise it before drawing quality conclusions. Once requests flow, the console shows per-request model, token counts, and spend, which is the fastest way to learn what your prompts cost on Plus versus Max on real traffic rather than assumptions.
curl -s https://api.apisrouter.com/v1/models \
-H "Authorization: Bearer $APISROUTER_API_KEY" | grep qwenFAQ
What is the Qwen3 API base URL?
Through APIsRouter it is https://api.apisrouter.com/v1. Any OpenAI-compatible SDK accepts it as base_url (Python) or baseURL (JavaScript), and the endpoint serves qwen3.7-max, qwen3.7-plus, and qwen3.6-plus under one key next to the rest of the catalog.
What are the exact Qwen3 model ids?
qwen3.7-max, qwen3.7-plus, and qwen3.6-plus, lowercase with dots and hyphens exactly as written. The /v1/models listing on the endpoint is the authoritative spelling for every served id.
Should I use Qwen 3.7 Max or Plus?
Plus by default: it launched as the volume tier at a fraction of Max's rate with capability close behind on most tasks. Reserve Max for the hardest agentic and code-generation seats, where launch-season comparisons put the widest quality gaps. The Max-vs-Plus page linked on this page works the tradeoff in detail.
Does the Qwen API work with the OpenAI SDK?
Yes. Alibaba documents an OpenAI-compatible mode on its own platform, and the gateway route here speaks the same protocol: custom base URL, standard chat completions, streaming, and the standard tools array, with no Qwen-specific client required.
What context window do the Qwen3 models have?
All three ids serve a 1M-token context in the catalog here, matching Alibaba's published window for the 3.7 family. Context bills as input on every request, so the window is a ceiling to budget against rather than a target to fill.
Why does qwen3.6-plus cost more than qwen3.7-plus?
Because the vendor priced the generations that way at the 3.7 launch: 3.7 Plus arrived as a lower-priced tier than the 3.6 generation it succeeded, and the catalog reflects it. The practical consequence: use qwen3.6-plus only for workloads pinned to 3.6 behavior, and re-run evals on 3.7 to migrate off it.