Qwen 3.8 API

Qwen 3.8 Max is Alibaba's flagship multimodal reasoning and agentic LLM. It understands video, images and text and returns text, optimized for coding, long-context tasks and autonomous workflows. Supports function calling, streaming and explicit thinking (reasoning) mode.
Context
1M tokens
Input
$2.6 / 1M
Output
$7.8 / 1M
Released
Jul 24, 2026

How to use Qwen 3.8 API

Install any OpenAI-compatible SDK, point it at api.aimlapi.com/v1, and set the model to alibaba/qwen3.8-max-preview.

import requests

r = requests.post(
   "https://api.aimlapi.com/v1/chat/completions",
   headers={"Authorization": "Bearer " + AIMLAPI_KEY},
   json={
       "model": "alibaba/qwen3.8-max-preview",
       "messages": [
           {"role": "user", "content": "Hello!"}
       ]
   },
)
print(r.json())

const r = await fetch("https://api.aimlapi.com/v1/chat/completions", {
 method: "POST",
 headers: {
   Authorization: `Bearer ${process.env.AIMLAPI_KEY}`,
   "Content-Type": "application/json",
 },
 body: JSON.stringify({
   model: "alibaba/qwen3.8-max-preview",
   messages: [{ role: "user", content: "Hello!" }]
 }),
});
console.log(await r.json());

curl -X POST https://api.aimlapi.com/v1/chat/completions \
-H "Authorization: Bearer $AIMLAPI_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"alibaba/qwen3.8-max-preview","messages":[{"role":"user","content":"Hello!"}]}'

OpenAI-compatible — swap the base URL and it works with your existing SDK.

Qwen 3.8 API Pricing

TypePrice
Input
$2.6 / 1M tokens
Output
$7.8 / 1M tokens

Qwen 3.8 vs other models

ModelInputOutputContextBest for
Qwen 3.8
This page
$2.6 / 1M
$7.8 / 1M
1M tokens
Multimodal reasoning + agents
$3.9 / 1M
$19.5 / 1M
1M tokens
Long-context, multimodal & agentic workflows
$0.65 / 1M
$3.9 / 1M
1.05M tokens
Reasoning + agents
$6.5 / 1M
$32.5 / 1M
1M tokens
Chat + assistants
$0.5655 / 1M
$1.131 / 1M
1M tokens
Reasoning + agents
$1.3 / 1M
$7.8 / 1M
1M tokens
Fast, high-volume tasks

Start building with Qwen 3.8

Get API Key
1000+ models, one API.