APIMart
Back to all models

Qwen4-Max API

AlibabaModel ID qwen4-maxText modelReleased November 15, 2026

Use Qwen4-Max to track down a bug that only shows up after a server move, build a page from a screenshot of the design, or check the totals in a draft report against the sales sheet.

Max input
991,808 tokens
Max output
131,072 tokens
Input → output
Text, Image, Video → Text
  • Image input
  • Streaming
  • Cached input pricing
  • OpenAI SDK compatible

Qwen4-Max API use cases

Each use case comes with an illustrative example: source material, a prompt and a hand-written sample answer, not actual model output. Copy the prompt, swap in your own material and try it on Qwen4-Max.

Try Qwen4-Max with your own material

Bugs that depend on the environment

Send Qwen4-Max the bug report, the code on the call path and what changed in deployment, and ask for the root cause and one fix. Add a test for the edge case it finds, and run the full suite before merging.

Example: Why are some orders invoiced for the wrong month?

Material

billing.py
invoice_month() formats order.created_at in the server’s local timezone.
Bug report
An order placed at 23:30 UTC on October 31 was invoiced for November.
Deploy note
The billing server moved to a region that runs on UTC+8.

PromptExplain why the order was invoiced for the wrong month, propose one fix, and describe a test that would have caught it.

Sample answer · written by hand to show the reasoning

23:30 UTC on October 31 is 07:30 on November 1 in UTC+8, so invoice_month() now returns November. Convert created_at to UTC (or the customer’s billing timezone) before formatting, and add a test with an order at 23:30 UTC on the last day of a month.

About the Qwen4-Max API

  • First model on the Qwen4 architecture

    A 2.4-trillion-parameter backbone with 71B parameters activated per token. Alibaba calls it the most capable Qwen model to date and a significant step up from Qwen3.8-Max.

  • Three reasoning effort levels

    Thinking mode supports low, high (the default) and xhigh. On Alibaba’s Work360 benchmark, Qwen4-Max used about 35% fewer tokens than Qwen3.8-Max at high effort and about 24% fewer at xhigh.

  • Reads images and video natively

    Input covers text, images and video, and output is text, so you can send screenshots, charts and short clips together with your prompt.

  • Qwen4-Max API key and access

    You don’t need a separate Qwen4-Max API key: one APIMart key works for every model. Requests go through an OpenAI Chat Completions-compatible endpoint with the model ID qwen4-max.

Qwen4-Max official benchmark results

Selected results Alibaba published at launch.

  • Work360

    52.69

    Alibaba’s benchmark of industry tasks across 721 specialized fields. Qwen3.8-Max scored 47.74.

  • DeepSWE v1.1

    75.7

    Agentic coding. Ahead of Kimi K3.1 (75.5), GPT-6.1 Sol (75.2) and Claude Opus 5.5 (74.2); Qwen3.8-Max scored 69.3.

  • Agents' Last Exam v1.1

    46.7

    Long-horizon tasks. Ahead of Claude Opus 5.5 and Kimi K3.1 (both 43.4); Qwen3.8-Max scored 27.9.

  • HLAB-Vals-1.1

    21.3

    Legal agent work. Kimi K3.1 scores 11.7 and Claude Opus 5.5 9.2; Qwen3.8-Max scored 15.4.

  • BioMysteryBench

    85.0

    Bioinformatics research. Ahead of GPT-6.1 Sol (84.4) and Claude Opus 5.5 (81.9).

  • Last Secure Code Bench

    31.8%

    Share of functions that are both correct and secure, without security hints. Qwen3.8-Max scored 22.0%.

How to call the Qwen4-Max API

To call Qwen4-Max, you only need an APIMart API key and your existing OpenAI SDK, or send plain HTTP requests.

POST /v1/chat/completions
curl https://api.apimart.ai/v1/chat/completions \
  -H "Authorization: Bearer $APIMART_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "qwen4-max",
  "messages": [
    {
      "role": "user",
      "content": "Describe how to design a clear API in three sentences."
    }
  ],
  "stream": false
}'

Qwen4-Max access details

Model IDqwen4-max
Base URLhttps://api.apimart.ai/v1
Endpoint/chat/completions

Common parameters

model
Required
messages
Required
stream
Optional
max_tokens
Optional
temperature
Optional
All request parameters, response fields and error codes

Qwen4-Max API request parameters

Qwen4-Max uses the general chat endpoint, POST /v1/chat/completions, with a JSON body. model and messages are required; every other parameter is optional.

ParameterTypeRequiredDescription
modelstringYesModel ID. Use qwen4-max for this model.
messagesarrayYesConversation messages. Each message has a role (system, user, or assistant) and content. Include earlier messages for multi-turn conversations.
streambooleanNoWhether to stream the output. true returns chunks over SSE, false returns the full response at once. Default: true.
temperaturenumberNoOutput randomness, 0–2. Default: 1.0. Lower values give more deterministic output.
top_pnumberNoNucleus sampling, 0–1. Default: 1.0. Adjust this or temperature, not both.
max_tokensintegerNoMaximum number of tokens to generate for the reply.
frequency_penaltynumberNoFrequency penalty, -2.0 to 2.0. Default: 0. Positive values reduce repeated wording.
presence_penaltynumberNoPresence penalty, -2.0 to 2.0. Default: 0. Positive values encourage new topics.
stopstring | arrayNoUp to 4 stop sequences. Generation stops when any of them appears.
nintegerNoNumber of replies to generate. Default: 1.

Response fields

The response contains the fields below. Token usage is returned in usage, which you can use to check costs.

