v1

latestOpenAPI 3.1.0MIT2026-07-2614271305.9 KB

Qwen3.8-Max-Preview Chat API (OpenAI-Compatible)

🚧 This model is not yet available, stay tuned

  • Call Qwen3.8-Max-Preview using the OpenAI Chat Completions protocol
  • Multi-turn conversation: supports single-turn or multi-turn contextual conversations
  • System prompt: set the AI's role and behavior via a role=system message
  • Multimodal input: pass a content part array in content, supporting text / image_url / input_audio / video_url
  • Context caching: add cache_control on a content part to declare explicit caching; see usage.prompt_tokens_details in the response for hit details
  • Thinking mode: enabled with enable_thinking=true, thinking content returned through reasoning_content
  • Streaming output: when stream=true, returned chunk by chunk via SSE
post/v1/chat/completions

Request body

model'qwen3.8-max-preview' required

Chat model name

enable_thinkingboolean

Whether to enable deep thinking

  • true: the model outputs its thinking process, returned through reasoning_content
  • false (default): does not output the thinking process

Note: some models require this to be explicitly set to true to return thinking content in non-streaming calls.

temperaturenumber

Sampling temperature, controls output randomness. Lower values are more deterministic, higher values more diverse. Range [0, 2]. It is recommended not to adjust temperature and top_p at the same time.

top_pnumber

Nucleus Sampling parameter, samples from the tokens within the top cumulative probability. Range (0, 1]. It is recommended not to adjust temperature and top_p at the same time.

max_completion_tokensinteger

Upper limit on the length of generated content (in tokens), including the chain of thought and the answer. Recommended for thinking models. The default and maximum values are both the model's maximum output length; once exceeded, generation stops early with finish_reason=length.

max_tokensinteger

Legacy generation length limit parameter.

Deprecated: new integrations should use max_completion_tokens instead. This parameter only limits the answer portion (excluding the chain of thought).

streamboolean

Whether to return the response in a streaming manner.

  • true: returned chunk by chunk via SSE (Server-Sent Events)
  • false (default): returns the full response at once

Example request

{
  "model": "qwen3.8-max-preview"
}

Response

Conversation generated successfully

idstring

Unique identifier for this conversation

objectstring
createdinteger

Creation time (Unix seconds)

modelstring

Example response

{
  "id": "chatcmpl-xxxxxxxx",
  "object": "chat.completion",
  "created": 1735120033,
  "model": "qwen3.8-max-preview",
  "choices": [
    {
      "message": {
        "role": "assistant",
        "content": "Hello! I am Tongyi Qwen3.8-Max-Preview."
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "billing_rule": "per_call",
    "credits_reserved": 5,
    "user_group": "default"
  }
}