> ## Documentation Index
> Fetch the complete documentation index at: https://evolink.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Qwen3.8-Max-Preview - 完全パラメータドキュメント

> > 🚧 **このモデルはまだ利用できません。お楽しみに**

- OpenAI Chat Completions プロトコルで Qwen3.8-Max-Preview を呼び出します
- **複数ターン対話**：単一ターンまたは複数ターンのコンテキスト対話に対応
- **システムプロンプト**：`role=system` メッセージで AI の役割と動作を設定
- **マルチモーダル入力**：`content` に content part 配列を渡し、`text` / `image_url` / `input_audio` / `video_url` に対応
- **コンテキストキャッシュ**：content part に `cache_control` を付けて明示的キャッシュを宣言；ヒット状況は応答の `usage.prompt_tokens_details` を参照
- **思考モード**：`enable_thinking=true` で開始し、思考内容は `reasoning_content` で返します
- **ストリーミング出力**：`stream=true` の場合、SSE でチャンクごとに返します

<Note>
  **BaseURL について**：デフォルトの BaseURL は `https://direct.evolink.ai` で、テキストモデルへのサポートがより優れ、長時間接続に対応しています；`https://api.evolink.ai` はマルチモーダル主力アドレスで、画像 / 音声 / 動画入力を含む場合はこのアドレスを使用してください。
</Note>


## OpenAPI

````yaml ja/api-manual/language-series/qwen3.8-max-preview/qwen3.8-max-preview-chat.json POST /v1/chat/completions
openapi: 3.1.0
info:
  title: Qwen3.8-Max-Preview 完全パラメータドキュメント (OpenAI 互換)
  description: |-
    通義千問 Qwen3.8-Max-Preview 対話インターフェースの API リファレンス（OpenAI Chat Completions 互換）。

    **モデル能力**：
    - コンテキスト長：**1,000,000 tokens**（1M）
    - 思考モード：`enable_thinking` で開始し、思考内容は `reasoning_content` で返します
    - マルチモーダル入力：`content` はテキスト + 画像 / 音声 / 動画の混在に対応
    - コンテキストキャッシュ：明示的キャッシュ（`cache_control`）と暗黙的キャッシュに対応、ヒットするとコストを大幅に削減
    - ツール呼び出し：Function Calling に対応
    - ストリーミング出力：SSE ストリーミング返却に対応
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://direct.evolink.ai
    description: 本番環境（推奨、テキストモデルの長時間接続サポートがより優れています）
  - url: https://api.evolink.ai
    description: マルチモーダル主力アドレス（画像 / 音声 / 動画入力を含む場合に使用）
security:
  - bearerAuth: []
tags: []
paths:
  /v1/chat/completions:
    post:
      summary: Qwen3.8-Max-Preview 対話インターフェース（OpenAI 互換）
      description: >-
        > 🚧 **このモデルはまだ利用できません。お楽しみに**


        - OpenAI Chat Completions プロトコルで Qwen3.8-Max-Preview を呼び出します

        - **複数ターン対話**：単一ターンまたは複数ターンのコンテキスト対話に対応

        - **システムプロンプト**：`role=system` メッセージで AI の役割と動作を設定

        - **マルチモーダル入力**：`content` に content part 配列を渡し、`text` / `image_url` /
        `input_audio` / `video_url` に対応

        - **コンテキストキャッシュ**：content part に `cache_control`
        を付けて明示的キャッシュを宣言；ヒット状況は応答の `usage.prompt_tokens_details` を参照

        - **思考モード**：`enable_thinking=true` で開始し、思考内容は `reasoning_content` で返します

        - **ストリーミング出力**：`stream=true` の場合、SSE でチャンクごとに返します
      operationId: createChatCompletionQwen38MaxPreview
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChatCompletionRequest'
            examples:
              basic:
                summary: 基本的なテキスト対話
                value:
                  model: qwen3.8-max-preview
                  messages:
                    - role: system
                      content: You are a helpful assistant.
                    - role: user
                      content: こんにちは、自己紹介してください
              multimodal:
                summary: マルチモーダル入力（画像）
                value:
                  model: qwen3.8-max-preview
                  messages:
                    - role: user
                      content:
                        - type: text
                          text: この画像の内容を説明してください
                        - type: image_url
                          image_url:
                            url: https://example.com/image.jpg
              explicit_cache:
                summary: 明示的キャッシュ（cache_control）
                value:
                  model: qwen3.8-max-preview
                  messages:
                    - role: system
                      content:
                        - type: text
                          text: <1024 token を超える安定したシステムプロンプト……>
                          cache_control:
                            type: ephemeral
                    - role: user
                      content: 上記の背景に基づいて質問に答える
      responses:
        '200':
          description: 対話の生成に成功しました
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatCompletionResponse'
        '400':
          description: リクエストパラメータが不正です
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 400
                  message: Invalid request parameters
                  type: invalid_request_error
        '401':
          description: 未認証、トークンが無効または期限切れです
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 401
                  message: Invalid or expired token
                  type: authentication_error
        '402':
          description: 残高不足
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 402
                  message: Insufficient credits
                  type: insufficient_quota
        '429':
          description: リクエストが頻繁すぎます（レート制限）
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 429
                  message: Rate limit exceeded
                  type: rate_limit_error
        '500':
          description: サーバー内部エラー
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 500
                  message: Internal server error
                  type: server_error
