> ## 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.

# DeepSeek V4 - OpenAI 互換インターフェース

> - OpenAI Chat Completions プロトコルを使用して DeepSeek V4 モデルを呼び出し
- `deepseek-v4-flash`（高速汎用）と `deepseek-v4-pro`（深度推論）の 2 つのモデルをサポート
- **テキスト会話**：シングルまたはマルチターンのコンテキスト対話、1M の超長コンテキストをサポート
- **システムプロンプト**：AI の役割と動作をカスタマイズ
- **思考モード**：`thinking.type` で深度推論を制御；`deepseek-v4-pro` の思考内容は `reasoning_content` で返されます
- **ストリーミング出力**：SSE ストリーミング返却をサポート
- **ツール呼び出し**：Function Calling をサポート（最大 128 ツール）
- **JSON モード**：`response_format` で有効化
- **コンテキストキャッシュ**：同一プレフィックスのリクエストは自動的にキャッシュにヒットし、入力コストを大幅に削減

<Note>
  **BaseURL**：デフォルトの BaseURL は `https://direct.evolink.ai` で、テキストモデルへの対応が優れており、長時間接続をサポートします。`https://api.evolink.ai` はマルチモーダルの主力エンドポイントで、テキストモデルに対しては代替アドレスとして使用されます。
</Note>


## OpenAPI

````yaml ja/api-manual/language-series/deepseek-v4/deepseek-v4-chat.json POST /v1/chat/completions
openapi: 3.1.0
info:
  title: DeepSeek V4 完全パラメータドキュメント (OpenAI 互換)
  description: >-
    DeepSeek V4 シリーズ会話インターフェース（`deepseek-v4-flash` / `deepseek-v4-pro`）の完全な API
    リファレンス。


    **モデル機能**：

    - コンテキスト長：**1,000,000 tokens**（1M）

    - 最大出力：**384,000 tokens**（384K）

    - 思考モード：`thinking` フィールドで切替、`deepseek-v4-pro` は複雑な推論が得意

    - コンテキストディスクキャッシュ：自動ヒット、ヒットとミスは別々に課金


    **課金区分（UC/1K tokens、EvoLink 内部単位）**：

    | モデル | 入力キャッシュヒット | 入力キャッシュミス | 出力 |

    | --- | --- | --- | --- |

    | deepseek-v4-flash | 20 | 100 | 200 |

    | deepseek-v4-pro | 100 | 1200 | 2400 |
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://direct.evolink.ai
    description: 本番環境（推奨）
  - url: https://api.evolink.ai
    description: 代替 URL
security:
  - bearerAuth: []
tags:
  - name: チャット補完
    description: AI 会話生成関連インターフェース
