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

# Grok 全モデルインターフェース - Responses クイックスタート

> - OpenAI Responses API 形式で xAI Grok テキストモデルを呼び出し（モデルは `model` パラメータで選択）
- 推論 + ツール呼び出しモデル。`grok-4.5` のコンテキストウィンドウは 500K トークン
- このエンドポイントでは xAI のサーバーサイドツールを利用できます：ウェブ検索、X 検索、コード実行、添付ファイル検索、コレクション検索（成功した呼び出しごとに課金）
- 💡 ツールと全パラメータが必要ですか？[完全なパラメータドキュメント](./responses-reference)をご覧ください

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


## OpenAPI

````yaml ja/api-manual/language-series/grok/responses/responses-quickstart.json POST /v1/responses
openapi: 3.1.0
info:
  title: Grok 全モデルインターフェース - Responses クイックスタート
  description: サーバーサイドツールを含む、OpenAI 互換の Responses API で xAI Grok テキストモデルを呼び出すクイックスタート例。
  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: Responses
    description: xAI サーバーサイドツール対応 OpenAI Responses API
paths:
  /v1/responses:
    post:
      tags:
        - Responses
      summary: Grok クイックレスポンス（全モデル）
      description: >-
        - OpenAI Responses API 形式で xAI Grok テキストモデルを呼び出し（モデルは `model` パラメータで選択）

        - 推論 + ツール呼び出しモデル。`grok-4.5` のコンテキストウィンドウは 500K トークン

        - このエンドポイントでは xAI のサーバーサイドツールを利用できます：ウェブ検索、X
        検索、コード実行、添付ファイル検索、コレクション検索（成功した呼び出しごとに課金）

        - 💡 ツールと全パラメータが必要ですか？[完全なパラメータドキュメント](./responses-reference)をご覧ください
      operationId: grokResponsesQuick
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResponsesQuickRequest'
      responses:
        '200':
          description: レスポンス生成成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponsesResponse'
        '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:
    ResponsesQuickRequest:
      type: object
      required:
        - model
        - input
      properties:
        model:
          type: string
          description: |-
            呼び出すモデル：

            | モデル ID | 位置づけ |
            |---|---|
            | `grok-4.5` | xAI の推論 + ツール呼び出しモデル、コンテキストウィンドウ 500K |
          enum:
            - grok-4.5
          example: grok-4.5
        input:
          type: string
          description: モデルへの入力テキスト
          example: Explain what makes Grok 4.5 different in two sentences.
    ResponsesResponse:
      type: object
      properties:
        id:
          type: string
          description: レスポンスの一意の識別子
          example: 55d44212-8d5e-90cc-975f-36d341ce21f5
        object:
          type: string
          enum:
            - response
          description: レスポンスタイプ
          example: response
        status:
          type: string
          description: 応答ステータス
          enum:
            - completed
            - incomplete
            - failed
          example: completed
        model:
          type: string
          description: 実際に使用されたモデル名
          example: grok-4.5
        created_at:
          type: integer
          description: 作成タイムスタンプ
          example: 1786538000
        output:
          type: array
          description: >-
            出力アイテム。Grok の推論モデルは通常、まず `reasoning` アイテム（思考の要約）を返し、最後に最終回答を含む
            `message` アイテムを返します。
          items:
            $ref: '#/components/schemas/OutputItem'
        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: エラー発生時の提案
    OutputItem:
      type: object
      properties:
        id:
          type: string
          description: 出力アイテムの識別子
        type:
          type: string
          description: 出力アイテムのタイプ
          enum:
            - reasoning
            - message
          example: message
        status:
          type: string
          description: 出力アイテムのステータス
          example: completed
        content:
          type: array
          description: メッセージ内容のパート（`output_text`）。`message` アイテムに出力されます
          items:
            type: object
    Usage:
      type: object
      description: トークン使用統計。プロンプトが 200K トークン以上の場合、すべてのトークン種別が 2 倍で課金されます。
      properties:
        input_tokens:
          type: integer
          description: 入力トークン数
          example: 1692
        output_tokens:
          type: integer
          description: 出力トークン数（推論トークンを含む）
          example: 54
        total_tokens:
          type: integer
          description: トークンの合計数
          example: 1746
        input_tokens_details:
          type: object
          description: 入力トークンの詳細情報
          properties:
            cached_tokens:
              type: integer
              description: キャッシュにヒットしたプロンプトトークン数（より安いキャッシュ料金で課金）
              example: 512
        output_tokens_details:
          type: object
          description: 出力トークンの詳細情報
          properties:
            reasoning_tokens:
              type: integer
              description: 推論トークン数
              example: 35
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: |-
        ##すべてのAPIにBearer Token認証が必要です##

        **APIキーの取得：**

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

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

````