Qwen3 VL 235B A22B Thinking
Qwen3 VL 235B A22B Thinking is the reasoning-specialized edition of Alibaba Cloud's Qwen3-VL vision-language model, combining a multimodal context of 131.1K tokens with extended chain-of-thought traces for STEM reasoning, mathematical problem solving, and compositional visual analysis.
View API reference- Input and output price
- Prices from: Input $0.98, Output $3.95, Per 1M tokens
- 24h uptime
- Loading AI Gateway uptime
import { streamText } from 'ai'
const result = streamText({ model: 'alibaba/qwen3-vl-thinking', prompt: 'Why is the sky blue?'})Copy link to headingPlayground
Try out Qwen3 VL 235B A22B Thinking by Alibaba Cloud. Usage is billed to your team at API rates. Free users (those who haven't made a payment) get $5 of credits every 30 days.
Qwen3 VL 235B A22B Thinking
Copy link to headingProviders
Route requests across multiple providers. Copy a provider slug to set your preference. Visit the docs for more info. Using a provider means you agree to their terms, listed under Legal.
| Provider |
|---|
Copy link to headingUptime24 hours
Direct request success rate on AI Gateway and per-provider. Visit the docs for more info.
Copy link to headingThroughput24 hours
P50 throughput on live AI Gateway traffic, in tokens per second (TPS). Visit the docs for more info.
Copy link to headingLatency24 hours
P50 time to first token (TTFT) on live AI Gateway traffic, in milliseconds. View the docs for more info.
Getting started
Call Qwen3 VL 235B A22B Thinking through AI Gateway with the AI SDK generateText and streamText functions, or through the OpenAI Chat Completions, OpenAI Responses, and Anthropic Messages APIs by changing the base URL. AI Gateway authenticates the request and routes it to an available provider.
Install the AI SDK (pnpm add ai dotenv), create an API key from the API Keys page, and set it as AI_GATEWAY_API_KEY in your environment. Full setup is covered in the text generation quickstart.
import { generateText } from 'ai';import 'dotenv/config';
async function main() { const result = await generateText({ model: 'alibaba/qwen3-vl-thinking', prompt: 'Why is the sky blue?', });
console.log(result.text);}
main().catch(console.error);Top-level parameters
The same Qwen3 VL 235B A22B Thinking request in each API format AI Gateway supports.
import { generateText } from 'ai';import 'dotenv/config';
async function main() { const result = await generateText({ model: 'alibaba/qwen3-vl-thinking', system: 'You are a concise technical assistant.', prompt: 'Summarize the tradeoffs between static generation and SSR.', maxOutputTokens: 1024, });
console.log(result.text);}
main().catch(console.error);Standard parameters like prompt, messages, temperature, and tools work as documented in the AI SDK docs. These are the parameters with model-specific behavior.
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Model ID in the form creator/model, e.g. alibaba/qwen3-vl-thinking. AI Gateway routes the request to an available provider. |
maxOutputTokens | number | No | Hard cap on generated tokens. Qwen3 VL 235B A22B Thinking supports up to 32,768 output tokens. Reasoning tokens count toward this limit. |
reasoning | 'provider-default' | 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | No | Provider-agnostic reasoning effort, available in AI SDK 7 or later. Maps to the provider’s native reasoning configuration; reasoning settings under providerOptions take precedence when both are set. See the Reasoning section below. |
providerOptions | Record<string, JSONValue> | No | AI Gateway routing options under gateway, plus any provider-native options under the provider’s own namespace — see the table below. |
Input limits
| Input | Formats | Sources | Max count | Max size | Limits |
|---|---|---|---|---|---|
| Text | — | — | — | — | Prompt and response share the 131K-token context window |
| Image | — | URL, base64, Uint8Array | — | — | Sent as image parts in messages; counts as input tokens |
| — | URL, base64, Uint8Array | — | — | Sent as file parts in messages; counts as input tokens |
Provider options
Set AI Gateway routing options under providerOptions.gateway. For provider-specific options, pass them under the provider’s namespace as documented by the AI SDK.
Learn more in the AI SDK alibaba provider docs.
import { generateText } from 'ai';import 'dotenv/config';
async function main() { const result = await generateText({ model: 'alibaba/qwen3-vl-thinking', prompt: 'Why is the sky blue?', providerOptions: { gateway: { only: ['alibaba', 'novita'], }, }, });
console.log(result.text);}
main().catch(console.error);These AI Gateway routing options apply to every model. Provider-specific options pass through under the provider’s own namespace (for example providerOptions.anthropic) exactly as documented by the AI SDK.
| Parameter | Type | Required | Description |
|---|---|---|---|
providerOptions.gateway.only | string[] | No | Restrict routing to these provider slugs. Requests fail over only within the listed providers. |
providerOptions.gateway.order | string[] | No | Preferred provider order. Listed providers are tried first; unlisted providers remain available as fallbacks. |
providerOptions.gateway.sort | 'cost' | 'ttft' | 'tps' | No | Rank candidate providers by price, time to first token, or tokens per second instead of the default routing order. |
providerOptions.gateway.zeroDataRetention | boolean | No | Route only to providers with a zero-data-retention policy for this model. |
Routing across providers
AI Gateway serves the same model through multiple providers and fails over automatically. order expresses a preference while keeping every provider eligible; only is a hard allowlist — if none of the listed providers are available the request fails instead of falling back.
Options under a provider's own namespace (for example providerOptions.anthropic) are forwarded to that provider with the request. Providers ignore option namespaces that don't apply to them, so it is safe to set provider options alongside gateway routing options.
Reasoning
AI Gateway bridges reasoning across every API format. The AI SDK exposes a provider-agnostic top-level reasoning level (none, minimal, low, medium, high, or xhigh); the Chat Completions and Responses formats take the same effort under reasoning.effort; and the Anthropic Messages format uses a native thinking token budget. Whichever you send, the gateway maps it to the target model’s native configuration, converting between effort levels and token budgets as needed. Reasoning-related settings under providerOptions take full precedence over the top-level reasoning value and are never merged. Reasoning tokens typically count toward your output-token usage, though how they’re reported and billed varies by provider.
Learn more in the AI Gateway reasoning guide.
import { generateText } from 'ai';import 'dotenv/config';
async function main() { const result = await generateText({ model: 'alibaba/qwen3-vl-thinking', prompt: 'Explain the Monty Hall problem step by step.', reasoning: 'high', });
console.log(result.text);}
main().catch(console.error);Image input
Send images alongside text as message parts. Images count as input tokens.
import { generateText } from 'ai';import 'dotenv/config';
async function main() { const result = await generateText({ model: 'alibaba/qwen3-vl-thinking', messages: [ { role: 'user', content: [ { type: 'text', text: 'Describe this image.' }, { type: 'image', image: 'https://example.com/photo.jpg' }, ], }, ], });
console.log(result.text);}
main().catch(console.error);PDF input
Attach PDFs as file parts. Their contents count as input tokens.
import { generateText } from 'ai';import 'dotenv/config';
async function main() { const result = await generateText({ model: 'alibaba/qwen3-vl-thinking', messages: [ { role: 'user', content: [ { type: 'text', text: 'Summarize this document.' }, { type: 'file', mediaType: 'application/pdf', data: 'https://example.com/document.pdf', }, ], }, ], });
console.log(result.text);}
main().catch(console.error);Tool calling
Expose tools the model can call. Define each tool’s inputs with a Zod schema.
import { generateText, tool } from 'ai';import { z } from 'zod';import 'dotenv/config';
async function main() { const result = await generateText({ model: 'alibaba/qwen3-vl-thinking', prompt: 'What is the weather in San Francisco?', tools: { getWeather: tool({ description: 'Get the current weather for a location', inputSchema: z.object({ location: z.string() }), execute: async ({ location }) => ({ location, temperatureC: 18 }), }), }, });
console.log(result.text);}
main().catch(console.error);Copy link to headingAbout Qwen3 VL 235B A22B Thinking
Qwen3 VL 235B A22B Thinking is the reasoning-specialized counterpart to Qwen3-VL-Instruct. It shares the same foundational architecture, including DeepStack multi-level ViT fusion, enhanced interleaved MRoPE for spatial-temporal modeling, and text-based temporal alignment for video, but is tuned for long-horizon compositional reasoning. When Qwen3 VL 235B A22B Thinking encounters a question involving fine-grained visual detail, multi-step mathematical derivation, or causal inference across a sequence of images or video frames, it generates a visible chain-of-thought trace before committing to a final answer.
This reasoning orientation makes the Thinking variant particularly well-suited for STEM domains. Mathematical diagrams, physics problems presented with visual components, and scientific charts all benefit from a model that notices fine visual details (scale markings, axis labels, geometric relationships) and reasons about them systematically before producing a response. Qwen3 VL 235B A22B Thinking also applies compositional reasoning to multi-image inputs, for example, comparing experimental results across several scatter plots or identifying a trend across a sequence of microscopy images, where the answer can't be derived from any single visual element in isolation.
Like its Instruct counterpart, the Thinking variant operates over a context window of 131.1K tokens that accommodates interleaved text, images, and video. This combination of long multimodal context and extended reasoning depth enables applications such as detailed long-form video analysis where the model must both track temporal events and reason carefully about their relationships, or complex document-plus-figure analysis where diagrams and text must be jointly interpreted.
Copy link to headingWhat To Consider When Choosing a Provider
- Configuration: Thinking-mode multimodal responses can be long, confirm that your application's timeout configuration and streaming implementation handle extended generation sequences correctly before deploying to production.
- Zero Data Retention: Zero Data Retention is available for this model. It is offered on a per-provider and model basis. See the documentation for details.
- Authentication: AI Gateway authenticates requests using an API key or OIDC token. You do not need to manage provider credentials directly.
Copy link to headingWhen to Use Qwen3 VL 235B A22B Thinking
Best for
- Visual STEM problem solving: Physics diagrams, geometry figures, and chemistry structural formulas that combine visual input with mathematical or scientific reasoning
- Mathematical visual benchmarks: Tasks such as MathVista or MathVision where step-by-step derivation improves final accuracy
- Multi-image comparative analysis: Reasoning across several images simultaneously to reach a single conclusion
- Educational and tutoring applications: A visible reasoning chain helps learners understand how a visual problem is solved
- Scientific figure analysis: Research workflows that reason over data visualizations or microscopy images at expert-level detail
Consider alternatives when
- Basic visual instruction following: Use Qwen3-VL-Instruct for faster, lower-cost responses when extended reasoning is unnecessary
- Tight token and latency budgets: Thinking traces significantly increase both token usage and response time
- Text-only workloads: A text-only reasoning model is more cost-efficient when there's no visual content
- Simple OCR or extraction: Document extraction and GUI automation tasks don't require reasoning traces
Copy link to headingConclusion
Qwen3 VL 235B A22B Thinking brings extended chain-of-thought reasoning to multimodal inputs, a combination that is specifically valuable for visual STEM problems and compositional analysis tasks where surface-level pattern matching is insufficient. For teams building applications that must explain their visual reasoning or solve structured problems embedded in images and video, it provides a distinct capability over direct-answer vision models.
Copy link to headingFrequently Asked Questions
What makes Qwen3 VL 235B A22B Thinking different from Qwen3-VL-Instruct?
The Thinking variant is trained to produce extended chain-of-thought reasoning traces before its final answer. This improves accuracy on complex, multi-step visual problems but increases output token count and response time compared to the Instruct variant.
What kinds of visual STEM tasks benefit most from the thinking mode?
Problems that require reading numerical values from diagrams, applying formulas based on geometric relationships, interpreting multi-axis scientific charts, or reasoning about causality across multiple images benefit the most from step-by-step visual reasoning.
Does the model support the same modalities as the Instruct variant?
Yes. Both variants accept interleaved text, images, and video within a context window of 131.1K tokens. The difference is in the reasoning depth of the response, not the supported input types.
How does DeepStack improve reasoning accuracy on visual inputs?
DeepStack fuses feature maps from multiple Vision Transformer depth levels, combining coarse and fine-grained visual representations, so the language model has richer input when constructing a reasoning chain. This is especially valuable for tasks requiring precise spatial measurement or small-detail recognition within an image.
Can the Thinking variant handle long video inputs that require temporal reasoning?
Yes. Text-based temporal alignment grounds the model's understanding of when events occur in a video using explicit timestamp markers. Combined with the multimodal context window of 131.1K tokens, the model can reason about event sequences across extended video without losing temporal reference.
What benchmarks has this model been evaluated on?
The Qwen3-VL family reports strong benchmark scores on MMMU, MathVista, MathVision, and MMBench (the 235B-A22B model scored 89.3/88.9 on MMBench and 79.2 on RealWorldQA). Specific thinking-variant scores should be verified against Qwen's published technical report at https://arxiv.org/abs/2511.21631.
How should I set timeouts for this model in production?
Thinking-mode completions for complex visual reasoning problems can generate thousands of reasoning tokens before the final answer. Set your HTTP and streaming timeouts to accommodate generation times that may be several times longer than a comparable direct-answer request.
Your use is subject to Alibaba Cloud's Terms & Privacy Policies.