paths:
  /v1/chat/completions:
    post:
      tags:
        - チャット補完
      summary: DeepSeek V4 会話インターフェース（OpenAI 互換）
      description: >-
        - OpenAI Chat Completions プロトコルを使用して DeepSeek V4 モデルを呼び出し

        - `deepseek-v4-flash`（高速汎用）と `deepseek-v4-pro`（深度推論）の 2 つのモデルをサポート

        - **テキスト会話**：シングルまたはマルチターンのコンテキスト対話、1M の超長コンテキストをサポート

        - **システムプロンプト**：AI の役割と動作をカスタマイズ

        - **思考モード**：`thinking.type` で深度推論を制御；`deepseek-v4-pro` の思考内容は
        `reasoning_content` で返されます

        - **ストリーミング出力**：SSE ストリーミング返却をサポート

        - **ツール呼び出し**：Function Calling をサポート（最大 128 ツール）

        - **JSON モード**：`response_format` で有効化

        - **コンテキストキャッシュ**：同一プレフィックスのリクエストは自動的にキャッシュにヒットし、入力コストを大幅に削減
      operationId: createChatCompletionDeepSeekV4
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChatCompletionRequest'
            examples:
              simple_text:
                summary: シングルターンテキスト会話（Flash）
                value:
                  model: deepseek-v4-flash
                  messages:
                    - role: user
                      content: 自己紹介をお願いします
              multi_turn:
                summary: マルチターン会話（コンテキスト理解）
                value:
                  model: deepseek-v4-flash
                  messages:
                    - role: user
                      content: Python とは何ですか？
                    - role: assistant
                      content: Python は高水準プログラミング言語です...
                    - role: user
                      content: どのような利点がありますか？
              system_prompt:
                summary: システムプロンプトの使用
                value:
                  model: deepseek-v4-flash
                  messages:
                    - role: system
                      content: あなたはプロの Python プログラミングアシスタントです。簡潔な言葉で質問に答えてください。
                    - role: user
                      content: ファイルの読み込み方法は？
              thinking_mode:
                summary: Pro モデル + 思考モードを明示的に有効化
                value:
                  model: deepseek-v4-pro
                  thinking:
                    type: enabled
                    reasoning_effort: high
                  messages:
                    - role: user
                      content: √2 が無理数であることを証明してください
              disable_thinking:
                summary: 思考モードを無効化（直接回答のみ）
                value:
                  model: deepseek-v4-pro
                  thinking:
                    type: disabled
                  messages:
                    - role: user
                      content: フランスの首都はどこですか？
              json_mode:
                summary: JSON モード構造化出力
                value:
                  model: deepseek-v4-flash
                  response_format:
                    type: json_object
                  messages:
                    - role: system
                      content: 厳密な JSON を出力する必要があります。
                    - role: user
                      content: name と age フィールドを含むサンプル JSON をください
              tool_calling:
                summary: Function Calling ツール呼び出し
                value:
                  model: deepseek-v4-flash
                  messages:
                    - role: user
                      content: 今日の北京の天気を調べてください
                  tools:
                    - type: function
                      function:
                        name: get_weather
                        description: 指定された都市の天気を照会します
                        parameters:
                          type: object
                          properties:
                            city:
                              type: string
                              description: 都市名
                          required:
                            - city
                  tool_choice: auto
              streaming:
                summary: ストリーミング出力
                value:
                  model: deepseek-v4-flash
                  stream: true
                  stream_options:
                    include_usage: true
                  messages:
                    - role: user
                      content: 春についての短い詩を書いてください
      responses:
        '200':
          description: 会話生成成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatCompletionResponse'
              examples:
                thinking_disabled:
                  summary: thinking 無効（テキストのみの応答）
                  value:
                    id: 837f529d-00f9-4731-b2e1-4a54fc31790a
                    object: chat.completion
                    created: 1777026806
                    model: deepseek-v4-flash
                    choices:
                      - index: 0
                        message:
                          role: assistant
                          content: こんにちは！私は DeepSeek アシスタントです。いつでもご質問にお答えし、お手伝いします。
                        logprobs: null
                        finish_reason: stop
                    usage:
                      prompt_tokens: 7
                      completion_tokens: 31
                      total_tokens: 38
                      prompt_tokens_details:
                        cached_tokens: 0
                      prompt_cache_hit_tokens: 0
                      prompt_cache_miss_tokens: 7
                    system_fingerprint: fp_evolink_v4_20260402
                thinking_enabled:
                  summary: thinking 有効（reasoning_content を含む）
                  value:
                    id: 658083bb-1137-49d2-8c4d-900e508cbd53
                    object: chat.completion
                    created: 1777026807
                    model: deepseek-v4-flash
                    choices:
                      - index: 0
                        message:
                          role: assistant
                          content: フランスの首都は**パリ**です。
                          reasoning_content: ユーザーは「フランスの首都は？」と尋ねています。一般常識の質問なので、「パリ」と直接答えればよいです。
                        logprobs: null
                        finish_reason: stop
                    usage:
                      prompt_tokens: 7
                      completion_tokens: 53
                      total_tokens: 60
                      prompt_tokens_details:
                        cached_tokens: 0
                      completion_tokens_details:
                        reasoning_tokens: 45
                      prompt_cache_hit_tokens: 0
                      prompt_cache_miss_tokens: 7
                    system_fingerprint: fp_evolink_v4_20260402
                cache_hit:
                  summary: コンテキストキャッシュヒット（大量の cache_hit_tokens）
                  value:
                    id: 3e4a1b70-8c59-4b22-a011-9f2c7d5a3e88
                    object: chat.completion
                    created: 1777026900
                    model: deepseek-v4-flash
                    choices:
                      - index: 0
                        message:
                          role: assistant
                          content: こんにちは！
                        logprobs: null
                        finish_reason: stop
                    usage:
                      prompt_tokens: 694
                      completion_tokens: 10
                      total_tokens: 704
                      prompt_tokens_details:
                        cached_tokens: 640
                      prompt_cache_hit_tokens: 640
                      prompt_cache_miss_tokens: 54
                    system_fingerprint: fp_evolink_v4_20260402
        '400':
          description: リクエストパラメータエラー
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 400
                  message: Invalid request parameters
                  type: invalid_request_error
        '401':
          description: 未認証、Token が無効または期限切れ
          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 quota
                  type: insufficient_quota_error
        '403':
          description: このモデルへのアクセス権限がありません
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 403
                  message: Access denied for this model
                  type: permission_error
                  param: model
        '404':
          description: リソースが存在しません
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 404
                  message: Specified model not found
                  type: not_found_error
                  param: model
        '413':
          description: リクエストボディが大きすぎる
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 413
                  message: Request body too large
                  type: request_too_large_error
                  param: messages
        '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: internal_server_error
        '502':
          description: ゲートウェイエラー
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 502
                  message: Bad gateway
                  type: bad_gateway_error
        '503':
          description: サービスが一時的に利用できません
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 503
                  message: Service temporarily unavailable
                  type: service_unavailable_error
