Qwen3.8 Max
Use the Qwen3.8 Max API via OpenAI-compatible Chat Completions and Responses. 1M context, PDF chat, per-call web search, and a live playground.
A codebase you don't know is a risk, not a hurdle. The plan should burn down that risk in order: understand, run, trace, spike, then make the change small enough that "production-ready" is a property you can demonstrate, not a hope.
Here are the first five steps, with the evidence you collect at each.
Step 1 — Get it building and the baseline green (half day)
Read the README, the manifest(s), the CI config, and any architecture docs. Boot the app locally, run the full test suite, run the linter/typechecker.
Evidence: The exact commands that reproduce a clean build and a passing test suite from a fresh checkout (recorded output, not memory of it). A one-page map you wrote yourself: where the entry points are, the layers, the build/test toolchain, and the main risks to your feature (e.g. "this touches cron jobs and payments").
Step 2 — Trace the smallest end-to-end slice that resembles your feature (half day)
Don't start with your feature. Pick a neighboring one that already works and follow it from entry to persistence. Note the conventions along the way: how errors surface, how config is injected, how logging is done, how tests are written.
Evidence: An annotated trace — file → function → what it does — for that slice. A written list of "conventions I must follow" (not intuitions; things you observed in real code). A named shortlist of the 3–5 files you will actually touch. If you can't produce this trace, you're not ready to write code.
Step 3 — Spike the core path (day 2)
Build the ugly version: hardcoded values, no error handling, no tests. The purpose is to confirm the path you traced in step 2 is real and to surface what you didn't know you didn't know.
Evidence: A working spike demonstrating the feature's central data path, alongside a list of every assumption the spike broke and what you corrected. That correction list is the most valuable document in this whole plan.
Step 4 — Write the contract before the code (half of day 2 / day 3)
Once the spike proves the path, pin down what production needs: the inputs/outputs, the error cases, where it sits in the conventions from step 2. Then write the tests — they'll be red, but they're the specification.
Evidence: A one-to-two-page design doc, an agreed interface/API shape (with the team if there is one), and a red test suite that encodes intended behavior. If you can't write the contract without consulting the code, you haven't finished step 2.
Step 5 — Implement in small, verified increments (days 3–4)
Replace the spike with the real thing in small commits, each one keeping the suite green, leaning on the existing patterns. Run lint/tests/typecheck per commit — CI, not just locally — and exercise the actual path against a real instance (staging or a local environment that isn't stubbed).
Evidence: A branch with progressive commits, each green in CI; coverage on the new code; something that proves it works against reality (a test result, a log trace, a screenshot); and a review by at least one person who knows the codebase. The review counts as evidence — an unfamiliar codebase has tribal knowledge you cannot extract from the files alone.
Steps 6+ would be the things that actually make it "shipped": a migration plan and its rollback, feature flagging, observability, the release and post-release verification. But the first five get you to a reviewed, green, working slice in staging — which is the point at which you can say "this will work in production" with evidence behind it, instead of a guess.
Runs in this page. Sign-in and credits are required.
Model details
Use the same model key in Playground, API requests, and internal workflows.
- Model ID
- qwen3.8-max
- Provider
- Qwen
- Protocol
- OpenAI Chat Completions · OpenAI Responses
- Context window
- 1,000,000 tokens
- Max output
- 131,072 tokens
- Input tokens
- 85.7143 credits / 1M tokens
- Output tokens
- 257.1429 credits / 1M tokens
- Cache read
- 10.7143 credits / 1M tokens
- Cache write
- 107.1429 credits / 1M tokens
- web_search
- 0.0571 credits / call
- image_search
- 0.6857 credits / call
- web_search_image
- 0.3429 credits / call
What the Qwen3.8 Max API can do
Qwen3.8 Max is Alibaba's long-context chat model. On AIReiter the public model id is qwen3.8-max.
About 1 million input tokens and up to 131,072 output tokens. Long documents, multi-file chat, and extended threads fit in one request.
POST /api/v1/chat/completions with the same messages, temperature, and stream fields used by OpenAI SDKs. This is the default path for dialogue.
Attach a public file URL in messages[].content as type file. PDF is not a billed tool; it is charged through tokens only.
POST /api/v1/responses for web_search, web_search_image, and image_search. The JSON usage.x_tools object reports how many times each tool ran.
Qwen3.8 Max API pricing
Live token and tool rates are on https://aireiter.com/pricing. The figures on this page update from the model database.
Token billing
Input, output, cache read, and cache write each have their own price per 1M tokens. The playground on this page shows the current AIReiter rates next to official list prices.
Built-in tools billed per call
web_search, web_search_image, and image_search add a per-call fee on top of tokens. web_extractor and code_interpreter are priced at zero and do not add credits.
How to estimate credits
Credits = token fees + tool count x per-call price. If you only multiply tokens by token prices, the total will be short whenever usage.x_tools has a count greater than zero.
Qwen3.8 Max API examples
Replace YOUR_API_KEY with a key from https://aireiter.com/keys. Full protocol notes: https://docs.aireiter.com/en/overview
Chat Completions
curl https://aireiter.com/api/v1/chat/completions \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"qwen3.8-max","messages":[{"role":"user","content":"Hello"}]}'
Responses with web_search
curl https://aireiter.com/api/v1/responses \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"qwen3.8-max","input":"What happened today?","tools":[{"type":"web_search"}]}'
Try Qwen3.8 Max in 3 steps
- 01
Create an API key
Sign in and create a key at https://aireiter.com/keys. Send it as Authorization: Bearer.
- 02
Start with Chat Completions
POST /api/v1/chat/completions for ordinary chat and PDF. Keep stream true if you want tokens as they generate.
- 03
Add tools on Responses
POST /api/v1/responses with tools such as {"type":"web_search"}. Read usage.x_tools in the response, then check https://aireiter.com/pricing for the per-call rate.
FAQ
01What is the Qwen3.8 Max API?
It is Alibaba's Qwen3.8 Max chat model served through AIReiter. You call it with the public model id qwen3.8-max over OpenAI-compatible HTTP, or try it in the playground on this page.
02Is the Qwen3.8 Max API OpenAI compatible?
Yes. Chat Completions is POST /api/v1/chat/completions. Built-in tools use POST /api/v1/responses. OpenAI SDKs work if you set the base URL to https://aireiter.com/api/v1 and the model to qwen3.8-max.
03How much does the Qwen3.8 Max API cost?
You pay token prices for input, output, and cache, plus a per-call fee when web_search, web_search_image, or image_search runs. Current rates are on https://aireiter.com/pricing and in the price row at the top of this page.
04What is the Qwen3.8 Max context window?
About 1 million input tokens. Maximum output is 131,072 tokens per request.
05How do I use web search with Qwen3.8 Max?
Use the Responses API, not Chat Completions. Send tools: [{"type":"web_search"}] (or web_search_image / image_search). The response usage.x_tools field shows the billed call count.
06Does PDF chat cost extra on Qwen3.8 Max?
No extra per-page fee. Put a public PDF URL in Chat Completions messages as type file. Billing stays on tokens. Built-in search tools are the items that add a per-call charge.
When Qwen3.8 Flash is the better call
Manage API keys →Same family. Flash is the lower token price.
Use Qwen3.8 Flash for high-volume coding and tool loops. Send model qwen3.8-flash, at about $0.057 input and $0.193 output per million tokens.