Qwen3.8 Max API

Model ID: qwen3.8-max

Alibaba's flagship multimodal model for complex coding, document analysis, and agents, with a 1M-token context window and configurable reasoning.

Coding · Reasoning ·

Capabilities

Context length
1000000 tokens
Max output
131072 tokens
  • Coding
  • Document analysis
  • Tool workflows
  • reasoning
  • streaming
  • function_calling
  • caching
  • vision
  • structured_output

API pricing

Model introduction

Qwen3.8 Max combines text, image, and video understanding with long-context reasoning. It is designed for demanding software engineering and professional knowledge work that requires planning and iteration across multiple steps.

Core strengths

Long-context work

Keep related code, specifications, and documents in a 1M-token context.

Application integration

Use function calls and structured output to connect reasoning with application workflows.

Multimodal understanding

Analyze visual material alongside text and reuse stable prompt prefixes through caching.

Use cases

Repository analysis, implementation planning, and code review

Work with related source files and project requirements across development tasks.

Multi-document research and structured information extraction

Extract or compare information across connected source documents.

Tool-using assistants and multi-step business workflows

Let an application execute model-requested tools and return results for the next step.

Specifications and limits

Input and output must fit the model context and the selected route limits. Visual inputs are used for understanding; this model generates text, not images or videos.

Getting started

Create a BulkToken API key

Sign in to BulkToken and open API Keys to create a key. Store it in the BULKTOKEN_API_KEY environment variable on your server.

Configure the API client

Use https://bulktoken.ai/v1 as the OpenAI SDK base URL and set model to qwen3.8-max. Authenticate with your BulkToken API key.

Send a request and inspect usage

Call POST /v1/chat/completions. Use stream: true for incremental output, then review the request and token usage in Usage Logs. Your key must have access to the selected model.

FAQ

Which model ID should I use?

Use qwen3.8-max in the model field.

Can it process images and video?

The model supports text, image, and video input and produces text. The accepted request format depends on the enabled BulkToken endpoint.

How much context and output does it support?

Alibaba documents a 1,000,000-token context and up to 131,072 output tokens. Input and output budgets must fit the request limits.

How are cached prompts priced?

The 20% discount uses the official International reference prices. Cache-read and cache-creation rates depend on the caching mode and reported usage; a repeated prompt alone does not guarantee a cache hit. See the Pricing section for current rates.

Can I use the OpenAI SDK?

Yes. Set base_url to https://bulktoken.ai/v1, use your BulkToken API key, and select qwen3.8-max.

Does function calling run tools automatically?

No. Your application executes the requested tool and sends its result back with the matching tool-call ID. Model-generated tool calls are instructions for your application, not completed actions.

Code examples

See [the Qwen3.8 Max integration guide](/docs/qwen3.8-max) for Python, Node.js, and cURL examples. Install openai for the Python example.

Python

import os
from openai import OpenAI

client = OpenAI(api_key=os.environ["BULKTOKEN_API_KEY"], base_url="https://bulktoken.ai/v1")
stream = client.chat.completions.create(
    model="qwen3.8-max",
    messages=[{"role": "user", "content": "Explain a hash table in one sentence."}],
    stream=True,
)
for chunk in stream:
    if chunk.choices and chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="", flush=True)

cURL

curl https://bulktoken.ai/v1/chat/completions \
  -H "Authorization: Bearer $BULKTOKEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "qwen3.8-max", "messages": [{"role": "user", "content": "Hello!"}], "stream": true}'