components:
  schemas:
    ChatCompletionRequest:
      type: object
      required:
        - model
        - messages
      properties:
        model:
          type: string
          description: 対話モデル名
          enum:
            - qwen3.8-max-preview
          example: qwen3.8-max-preview
        messages:
          type: array
          description: >-
            対話メッセージのリスト、複数ターン対話に対応。ロール（system / user / assistant /
            tool）ごとにメッセージのフィールド構造が異なるため、対応するロールを選択して確認してください。
          items:
            oneOf:
              - $ref: '#/components/schemas/SystemMessage'
              - $ref: '#/components/schemas/UserMessage'
              - $ref: '#/components/schemas/AssistantRequestMessage'
              - $ref: '#/components/schemas/ToolMessage'
        enable_thinking:
          type: boolean
          description: |-
            深い思考を有効にするかどうか

            - `true`：モデルが思考過程を出力し、`reasoning_content` で返します
            - `false`（デフォルト）：思考過程を出力しません

            > 注：一部のモデルでは、非ストリーミング呼び出し時に明示的に `true` を設定しないと思考内容を返しません。
          default: false
        temperature:
          type: number
          description: >-
            サンプリング温度、出力のランダム性を制御します。低い値ほど確定的、高い値ほど多様になります。値の範囲は `[0,
            2]`。temperature と top_p を同時に調整しないことを推奨します。
          minimum: 0
          maximum: 2
        top_p:
          type: number
          description: >-
            核サンプリング（Nucleus Sampling）パラメータ、累積確率が上位の token からサンプリングします。値の範囲は `(0,
            1]`。temperature と top_p を同時に調整しないことを推奨します。
          minimum: 0
          maximum: 1
        max_completion_tokens:
          type: integer
          description: >-
            生成内容の長さの上限（Token
            数）、**思考の連鎖と回答を含みます**。思考系モデルではこのパラメータの使用を推奨します。デフォルト値と最大値はいずれもモデルの最大出力長です；超過すると
            `finish_reason=length` で早期停止します。
        max_tokens:
          type: integer
          description: >-
            旧版の生成長制限パラメータ。


            > **非推奨**：新規導入では `max_completion_tokens`
            を使用してください。このパラメータは回答部分のみを制限します（思考の連鎖は含みません）。
        stream:
          type: boolean
          description: |-
            応答をストリーミング方式で返すかどうか。

            - `true`：SSE（Server-Sent Events）でチャンクごとに返します
            - `false`（デフォルト）：完全な応答を一度に返します
          default: false
        stream_options:
          type: object
          description: ストリーミング応答オプション、`stream=true` の場合のみ有効です。
          properties:
            include_usage:
              type: boolean
              description: '`true` の場合、ストリーミング終了前に `usage` のみを含むデータブロックを追加で返します。'
        tools:
          type: array
          description: >-
            ツール定義のリスト、Function Calling に使用します。各ツールには名前、説明、パラメータ schema
            を定義する必要があります。
          items:
            $ref: '#/components/schemas/Tool'
    ChatCompletionResponse:
      type: object
      properties:
        id:
          type: string
          description: 今回の対話の一意の識別子
          example: chatcmpl-xxxxxxxx
        object:
          type: string
          example: chat.completion
        created:
          type: integer
          description: 作成時刻（Unix 秒）
          example: 1735120033
        model:
          type: string
          example: qwen3.8-max-preview
        choices:
          type: array
          items:
            $ref: '#/components/schemas/Choice'
        usage:
          $ref: '#/components/schemas/Usage'
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: integer
              description: HTTP ステータスエラーコード
            message:
              type: string
              description: エラーの説明
            type:
              type: string
              description: エラータイプ
            param:
              type: string
              description: 関連するパラメータ名
    SystemMessage:
      type: object
      title: System Message
      required:
        - role
        - content
      properties:
        role:
          type: string
          enum:
            - system
          description: メッセージのロール、固定で `system`
        content:
          description: システム指示。プレーンテキストの場合は文字列を渡します；明示的キャッシュを宣言する場合は content part 配列を渡します。
          oneOf:
            - type: string
            - type: array
              items:
                $ref: '#/components/schemas/ContentPart'
    UserMessage:
      type: object
      title: User Message
      required:
        - role
        - content
      properties:
        role:
          type: string
          enum:
            - user
          description: メッセージのロール、固定で `user`
        content:
          description: >-
            ユーザーメッセージの内容。


            - プレーンテキストの場合は直接文字列を渡します

            - マルチモーダルまたは明示的キャッシュが必要な場合は content part 配列を渡し、`text` / `image_url`
            / `input_audio` / `video_url` に対応します
          oneOf:
            - type: string
            - type: array
              items:
                $ref: '#/components/schemas/ContentPart'
    AssistantRequestMessage:
      type: object
      title: Assistant Message
      required:
        - role
      properties:
        role:
          type: string
          enum:
            - assistant
          description: メッセージのロール、固定で `assistant`
        content:
          description: アシスタントの過去の応答内容。文字列または content part 配列を指定できます。
          oneOf:
            - type: string
            - type: array
              items:
                $ref: '#/components/schemas/ContentPart'
        tool_calls:
          type: array
          description: 前のターンでアシスタントが開始したツール呼び出しのリスト（Function Calling 履歴を埋め戻すために使用）。
          items:
            type: object
    ToolMessage:
      type: object
      title: Tool Message
      required:
        - role
        - content
        - tool_call_id
      properties:
        role:
          type: string
          enum:
            - tool
          description: メッセージのロール、固定で `tool`（ツール実行結果）
        content:
          description: ツール実行結果の内容。文字列または content part 配列を指定できます。
          oneOf:
            - type: string
            - type: array
              items:
                $ref: '#/components/schemas/ContentPart'
        tool_call_id:
          type: string
          description: 対応するツール呼び出し ID
    Tool:
      type: object
      description: Function Calling ツール定義。
      required:
        - type
        - function
      properties:
        type:
          type: string
          enum:
            - function
          description: ツールタイプ、固定で `function`
        function:
          type: object
          required:
            - name
          properties:
            name:
              type: string
              description: 関数名
            description:
              type: string
              description: 関数の用途の説明
            parameters:
              type: object
              description: 関数パラメータの JSON Schema
    Choice:
      type: object
      properties:
        index:
          type: integer
          example: 0
        message:
          $ref: '#/components/schemas/AssistantMessage'
        finish_reason:
          type: string
          description: |-
            停止理由

            - `stop`：正常終了
            - `length`：`max_completion_tokens` の上限に到達
            - `tool_calls`：ツール呼び出しが必要
          example: stop
    Usage:
      type: object
      description: Token 使用統計情報。
      properties:
        prompt_tokens:
          type: integer
          description: 入力 token 数
          example: 3019
        completion_tokens:
          type: integer
          description: 出力 token 数（思考を含む）
          example: 104
        total_tokens:
          type: integer
          description: 合計 token 数
          example: 3123
        completion_tokens_details:
          type: object
          description: 出力 token の内訳
          properties:
            reasoning_tokens:
              type: integer
              description: 思考過程の token 数
              example: 0
        prompt_tokens_details:
          type: object
          description: 入力 token のキャッシュ内訳
          properties:
            cached_tokens:
              type: integer
              description: キャッシュにヒットした入力 token 数（キャッシュ読み取り）
              example: 2048
            cache_creation_input_tokens:
              type: integer
              description: 今回新規作成されたキャッシュの token 数（キャッシュ書き込み、明示的キャッシュ時に返却）
              example: 0
    ContentPart:
      type: object
      description: >-
        マルチモーダルコンテンツ片、`type` でタイプを宣言し、そのタイプに一致するフィールドのみを入力します。任意の片に
        `cache_control` を付けて明示的キャッシュを宣言できます。
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - text
            - image_url
            - input_audio
            - video_url
          description: |-
            コンテンツタイプ

            - `text`：テキストブロック
            - `image_url`：画像入力
            - `input_audio`：音声入力
            - `video_url`：動画ファイル入力
        text:
          type: string
          description: '`type=text` のときのテキスト内容'
        image_url:
          type: object
          description: 画像入力（`type=image_url` のとき）。JPEG / PNG / GIF / WEBP に対応。
          required:
            - url
          properties:
            url:
              type: string
              description: 画像 URL、または `data:` で始まる base64 data URL
            detail:
              type: string
              description: |-
                画像解析精度

                - `low`：低精度、消費 token がより少ない
                - `high`：高精度、より細かく認識
                - `auto`（デフォルト）：モデルが自動的に決定
              enum:
                - low
                - high
                - auto
              default: auto
        input_audio:
          type: object
          description: 音声入力（`type=input_audio` のとき）。
          required:
            - data
            - format
          properties:
            data:
              type: string
              description: 音声 URL、または `data:` で始まる base64 data URL
            format:
              type: string
              description: 音声形式、`mp3`、`wav` など
        video_url:
          type: object
          description: 動画ファイル入力（`type=video_url` のとき）。
          required:
            - url
          properties:
            url:
              type: string
              description: 動画ファイル URL、または `data:` で始まる base64 data URL
        cache_control:
          type: object
          description: |-
            明示的キャッシュマーク。システムはこのマーク位置を終点として前方に遡ってキャッシュブロックを作成 / ヒットします。

            - 最小キャッシュ可能長は **1024 token**、有効期間は **5 分**（ヒット後にリセット）
            - 1 回のリクエストで最大 **4 個**のキャッシュマーク
            - 暗黙的キャッシュと排他的で、1 リクエストにつき 1 種類のみ適用

            ヒット / 作成状況は応答の `usage.prompt_tokens_details` を参照。
          required:
            - type
          properties:
            type:
              type: string
              enum:
                - ephemeral
              description: キャッシュタイプ、固定で `ephemeral`（5 分間の一時キャッシュ）
    AssistantMessage:
      type: object
      description: アシスタントの応答メッセージ。
      properties:
        role:
          type: string
          example: assistant
        content:
          type: string
          description: 応答本文
          example: こんにちは！私は通義千問 Qwen3.8-Max-Preview です。
        reasoning_content:
          type: string
          description: 思考過程の内容（`enable_thinking=true` のとき返却）
        tool_calls:
          type: array
          description: モデルが開始したツール呼び出しのリスト
          items:
            type: object
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: |-
        ##すべての API で Bearer Token 認証が必要です##

        **API キーの取得：**

        [API キー管理ページ](https://evolink.ai/dashboard/keys)で API キーを取得してください

        **リクエストヘッダーに追加：**
        ```
        Authorization: Bearer YOUR_API_KEY
        ```

````