components:
  schemas:
    ChatCompletionRequest:
      type: object
      required:
        - model
        - messages
      properties:
        model:
          type: string
          description: >-
            会話モデル名


            - `deepseek-v4-flash`：高速汎用モデル、1M コンテキスト

            - `deepseek-v4-pro`：深度推論モデル、数学、プログラミング、複雑なロジックが得意


            **ヒント**：両モデルは **`thinking` がデフォルトで有効** であり、レスポンスには
            `reasoning_content` が含まれます。`thinking.type="disabled"` で無効化すると出力
            token コストを削減できます。両モデルのパラメータは完全に同一です。
          enum:
            - deepseek-v4-flash
            - deepseek-v4-pro
          default: deepseek-v4-flash
          example: deepseek-v4-flash
        messages:
          type: array
          description: |-
            会話メッセージリスト、マルチターン会話をサポート

            役割ごとにメッセージのフィールド構造が異なるため、該当する役割を選択して確認してください
          items:
            oneOf:
              - $ref: '#/components/schemas/SystemMessage'
              - $ref: '#/components/schemas/UserMessage'
              - $ref: '#/components/schemas/AssistantRequestMessage'
              - $ref: '#/components/schemas/ToolMessage'
            discriminator:
              propertyName: role
              mapping:
                system:
                  $ref: '#/components/schemas/SystemMessage'
                user:
                  $ref: '#/components/schemas/UserMessage'
                assistant:
                  $ref: '#/components/schemas/AssistantRequestMessage'
                tool:
                  $ref: '#/components/schemas/ToolMessage'
          minItems: 1
        thinking:
          type: object
          description: >-
            思考モード制御（V4 新機能）


            **説明**：

            - 深度思考（Chain of Thought）機能を制御するために使用

            - **両モデルともデフォルトで有効**（`type=enabled`）

            - 有効時、推論過程は `choices[].message.reasoning_content` で返され、出力 token
            として課金されます


            ⚠️ **マルチターン会話 / ツール呼び出しの注意**：本ターンのレスポンスに `reasoning_content`
            が含まれている場合、**次のリクエストの `messages` 履歴の該当 assistant
            メッセージでこのフィールドをそのまま返送する必要があります**。さもないと API は 400 `The
            reasoning_content in the thinking mode must be passed back to the
            API` を返します。処理したくない場合は、セッション全体で明示的に `thinking.type="disabled"`
            を指定できます。
          properties:
            type:
              type: string
              description: |-
                思考モードスイッチ

                - `enabled`：深度思考を有効化（デフォルト）
                - `disabled`：深度思考を無効化、モデルは直接回答
              enum:
                - enabled
                - disabled
              default: enabled
            reasoning_effort:
              type: string
              description: |-
                推論努力度

                - `low`：低努力、レスポンスがより高速、reasoning_tokens がより少ない
                - `medium`：中程度の努力（デフォルト）
                - `high`：高努力、より徹底的な思考過程、より多くの reasoning_tokens を消費
              enum:
                - low
                - medium
                - high
              default: medium
        temperature:
          type: number
          description: |-
            サンプリング温度、出力のランダム性を制御

            **説明**：
            - 低い値（例：0.2）：より確定的で集中した出力
            - 高い値（例：1.5）：よりランダムで創造的な出力
            - デフォルト値：1
          minimum: 0
          maximum: 2
          default: 1
          example: 1
        top_p:
          type: number
          description: |-
            核サンプリング（Nucleus Sampling）パラメータ

            **説明**：
            - 累積確率の上位何％の token からサンプリングするかを制御
            - 例：0.9 は累積確率が 90% に達する token から選択
            - デフォルト値：1.0（すべての token を考慮）

            **推奨**：temperature と top_p を同時に調整しないでください
          minimum: 0
          maximum: 1
          default: 1
          example: 1
        max_tokens:
          type: integer
          description: |-
            生成するコンテンツの最大 token 数を制限

            **説明**：
            - V4 シリーズは最大 **384,000 tokens** まで可能
            - thinking 有効時、reasoning_tokens も max_tokens の上限に含まれます
            - 未設定の場合、モデル自身が生成長さを決定
          minimum: 1
          maximum: 384000
          example: 4096
        frequency_penalty:
          type: number
          description: |-
            頻度ペナルティパラメータ、繰り返し内容を減らすため

            **説明**：
            - 正の値は、生成済みテキストで出現した token の頻度に基づいてペナルティを与えます
            - 値が大きいほど、既出の内容を繰り返しにくくなります
            - デフォルト値：0（ペナルティなし）
          minimum: -2
          maximum: 2
          default: 0
          example: 0
        presence_penalty:
          type: number
          description: |-
            存在ペナルティパラメータ、新しいトピックの生成を促進するため

            **説明**：
            - 正の値は、token がテキストに既出かどうかに基づいてペナルティを与えます
            - 値が大きいほど、新しいトピックを議論する傾向が強くなります
            - デフォルト値：0（ペナルティなし）
          minimum: -2
          maximum: 2
          default: 0
          example: 0
        response_format:
          type: object
          description: |-
            レスポンスフォーマットを指定

            **説明**：
            - `{"type": "json_object"}` に設定すると JSON モードを有効化
            - JSON モード下、モデルは有効な JSON 形式のコンテンツを出力します
            - 最適な効果を得るため、system または user メッセージで JSON 出力を明示的に要求することを推奨
          properties:
            type:
              type: string
              enum:
                - text
                - json_object
              description: レスポンスフォーマットタイプ
              default: text
        stop:
          description: |-
            停止シーケンス、モデルがこれらの文字列に遭遇すると生成を停止

            **説明**：
            - 単一文字列または文字列配列を指定可能
            - 最大 16 個の停止シーケンスをサポート
          oneOf:
            - type: string
            - type: array
              items:
                type: string
              maxItems: 16
        stream:
          type: boolean
          description: |-
            ストリーミング方式でレスポンスを返すかどうか

            - `true`：ストリーミング返却、SSE（Server-Sent Events）を通じてチャンクごとにリアルタイムでコンテンツを返す
            - `false`：完全なレスポンスを待ってから一度に返す（デフォルト）
          default: false
          example: false
        stream_options:
          type: object
          description: |-
            ストリーミングレスポンスオプション

            `stream=true` の場合のみ有効
          properties:
            include_usage:
              type: boolean
              description: ストリーミング終了時に usage 統計情報を返す（キャッシュ分項を含む）
        tools:
          type: array
          description: |-
            ツール定義リスト、Function Calling に使用

            **説明**：
            - 最大 128 個のツール定義をサポート
            - 各ツールには名前、説明、パラメータ schema を定義する必要があります
          items:
            $ref: '#/components/schemas/Tool'
          maxItems: 128
        tool_choice:
          description: >-
            ツール呼び出し動作を制御


            **選択可能な値**：

            - `none`：いかなるツールも呼び出さない

            - `auto`：モデルが自動的にツール呼び出しを決定（tools 提供時のデフォルト）

            - `required`：モデルに 1 つ以上のツールを強制的に呼び出させる

            - オブジェクト形式
            `{"type":"function","function":{"name":"xxx"}}`：特定のツール呼び出しを指定


            **デフォルト値**：tools を提供しない場合は `none`、提供する場合は `auto`
          oneOf:
            - type: string
              enum:
                - none
                - auto
                - required
            - type: object
              description: 特定のツール呼び出しを指定
              properties:
                type:
                  type: string
                  enum:
                    - function
                function:
                  type: object
                  properties:
                    name:
                      type: string
                      description: 呼び出す関数名
                  required:
                    - name
        logprobs:
          type: boolean
          description: |-
            token の対数確率を返すかどうか

            **説明**：
            - `true` に設定すると、レスポンスに各 token の対数確率情報が含まれます
          default: false
        top_logprobs:
          type: integer
          description: |-
            確率の最も高い上位 N 個の token の対数確率を返す

            **説明**：
            - `logprobs` を `true` に設定する必要があります
            - 値の範囲：`[0, 20]`
          minimum: 0
          maximum: 20
        logit_bias:
          type: object
          description: |-
            Token バイアスマッピング

            **説明**：
            - キーは tokenizer 中の token ID、値は -100 から 100 の間のバイアス値
            - -100 はその token を完全に禁止、100 は強制生成
            - 典型的な値の範囲 -1 から 1 でも観測可能な影響を及ぼします
          additionalProperties:
            type: number
            minimum: -100
            maximum: 100
        'n':
          type: integer
          description: |-
            各入力メッセージに対して生成するチャット補完オプションの数

            **説明**：
            - デフォルト 1；N に設定すると N 個の候補が返されます（N × output_tokens で課金）
          minimum: 1
          maximum: 8
          default: 1
          example: 1
        seed:
          type: integer
          description: |-
            ランダムシード（Beta）

            **説明**：
            - 指定するとモデルは確定的サンプリングを試みます
            - 同じ seed + 同じ他のパラメータ → 同じ出力（100% の保証ではない）
        user:
          type: string
          description: |-
            エンドユーザーを表す一意の識別子

            **説明**：
            - プラットフォームの悪用監視と検出に役立ちます
            - ハッシュ化されたユーザー ID の使用を推奨
    ChatCompletionResponse:
      type: object
      properties:
        id:
          type: string
          description: 会話補完の一意識別子
          example: 53c548dc-ec02-4a2f-bbb6-eca4184630b8
        model:
          type: string
          description: 実際に使用されたモデル名
          example: deepseek-v4-flash
        object:
          type: string
          enum:
            - chat.completion
          description: レスポンスタイプ
          example: chat.completion
        created:
          type: integer
          description: 作成タイムスタンプ（Unix 秒）
          example: 1777021417
        choices:
          type: array
          description: 会話生成の選択肢リスト
          items:
            $ref: '#/components/schemas/Choice'
        usage:
          $ref: '#/components/schemas/Usage'
        system_fingerprint:
          type: string
          description: システム指紋識別子
          example: fp_evolink_v4_20260402
    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:
      title: System Message
      type: object
      required:
        - role
        - content
      properties:
        role:
          type: string
          enum:
            - system
          description: 役割識別子、固定値 `system`
        content:
          type: string
          description: システムプロンプト内容、AI の役割と動作を設定するために使用
        name:
          type: string
          description: 参加者名、異なるシステムプロンプトの送信元を区別するために使用
    UserMessage:
      title: User Message
      type: object
      required:
        - role
        - content
      properties:
        role:
          type: string
          enum:
            - user
          description: 役割識別子、固定値 `user`
        content:
          type: string
          description: ユーザーメッセージ内容（プレーンテキスト文字列）
        name:
          type: string
          description: 参加者名、異なるユーザーを区別するために使用
    AssistantRequestMessage:
      title: Assistant Message
      type: object
      required:
        - role
        - content
      properties:
        role:
          type: string
          enum:
            - assistant
          description: 役割識別子、固定値 `assistant`
        content:
          type:
            - string
            - 'null'
          description: |-
            アシスタントメッセージ内容

            **説明**：
            - マルチターン会話で履歴のアシスタント応答を渡すために使用
            - `tool_calls` が存在する場合は `null` でも可
        name:
          type: string
          description: 参加者名
        prefix:
          type: boolean
          description: |-
            プレフィックス続き書きモードを有効化するかどうか（Beta）

            **説明**：
            - 最後のメッセージでのみ設定
            - `true` に設定すると、モデルはそのメッセージの `content` をプレフィックスとして生成を続けます
          default: false
        reasoning_content:
          type:
            - string
            - 'null'
          description: >-
            思考チェーン内容（Beta）


            **説明**：

            - `deepseek-v4-flash` と `deepseek-v4-pro` の両方が thinking
            有効時（デフォルト）に生成します

            - **マルチターンシナリオではそのまま返送する必要あり**：前ターンのレスポンスの
            `choices[0].message.reasoning_content` をそのまま履歴 assistant メッセージの
            `reasoning_content` フィールドとして返してください。欠落していると API に拒否されます（400）

            - 履歴コンテキストとして渡す場合 `prefix` の併用は不要；明示的にプレフィックス続き書きを有効にする場合のみ
            `prefix=true`
        tool_calls:
          type: array
          description: |-
            ツール呼び出しリスト

            マルチターン会話で履歴のツール呼び出し情報を渡すために使用
          items:
            type: object
            properties:
              id:
                type: string
                description: ツール呼び出しの一意識別子
              type:
                type: string
                enum:
                  - function
              function:
                type: object
                properties:
                  name:
                    type: string
                    description: 呼び出す関数名
                  arguments:
                    type: string
                    description: 関数パラメータ（JSON 文字列）
    ToolMessage:
      title: Tool Message
      type: object
      required:
        - role
        - content
        - tool_call_id
      properties:
        role:
          type: string
          enum:
            - tool
          description: 役割識別子、固定値 `tool`
        content:
          type: string
          description: ツール呼び出しの戻り結果内容
        tool_call_id:
          type: string
          description: |-
            ツール呼び出し ID

            assistant メッセージ内の `tool_calls` が返した `id` フィールドに対応
    Tool:
      type: object
      required:
        - type
        - function
      properties:
        type:
          type: string
          enum:
            - function
          description: ツールタイプ、現在は `function` のみサポート
        function:
          type: object
          required:
            - name
          properties:
            name:
              type: string
              description: |-
                呼び出す関数名

                **説明**：
                - a-z、A-Z、0-9 の文字、またはアンダースコアとハイフンから構成される必要があります
                - 最大長 64 文字
            description:
              type: string
              description: 関数機能の説明、モデルがいつどのようにこの関数を呼び出すかを理解するため
            parameters:
              type: object
              description: |-
                関数の入力パラメータ、JSON Schema オブジェクトで記述

                **説明**：
                - `parameters` を省略するとパラメータリストが空の関数が定義されます
            strict:
              type: boolean
              description: |-
                厳密モードを有効化するかどうか（Beta）

                **説明**：
                - `true` に設定すると、API は strict モードで関数呼び出しを行います
                - 出力が常に関数の JSON Schema 定義に準拠することを保証
              default: false
    Choice:
      type: object
      properties:
        index:
          type: integer
          description: 選択肢のインデックス
          example: 0
        message:
          $ref: '#/components/schemas/AssistantMessage'
        logprobs:
          type:
            - object
            - 'null'
          description: 対数確率情報（`logprobs=true` をリクエストした場合のみ返される）
        finish_reason:
          type: string
          description: |-
            完了理由

            - `stop`：自然終了または停止シーケンスのトリガー
            - `length`：最大 token 制限に到達
            - `content_filter`：コンテンツがセキュリティポリシーによりフィルタされた
            - `tool_calls`：モデルがツールを呼び出した
            - `insufficient_system_resource`：バックエンドリソース不足
          enum:
            - stop
            - length
            - content_filter
            - tool_calls
            - insufficient_system_resource
          example: stop
    Usage:
      type: object
      description: Token 使用統計情報（キャッシュと推論の分項を含む）
      properties:
        prompt_tokens:
          type: integer
          description: 入力内容の token 総数（キャッシュヒットとミスを含む）
          example: 694
        completion_tokens:
          type: integer
          description: 出力内容の token 数（reasoning 部分を含む）
          example: 20
        total_tokens:
          type: integer
          description: 総 token 数 = prompt_tokens + completion_tokens
          example: 714
        prompt_cache_hit_tokens:
          type: integer
          description: >-
            入力中、コンテキストキャッシュにヒットした token 数


            **説明**：キャッシュヒット token は **キャッシュヒット価格** で課金（Flash 20 UC/1K、Pro 100
            UC/1K）
          example: 640
        prompt_cache_miss_tokens:
          type: integer
          description: |-
            入力中、キャッシュにヒットしなかった token 数

            **説明**：**標準入力価格** で課金（Flash 100 UC/1K、Pro 1200 UC/1K）
          example: 54
        prompt_tokens_details:
          type: object
          description: 入力 token の詳細分項（OpenAI スタイル）
          properties:
            cached_tokens:
              type: integer
              description: キャッシュヒット token 数（`prompt_cache_hit_tokens` と同等、フレームワークが自動マッピング）
              example: 640
        completion_tokens_details:
          type: object
          description: 出力 token の詳細分項
          properties:
            reasoning_tokens:
              type: integer
              description: 思考モードで生成された推論 token 数（出力にカウントされ、出力価格で課金）
              example: 10
    AssistantMessage:
      type: object
      properties:
        role:
          type: string
          description: メッセージ送信者の役割
          enum:
            - assistant
          example: assistant
        content:
          type: string
          description: AI の応答メッセージ内容
          example: こんにちは！私は DeepSeek V4 です。一般会話、コード生成、数学的推論など多くのタスクが得意です。
        reasoning_content:
          type: string
          description: >-
            思考チェーン内容（thinking 有効時のみ返される）


            **説明**：

            - `deepseek-v4-pro` はデフォルトで有効、完全な推論過程を返します

            - `deepseek-v4-flash` は `thinking.type="enabled"` を明示的に設定した場合のみ返します

            - 出力 token として課金され、`completion_tokens_details.reasoning_tokens`
            にカウントされます
          example: この問題を分析してみましょう...
        tool_calls:
          type: array
          description: ツール呼び出しリスト（モデルがツール呼び出しを決定した場合に返される）
          items:
            type: object
            properties:
              id:
                type: string
                description: ツール呼び出しの一意識別子
              type:
                type: string
                enum:
                  - function
              function:
                type: object
                properties:
                  name:
                    type: string
                    description: 呼び出す関数名
                  arguments:
                    type: string
                    description: 関数パラメータ（JSON 文字列）
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        ##すべてのインターフェースは Bearer Token による認証が必要です##


        **API Key の取得**：


        [API Key 管理ページ](https://evolink.ai/dashboard/keys) にアクセスして API Key
        を取得してください


        **使用時はリクエストヘッダに追加**：

        ```

        Authorization: Bearer YOUR_API_KEY

        ```

````