AIREITER

AI Image

Grok Imagine Image 2.0Midjourney V8.1Midjourney V7Z-Image TurboKrea 2 TurboSeedream 5.0 Pro LayerizeQwen Image 3.0 ProMore

AI Video

HappyHorse 1.0HappyHorse 1.1Gemini Omni FlashFLUX 3 VideoKling v3 OmniVeo 3.1Veo 3.1 FastMore

LLM

MiniMax M3GLM 5.2Doubao Seed 2.1 TurboKimi K2.7 CodeDeepSeek V4 FlashDeepSeek V4 ProClaude Opus 5More
Coming soonaa
API DOCSPRICING
TEMPLATES
qwenText Chat

Qwen3.8 Max API — 1M Context, OpenAI-Compatible

Use the Qwen3.8 Max API via OpenAI-compatible Chat Completions and Responses. 1M context, PDF chat, per-call web search, and a live playground.

InputAIReiter $1.78 per 1M tokensOutputAIReiter $5.35 per 1M tokensCache readAIReiter $0.22 per 1M tokensCache creationAIReiter $2.23 per 1M tokensweb_searchAIReiter $0.0006 per callimage_searchAIReiter $0.0071 per callweb_search_imageAIReiter $0.0036 per call
Run with API
PlaygroundReadmeAPI

INPUT

imagefile[]
Optional input images sent alongside the prompt. Up to 5 files. Images are billed as input tokens.
1
2
3
4
5
6
7
8
9
10
11
12

Install the official OpenAI client — AIReiter speaks the same protocol, so only the base URL changes:

npm install openai

Set the AIREITER_API_KEY environment variable:

export AIREITER_API_KEY=<paste-your-key-here>

Point the client at AIReiter:

import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.AIREITER_API_KEY,
  baseURL: "https://aireiter.com/api/v1",
});

Run qwen3.8-max:

const response = await client.chat.completions.create({
    "model": "qwen3.8-max",
    "messages": [
      {
        "role": "user",
        "content": "Explain what an API rate limit is and how to handle a 429 response in code."
      }
    ],
    "max_tokens": 4096,
    "temperature": 1,
    "top_p": 1
  });

console.log(response);

Stream the response instead:

const stream = await client.chat.completions.create({
  ...{
    "model": "qwen3.8-max",
    "messages": [
      {
        "role": "user",
        "content": "Explain what an API rate limit is and how to handle a 429 response in code."
      }
    ],
    "max_tokens": 4096,
    "temperature": 1,
    "top_p": 1
  },
  stream: true,
});

for await (const event of stream) {
  console.log(event);
}

Install the official OpenAI client — AIReiter speaks the same protocol, so only the base URL changes:

pip install openai

Set the AIREITER_API_KEY environment variable:

export AIREITER_API_KEY=<paste-your-key-here>

Point the client at AIReiter:

import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["AIREITER_API_KEY"],
    base_url="https://aireiter.com/api/v1",
)

Run qwen3.8-max:

response = client.chat.completions.create(
      model = "qwen3.8-max",
      messages = [
        {
          role = "user",
          content = "Explain what an API rate limit is and how to handle a 429 response in code."
        }
      ],
      max_tokens = 4096,
      temperature = 1,
      top_p = 1
)

print(response)

Stream the response instead:

stream = client.chat.completions.create(
      model = "qwen3.8-max",
      messages = [
        {
          role = "user",
          content = "Explain what an API rate limit is and how to handle a 429 response in code."
        }
      ],
      max_tokens = 4096,
      temperature = 1,
      top_p = 1,
    stream=True,
)

for event in stream:
    print(event)

Set the AIREITER_API_KEY environment variable:

export AIREITER_API_KEY=<paste-your-key-here>

Run qwen3.8-max against AIReiter's API:

curl -s -X POST \
  -H "Authorization: Bearer $AIREITER_API_KEY" \
  -H "Content-Type: application/json" \
  "https://aireiter.com/api/v1/chat/completions" \
  -d '{
  "model": "qwen3.8-max",
  "messages": [
    {
      "role": "user",
      "content": "Explain what an API rate limit is and how to handle a 429 response in code."
    }
  ],
  "max_tokens": 4096,
  "temperature": 1,
  "top_p": 1
}'