FieldTypeDescription
idstringUnique identifier for the request.
modelstringThe model that handled the request.
choicesarrayList of replies. Each item contains message (role and content) and finish_reason.
usageobjectToken usage: prompt_tokens, completion_tokens, and total_tokens.

Error codes

Failed requests return an error object with code, message, and type.

StatusTypeMeaning
400invalid_request_errorInvalid request parameters.
401authentication_errorThe API key is invalid or missing.
402payment_requiredInsufficient account balance.
403permission_errorNo permission to access this resource.
429rate_limit_errorToo many requests. Retry later.
500server_errorInternal server error.
502bad_gatewayGateway error. The service is temporarily unavailable.

Qwen4-Max API pricing

The Qwen4-Max API is billed by token usage, and prices depend on your membership tier. Prices below are per million tokens; 1 US dollar = 10 credits.

ItemGoldCurrent pricePlatinumDiamondOfficial priceYou save
Input14.2857Credits~$1.428613.5714Credits~$1.357112.8571Credits~$1.285717.8571Credits~$1.785720%
Cached input0.7143Credits~$0.07140.6786Credits~$0.06790.6429Credits~$0.06430.8929Credits~$0.089320%
Output42.8571Credits~$4.285740.7143Credits~$4.071438.5714Credits~$3.857153.5714Credits~$5.357120%

Prices are for reference only. View full pricing

Why call Qwen4-Max API through APIMart

  • 20% below official pricing

    Qwen4-Max API pricing is billed by token usage. Gold to Diamond member prices are 20%–28% below Alibaba's official prices, and cached input costs just $0.0714 per 1M tokens.

    See membership prices
  • One API key for 500+ models

    Qwen4-Max, the rest of its family and 500+ models from GPT, Claude, Gemini and more share one API key and one account balance. Switching models is just a change to the model parameter.

  • Change two lines of existing code

    If you already use the OpenAI SDK, point base_url at https://api.apimart.ai/v1 and swap in your APIMart API key. Requests and responses keep the same format.

  • Try it online before you code

    Try Qwen4-Max with your own material in the Playground, no code or setup needed, and integrate once you like the results.

    Open Playground

Qwen4-Max FAQ

How is Qwen4-Max different from Qwen3.8-Max?

Qwen4-Max is the first model on the Qwen4 architecture, with 71B parameters activated per token, which Alibaba says is 25% fewer than Qwen3.8-Max. On Alibaba’s Work360 benchmark it scored 52.69 against 47.74, and the Qwen team reports about 35% fewer tokens at high effort on that benchmark. On APIMart both use the same endpoint and API key; change the model parameter and compare them on your own prompts.

When was Qwen4-Max released?

Alibaba’s Qwen team announced Qwen4-Max on November 15, 2026; Alibaba Cloud’s press release is dated November 16. Alibaba writes the name as Qwen4-Max, and on APIMart the Qwen 4 Max API uses the model ID qwen4-max.

Which reasoning effort levels does Qwen4-Max support?

According to Alibaba Cloud’s model documentation, Qwen4-Max supports deep thinking with three reasoning effort levels: low, high (the default) and xhigh. Other values are mapped to the nearest level: minimal to low, medium to high and max to xhigh. Use low for simple requests and xhigh for the hardest coding and reasoning tasks.

Is the Qwen4-Max context window 1,000,000 or 991,808 tokens?

Alibaba Cloud’s documentation lists a context length of 1,000,000 tokens for Qwen4-Max; in thinking mode, max input is 983,616 tokens and max output 262,144 tokens. The Max input and Max output on this page come from APIMart’s pricing data: input up to 991,808 tokens and output up to 131,072 tokens. On APIMart, plan your requests with the figures on this page.

Can Qwen4-Max read images and video?

Yes. Alibaba’s documentation lists text, images and video as input and text as output, and the Qwen team describes native vision as part of the Qwen4 architecture. It does not generate images, audio or video.

Does Qwen4-Max support context caching?

Yes. Alibaba’s documentation lists both implicit and explicit caching. An explicit cache needs a prefix of at least 1,024 tokens and lasts 5 minutes by default or 1 hour, renewed on each hit; writing it costs more than normal input, and hits are billed at the cached-input rate in the pricing table. Implicit cache hits are not guaranteed.

How can I try this model online?

Click Start chatting or Open Playground to visit the existing APIMart Playground. Select Qwen4-Max in the text category to start exploring.

Which model ID does the Qwen4-Max API use?

Set model to qwen4-max. Copy the exact ID from the page heading or the integration details panel.

Is it compatible with the OpenAI SDK?

You can keep the OpenAI SDK. Set base_url to https://api.apimart.ai/v1, provide your APIMart API key, and use the model ID on this page.

What is the context window of Qwen4-Max?

On APIMart, Qwen4-Max accepts up to 991,808 input tokens per request. Your prompt, earlier messages, and file content all count toward it.

How many tokens can it output at once?

Qwen4-Max can output up to 131,072 tokens in a single reply. Use the max_tokens parameter to set a lower limit.

How much does the Qwen4-Max API cost?

The Qwen4-Max API on APIMart is billed by token, and prices depend on your membership tier. Gold: $1.4286 per million input tokens and $4.2857 per million output tokens. Diamond: $1.2857 per million input tokens and $3.8571 per million output tokens. Prices may change; the pricing page has the current rates.

Does it support streaming?

Yes. The general chat endpoint streams over SSE by default. Set stream to false to receive the complete response at once.

How do I get an API key?

Sign in to APIMart and create a key on the API Keys page, then send it in the Authorization: Bearer header. The same key also works for other models on the platform.