Qwen4 35B A3B API

Send text, images or video and get text answers with reasoning, tool calls and structured output

Modalities
Image, Text, VideoText
In / Out price
$0.06/$0.36per 1M
Context window
1M tokens
Released
Dec 4, 2026

Qwen4 35B A3B overview

The pelican test: one prompt, every text model, unedited SVG output from Dec 4, 2026.

SVG of a pelican riding a bicycle, written by Qwen4 35B A3B through AI/ML API

Qwen4 35B A3B by Alibaba Cloud

Qwen4 35B A3B is the open-weight sparse mixture-of-experts model of Alibaba Cloud's Qwen4 series. It has 35B total parameters with about 3B active per token.

Qwen4 35B A3B specs

Model ID
alibaba/qwen4-35b-a3b
Developer
Alibaba Cloud
Context window
1,000,000 tokens
Max output
262,144 tokens
Input
Image, Text, Video
Output
Text
API
OpenAI-compatible, base URL https://api.aimlapi.com/v1

Long inputs and long answers in one request

The 1M-token context window lets a long report, many images or video inputs sit in a single request. A response can run up to 262,144 tokens, so long summaries and extractions fit in one call.

Alibaba Cloud lists hybrid thinking for this model. On this endpoint the request option that touches reasoning is reasoning effort.

Reasoning effort is the setting to test

Reasoning effort constrains how much effort the model spends on reasoning. The supported values are low, medium and high. Reducing it can result in faster responses and fewer tokens used on reasoning.

Run the same set of prompts at low and at high. Compare the correctness of the answers with the response time and the reasoning tokens, then keep the lowest setting whose output still passes your checks.

Use cases

Answer questions about a long report or codebase placed in a single request.

Extract fields from images or video and return them as structured output.

Run an agent that makes parallel tool calls and streams its replies to a user.

Classify or summarize incoming text at a low reasoning effort to check response time.

Capabilities

  • Reasoning
  • Streaming
  • Structured outputs
  • Function calling
  • Vision

Qwen4 35B A3B API pricing

Qwen4 35B A3B pricing in US dollars
UsagePriceUnit
Input$0.061M tokens
Output$0.361M tokens
Cached input$0.0031M tokens

Prices from the AI/ML API price list, checked on Dec 4, 2026.

Qwen4 35B A3B vs other models: token prices

AI/ML API input and output rates for 5 models, per million tokens.

AI/ML API model prices in USD per million tokens
ModelInputOutput
Qwen4 35B A3B$0.06$0.36
Qwen3.8 Omni Flash$0.15$0.47
Qwen3.8-Flash$0.16$0.47
Qwen 3.8 27B$0.4761$3.3856
Qwen3.8 Max Prime$4.232$12.696

How to use the Qwen4 35B A3B API

View docs

Build with your agent

Give your agent the model details, code and documentation.

1Get your API key

Create API key
export AIMLAPI_KEY="8f2b4c7d9a1e6b3f…"

2Make your first request

curl 'https://api.aimlapi.com/v1/chat/completions' \
  -H "Authorization: Bearer $AIMLAPI_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "alibaba/qwen4-35b-a3b",
  "messages": [
    {
      "role": "user",
      "content": "Write a haiku about the ocean."
    }
  ]
}'

Qwen4 35B A3B FAQ

How much does Qwen4 35B A3B cost?

Qwen4 35B A3B costs $0.06 / 1M tokens for input and $0.36 / 1M tokens for output on AI/ML API. Cached input is billed at $0.003 / 1M tokens.

Which inputs does Qwen4 35B A3B accept?

It accepts text, image and video inputs. It returns text only.

How do I change how much the model reasons?

Use the reasoning effort option with low, medium or high. A lower value can result in faster responses and fewer reasoning tokens, so compare settings on your own prompts.

How long can a single response be?

The maximum output is 262,144 tokens. Streaming is supported if you want to read the text as it is generated.

Can it call tools and return structured output?

Yes. The model supports function calling, parallel tool calls and structured output. Check that returned arguments and fields match your schema before acting on them.

What is the Qwen4 35B A3B model ID?

Use alibaba/qwen4-35b-a3b as the model parameter. Requests go to the OpenAI-compatible endpoint with your AI/ML API key.

What is the context window of Qwen4 35B A3B?

Qwen4 35B A3B accepts up to 1,000,000 tokens of context and returns up to 262,144 output tokens.

Start building with Qwen4 35B A3B

Qwen4 35B A3B API

alibaba/qwen4-35b-a3b

Build with your agent

Give your agent the model details, code and documentation.

1Get your API key

Create API key
export AIMLAPI_KEY="8f2b4c7d9a1e6b3f…"

2Make your first request

curl 'https://api.aimlapi.com/v1/chat/completions' \
  -H "Authorization: Bearer $AIMLAPI_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "alibaba/qwen4-35b-a3b",
  "messages": [
    {
      "role": "user",
      "content": "Write a haiku about the ocean."
    }
  ]
}'