Add "stream": true to the body to receive the response as server-sent events.

OUTPUT

Example

A rate limit caps how many requests an API accepts from you in a given window. Once you exceed it, the server stops doing work for you and answers 429 Too Many Requests instead.

Handling 429

  1. Read the Retry-After response header. When present it tells you exactly how long to wait, in seconds.
  2. When it is absent, back off exponentially with jitter so retries from many clients do not line up.
  3. Cap the number of retries, then surface the failure instead of looping forever.
async function withRetry(request, maxRetries = 4) {
  for (let attempt = 0; ; attempt++) {
    const response = await request();
    if (response.status !== 429 || attempt === maxRetries) return response;
    const retryAfter = Number(response.headers.get("retry-after"));
    const backoff = Number.isFinite(retryAfter) ? retryAfter * 1000 : 2 ** attempt * 500 + Math.random() * 250;
    await new Promise((resolve) => setTimeout(resolve, backoff));
  }
}

Treat the limit as a budget you plan around, not an error you retry your way out of: batch requests where you can, cache repeated reads, and spread bulk work over time.

{
  "model": "qwen3.8-max",
  "input": {
    "model": "qwen3.8-max",
    "messages": [
      {
        "role": "user",
        "content": "Explain what an API rate limit is and how to handle a 429 response in code."
      }
    ],
    "max_tokens": 4096,
    "temperature": 1,
    "top_p": 1
  },
  "output": "A rate limit caps how many requests an API accepts from you in a given window. Once you exceed it, the server stops doing work for you and answers **429 Too Many Requests** instead.\n\n## Handling 429\n\n1. Read the `Retry-After` response header. When present it tells you exactly how long to wait, in seconds.\n2. When it is absent, back off exponentially with jitter so retries from many clients do not line up.\n3. Cap the number of retries, then surface the failure instead of looping forever.\n\n```js\nasync function withRetry(request, maxRetries = 4) {\n  for (let attempt = 0; ; attempt++) {\n    const response = await request();\n    if (response.status !== 429 || attempt === maxRetries) return response;\n    const retryAfter = Number(response.headers.get(\"retry-after\"));\n    const backoff = Number.isFinite(retryAfter) ? retryAfter * 1000 : 2 ** attempt * 500 + Math.random() * 250;\n    await new Promise((resolve) => setTimeout(resolve, backoff));\n  }\n}\n```\n\nTreat the limit as a budget you plan around, not an error you retry your way out of: batch requests where you can, cache repeated reads, and spread bulk work over time.",
  "metrics": {
    "input_tokens": 26,
    "output_tokens": 214,
    "generated_in_seconds": 4.1
  },
  "example": true
}
Generated in
4.1 seconds
Input tokens
26
Output tokens
214
Tokens per second
52.20 tokens / second
Time to first token
-

Model details

Use the same model key in Playground, API requests, and internal workflows.

Model ID
qwen3.8-max
Provider
qwen
Protocol
OpenAI Chat Completions · OpenAI Responses
Context window
1,000,000 tokens
Max output
131,072 tokens
Input tokens
178.2857 credits / 1M tokens
Output tokens
534.8571 credits / 1M tokens
Cache read
22.2857 credits / 1M tokens
Cache write
222.8571 credits / 1M tokens
web_search
0.0594 credits / call
image_search
0.7131 credits / call
web_search_image
0.3566 credits / call

What the Qwen3.8 Max API can do

Qwen3.8 Max is Alibaba's long-context chat model. On AIReiter the public model id is qwen3.8-max.

1M context window

About 1 million input tokens and up to 131,072 output tokens. Long documents, multi-file chat, and extended threads fit in one request.

OpenAI-compatible Chat Completions

POST /api/v1/chat/completions with the same messages, temperature, and stream fields used by OpenAI SDKs. This is the default path for dialogue.

PDF and image chat

Attach a public file URL in messages[].content as type file. PDF is not a billed tool; it is charged through tokens only.

