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

# GPT 全モデルインターフェース - Chat Completions クイックスタート

> - OpenAI SDK 形式で GPT シリーズのテキストモデルを呼び出します（具体的なモデルは `model` パラメータで選択）
- 推論 + ツール呼び出しモデル。テキストと画像の混在入力に対応
- 同期処理モード。パラメータが少なく、すぐに使い始められます
- 💡 さらにパラメータが必要ですか？[完全なパラメータドキュメント](./chat-completions-reference)をご覧ください
- 💡 サーバーサイドツール（ウェブ検索、コード実行）が必要ですか？[Responses API](../responses/responses-quickstart) をご利用ください

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


## OpenAPI

````yaml ja/api-manual/language-series/gpt/chat-completions/chat-completions-quickstart.json POST /v1/chat/completions
openapi: 3.1.0
info:
  title: GPT 全モデルインターフェース - Chat Completions クイックスタート
  description: OpenAI 互換の Chat Completions API で GPT シリーズのテキストモデルを呼び出すためのクイックスタート例。
  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: Chat Completions
    description: OpenAI 互換のチャット補完 API
paths:
  /v1/chat/completions:
    post:
      tags:
        - Chat Completions
      summary: GPT クイック対話（全モデル）
      description: >-
        - OpenAI SDK 形式で GPT シリーズのテキストモデルを呼び出します（具体的なモデルは `model` パラメータで選択）

        - 推論 + ツール呼び出しモデル。テキストと画像の混在入力に対応

        - 同期処理モード。パラメータが少なく、すぐに使い始められます

        - 💡
        さらにパラメータが必要ですか？[完全なパラメータドキュメント](./chat-completions-reference)をご覧ください

        - 💡 サーバーサイドツール（ウェブ検索、コード実行）が必要ですか？[Responses
        API](../responses/responses-quickstart) をご利用ください
      operationId: gptChatCompletionsQuickstart
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChatCompletionQuickRequest'
      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 quota
                  type: insufficient_quota_error
                  fallback_suggestion: https://evolink.ai/dashboard/billing
        '429':
          description: レート制限を超えました
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 429
                  message: Rate limit exceeded
                  type: rate_limit_error
                  fallback_suggestion: retry after 60 seconds
        '500':
          description: サーバー内部エラー
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 500
                  message: Internal server error
                  type: internal_server_error
                  fallback_suggestion: try again later
        '503':
          description: サービス一時利用不可
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 503
                  message: Service temporarily unavailable
                  type: service_unavailable_error
                  fallback_suggestion: retry after 30 seconds
components:
  schemas:
    ChatCompletionQuickRequest:
      type: object
      required:
        - model
        - messages
      properties:
        model:
          type: string
          description: |-
            呼び出すモデル：

            | モデル ID | コンテキストウィンドウ | 位置づけ |
            |---|---|---|
            | `gpt-5.6-sol` | 1,050,000 | GPT-5.6 ファミリー、最先端の推論 |
            | `gpt-5.6-terra` | 1,050,000 | GPT-5.6 ファミリー、バランス型の本番運用 |
            | `gpt-5.6-luna` | 1,050,000 | GPT-5.6 ファミリー、高スループットとコスト管理 |
            | `gpt-5.5` | 400,000 | 汎用推論モデル |
            | `gpt-5.4` | 128,000 | 汎用推論モデル |
            | `gpt-5.2` | 400,000 | 汎用推論モデル |
            | `gpt-5.1` | 400,000 | 汎用推論モデル |
          enum:
            - gpt-5.6-sol
            - gpt-5.6-terra
            - gpt-5.6-luna
            - gpt-5.5
            - gpt-5.4
            - gpt-5.2
            - gpt-5.1
          example: gpt-5.6-sol
        messages:
          type: array
          description: >-
            チャットメッセージのリスト。


            画像などマルチモーダルの書き方は[完全なパラメータドキュメント](./chat-completions-reference)をご覧ください。


            ```json

            "messages": [
              {
                "role": "user",
                "content": [
                  { "type": "text", "text": "この画像には何が写っていますか？" },
                  { "type": "image_url", "image_url": { "url": "https://example.com/photo.png" } }
                ]
              }
            ]

            ```
          items:
            $ref: '#/components/schemas/MessageSimple'
          example:
            - role: user
              content: Explain quantum entanglement in one sentence.
    ChatCompletionResponse:
      type: object
      properties:
        id:
          type: string
          description: 今回の対話の一意の識別子
          example: chatcmpl-CvJ2p8mQxK7nR4wS
        object:
          type: string
          enum:
            - chat.completion
          description: レスポンスタイプ
          example: chat.completion
        created:
          type: integer
          description: 作成タイムスタンプ
          example: 1786705221
        model:
          type: string
          description: 実際に使用されたモデル名
          example: gpt-5.6-sol
        choices:
          type: array
          description: 生成結果のリスト
          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: 関連パラメータ名
            fallback_suggestion:
              type: string
              description: エラー発生時の提案
    MessageSimple:
      type: object
      required:
        - role
        - content
      properties:
        role:
          type: string
          description: メッセージのロール
          enum:
            - system
            - developer
            - user
            - assistant
          example: user
        content:
          description: メッセージ内容：文字列、またはコンテンツブロックの配列（`text` / `image_url`）。
          example: Explain quantum entanglement in one sentence.
          oneOf:
            - type: string
            - type: array
              items:
                type: object
    Choice:
      type: object
      properties:
        index:
          type: integer
          description: 結果のインデックス
          example: 0
        message:
          $ref: '#/components/schemas/AssistantMessage'
        finish_reason:
          type: string
          description: 終了理由：`stop` は正常終了、`length` は最大 token 制限に到達、`tool_calls` はツール呼び出しが必要
          example: stop
    Usage:
      type: object
      description: >-
        Token 使用量の統計。Prompt キャッシュは自動的に有効となり、キャッシュにヒットした入力 token
        はより安いキャッシュ料金で課金されます。
      properties:
        prompt_tokens:
          type: integer
          description: 入力トークン数
          example: 18
        completion_tokens:
          type: integer
          description: 出力トークン数（推論トークンを含む）
          example: 42
        total_tokens:
          type: integer
          description: トークンの合計数
          example: 60
        prompt_tokens_details:
          type: object
          description: 入力トークンの詳細情報
          properties:
            cached_tokens:
              type: integer
              description: キャッシュにヒットした token 数
              example: 0
    AssistantMessage:
      type: object
      properties:
        role:
          type: string
          enum:
            - assistant
          example: assistant
        content:
          type: string
          description: モデルが生成したテキスト内容
          example: >-
            Quantum entanglement means the states of two particles are
            correlated, so measuring one instantly determines the state of the
            other.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: |-
        ##すべてのAPIにBearer Token認証が必要です##

        **APIキーの取得：**

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

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

````