---
title: "Qwen3.8-Max-Preview Chat API (OpenAI-Compatible)"
method: POST
path: "/v1/chat/completions"
---

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

`POST /v1/chat/completions`

> 🚧 **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

## Request body

- ChatCompletionRequest
  - `model` 'qwen3.8-max-preview', required — Chat model name
  - `messages` union[], required — List of conversation messages, supporting multi-turn conversations. Messages from different roles (system / user / assistant / tool) have different field structures; select the corresponding role to view details.
    - union
      - SystemMessage
        - `role` 'system', required — Message role, fixed to `system`
        - `content` union, required — System instruction. Pass a string for plain text; pass a content part array when declaring explicit caching.
          - string
          - ContentPart[]
            - `type` 'text' | 'image_url' | 'input_audio' | 'video_url', required — Content type - `text`: text block - `image_url`: image input - `input_audio`: audio input - `video_url`: video file input
            - `text` string — Text content when `type=text`
            - `image_url` object — Image input (when `type=image_url`). Supports JPEG / PNG / GIF / WEBP.
              - …
            - `input_audio` object — Audio input (when `type=input_audio`).
              - …
            - `video_url` object — Video file input (when `type=video_url`).
              - …
            - `cache_control` object — Explicit cache marker. The system uses this marker's position as the endpoint and traces backward to create / hit a cache block. - Minimum cacheable length **1024 tokens**, valid for **5 minutes** (reset on hit) - Up to **4** cache markers per request - Mutually exclusive with implicit caching; only one applies per request See `usage.prompt_tokens_details` in the response for hit / creation details.
              - …
      - UserMessage
        - `role` 'user', required — Message role, fixed to `user`
        - `content` union, required — User message content. - Pass a string directly for plain text - For multimodal input or explicit caching, pass a content part array supporting `text` / `image_url` / `input_audio` / `video_url`
          - string
          - ContentPart[]
            - `type` 'text' | 'image_url' | 'input_audio' | 'video_url', required — Content type - `text`: text block - `image_url`: image input - `input_audio`: audio input - `video_url`: video file input
            - `text` string — Text content when `type=text`
            - `image_url` object — Image input (when `type=image_url`). Supports JPEG / PNG / GIF / WEBP.
              - …
            - `input_audio` object — Audio input (when `type=input_audio`).
              - …
            - `video_url` object — Video file input (when `type=video_url`).
              - …
            - `cache_control` object — Explicit cache marker. The system uses this marker's position as the endpoint and traces backward to create / hit a cache block. - Minimum cacheable length **1024 tokens**, valid for **5 minutes** (reset on hit) - Up to **4** cache markers per request - Mutually exclusive with implicit caching; only one applies per request See `usage.prompt_tokens_details` in the response for hit / creation details.
              - …
      - AssistantRequestMessage
        - `role` 'assistant', required — Message role, fixed to `assistant`
        - `content` union — Assistant's historical reply content. Can be a string or a content part array.
          - string
          - ContentPart[]
            - `type` 'text' | 'image_url' | 'input_audio' | 'video_url', required — Content type - `text`: text block - `image_url`: image input - `input_audio`: audio input - `video_url`: video file input
            - `text` string — Text content when `type=text`
            - `image_url` object — Image input (when `type=image_url`). Supports JPEG / PNG / GIF / WEBP.
              - …
            - `input_audio` object — Audio input (when `type=input_audio`).
              - …
            - `video_url` object — Video file input (when `type=video_url`).
              - …
            - `cache_control` object — Explicit cache marker. The system uses this marker's position as the endpoint and traces backward to create / hit a cache block. - Minimum cacheable length **1024 tokens**, valid for **5 minutes** (reset on hit) - Up to **4** cache markers per request - Mutually exclusive with implicit caching; only one applies per request See `usage.prompt_tokens_details` in the response for hit / creation details.
              - …
        - `tool_calls` object[] — List of tool calls initiated by the assistant in the previous turn (used to backfill Function Calling history).
      - ToolMessage
        - `role` 'tool', required — Message role, fixed to `tool` (tool execution result)
        - `content` union, required — Tool execution result content. Can be a string or a content part array.
          - string
          - ContentPart[]
            - `type` 'text' | 'image_url' | 'input_audio' | 'video_url', required — Content type - `text`: text block - `image_url`: image input - `input_audio`: audio input - `video_url`: video file input
            - `text` string — Text content when `type=text`
            - `image_url` object — Image input (when `type=image_url`). Supports JPEG / PNG / GIF / WEBP.
              - …
            - `input_audio` object — Audio input (when `type=input_audio`).
              - …
            - `video_url` object — Video file input (when `type=video_url`).
              - …
            - `cache_control` object — Explicit cache marker. The system uses this marker's position as the endpoint and traces backward to create / hit a cache block. - Minimum cacheable length **1024 tokens**, valid for **5 minutes** (reset on hit) - Up to **4** cache markers per request - Mutually exclusive with implicit caching; only one applies per request See `usage.prompt_tokens_details` in the response for hit / creation details.
              - …
        - `tool_call_id` string, required — ID of the corresponding tool call
  - `enable_thinking` boolean — 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.
  - `temperature` number — 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_p` number — 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_tokens` integer — 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_tokens` integer — 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).
  - `stream` boolean — 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
  - `stream_options` object — Streaming response options, effective only when `stream=true`.
    - `include_usage` boolean — When `true`, returns an additional data chunk containing only `usage` before the stream ends.
  - `tools` Tool[] — List of tool definitions for Function Calling. Each tool must define a name, description, and parameter schema.
    - `type` 'web_search' | 'web_extractor' | 'code_interpreter' | 'function', required — Tool type
    - `name` string — Function name when `type=function`
    - `parameters` object — Parameter JSON Schema when `type=function`

## Response `200`

Conversation generated successfully

- ChatCompletionResponse
  - `id` string — Unique identifier for this conversation
  - `object` string
  - `created` integer — Creation time (Unix seconds)
  - `model` string
  - `choices` Choice[]
    - `index` integer
    - `message` AssistantMessage — Assistant reply message.
      - `role` string
      - `content` string — Reply body
      - `reasoning_content` string — Thinking process content (returned when `enable_thinking=true`)
      - `tool_calls` object[] — List of tool calls initiated by the model
    - `finish_reason` string — Stop reason - `stop`: normal completion - `length`: reached the `max_completion_tokens` limit - `tool_calls`: a tool call is required
  - `usage` Usage — Usage and billing information
    - `billing_rule` 'per_call' | 'per_token' | 'per_second' — Billing rule
    - `credits_reserved` number — Estimated credits to be consumed
    - `user_group` 'default' | 'vip' — User group category

## Other responses

- `400` — Invalid request parameters
- `401` — Unauthenticated, invalid or expired token
- `402` — Insufficient balance
- `429` — Too many requests (rate limited)
- `500` — Internal server error

---

[API](https://skmtc.dev/evolink/apis/get-credits-usage-api.md) · [All operations](https://skmtc.dev/evolink/apis/get-credits-usage-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/evolink/get-credits-usage-api/revisions/88edb0ec881f/schema)