Built-in tools on Responses

POST /api/v1/responses for web_search, web_search_image, and image_search. The JSON usage.x_tools object reports how many times each tool ran.

Qwen3.8 Max API pricing

Live token and tool rates are on https://aireiter.com/pricing. The figures on this page update from the model database.

Token billing

Input, output, cache read, and cache write each have their own price per 1M tokens. The playground on this page shows the current AIReiter rates next to official list prices.

Built-in tools billed per call

web_search, web_search_image, and image_search add a per-call fee on top of tokens. web_extractor and code_interpreter are priced at zero and do not add credits.

How to estimate credits

Credits = token fees + tool count x per-call price. If you only multiply tokens by token prices, the total will be short whenever usage.x_tools has a count greater than zero.

Qwen3.8 Max API examples

Replace YOUR_API_KEY with a key from https://aireiter.com/keys. Full protocol notes: https://docs.aireiter.com/en/overview

Chat Completions

curl https://aireiter.com/api/v1/chat/completions \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"qwen3.8-max","messages":[{"role":"user","content":"Hello"}]}'

Responses with web_search

curl https://aireiter.com/api/v1/responses \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"qwen3.8-max","input":"What happened today?","tools":[{"type":"web_search"}]}'

How to call the Qwen3.8 Max API

Use model id qwen3.8-max. Chat Completions for dialogue and PDF; Responses when you need built-in tools.

01

Create an API key

Sign in and create a key at https://aireiter.com/keys. Send it as Authorization: Bearer.

02

Start with Chat Completions

POST /api/v1/chat/completions for ordinary chat and PDF. Keep stream true if you want tokens as they generate.

03

Add tools on Responses

POST /api/v1/responses with tools such as {"type":"web_search"}. Read usage.x_tools in the response, then check https://aireiter.com/pricing for the per-call rate.

Qwen3.8 Max API FAQ

/ 01

What is the Qwen3.8 Max API?

It is Alibaba's Qwen3.8 Max chat model served through AIReiter. You call it with the public model id qwen3.8-max over OpenAI-compatible HTTP, or try it in the playground on this page.

/ 02

Is the Qwen3.8 Max API OpenAI compatible?

Yes. Chat Completions is POST /api/v1/chat/completions. Built-in tools use POST /api/v1/responses. OpenAI SDKs work if you set the base URL to https://aireiter.com/api/v1 and the model to qwen3.8-max.

/ 03

How much does the Qwen3.8 Max API cost?

You pay token prices for input, output, and cache, plus a per-call fee when web_search, web_search_image, or image_search runs. Current rates are on https://aireiter.com/pricing and in the price row at the top of this page.

/ 04

What is the Qwen3.8 Max context window?

About 1 million input tokens. Maximum output is 131,072 tokens per request.

/ 05

How do I use web search with Qwen3.8 Max?

Use the Responses API, not Chat Completions. Send tools: [{"type":"web_search"}] (or web_search_image / image_search). The response usage.x_tools field shows the billed call count.

/ 06

Does PDF chat cost extra on Qwen3.8 Max?

No extra per-page fee. Put a public PDF URL in Chat Completions messages as type file. Billing stays on tokens. Built-in search tools are the items that add a per-call charge.

AIREITER

Questions? Contact us at
support@aireiter.com

新速率有限公司NEWRATE LIMITED香港九龍花園街 2-16 號好景商業中心 2304 室Room 2304, Haojing Commercial Center, 2-16 Garden Street, Kowloon, Hong Kong

LLM

MiniMax M3GLM 5.2Doubao Seed 2.1 TurboKimi K2.7 CodeDeepSeek V4 Flash

AI Video

HappyHorse 1.0HappyHorse 1.1Gemini Omni FlashFLUX 3 VideoKling v3 Omni

AI Image

Grok Imagine Image 2.0Midjourney V8.1Midjourney V7Z-Image TurboKrea 2 Turbo

Blog

View All →

Company

Privacy PolicyTerms of ServiceRefund Policy

© 2026 AIReiter. All rights reserved.