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

# EvoLink Auto - スマートモデルルーティング

> システムがリクエストを処理する最適なモデルを自動選択

## スマートモデルルーティング

EvoLink Autoは、リクエスト内容に基づいて適切なAIモデルを自動的に選択するインテリジェントモデルルーティング機能です。手動でモデルを指定する必要はありません。

### 主な利点

* **スマートマッチング**：リクエスト内容を自動分析し、適切なモデルを選択
* **コスト最適化**：品質を維持しながら、コストパフォーマンスの高いモデルを優先
* **負荷分散**：複数のモデル間でリクエストを自動分散し、システムの安定性を向上
* **透明性**：レスポンスに実際に使用されたモデル名を返し、追跡と最適化を容易に

### 動作原理

システムは、リクエストの複雑さ、長さ、タイプに基づいて、モデルプールから最適なモデルを選択します。

### サポートされているモデル

EvoLink Autoは、GPT-4、GPT-3.5、Claude、Geminiなどの主流AIモデル間でインテリジェントにルーティングします。

### 制限事項

* 特定のモデル機能が必要なシナリオには適していません（例：GPT-4のビジョン機能）
* すべてのリクエストで同じモデルが使用されることは保証されません

### 使用シーン

どのモデルを使用すべきか不明な場合や、システムにモデル選択を自動最適化させたい場合に最適です。

<Note>
  `model`パラメータを`evolink/auto`に設定するだけで、システムが自動的に適切なモデルを選択します。
</Note>

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


## OpenAPI

````yaml ja/api-manual/language-series/evolink-auto/evolink-auto-quickstart.json POST /v1/chat/completions
openapi: 3.1.0
info:
  title: EvoLink Auto - インテリジェントモデル選択
  description: インテリジェントモデルルーティング機能、システムが最適なAIモデルを自動選択
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://direct.evolink.ai
    description: 本番環境（推奨）
  - url: https://api.evolink.ai
    description: 代替 URL
security:
  - bearerAuth: []
paths:
  /v1/chat/completions:
    post:
      tags:
        - インテリジェントルーティング
      summary: インテリジェントモデルルーティング
      description: システムがリクエストを処理する最適なモデルを自動選択
      operationId: createChatCompletionAuto
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AutoRequest'
      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
        '403':
          description: アクセス拒否
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 403
                  message: Access denied for this feature
                  type: permission_error
        '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
        '502':
          description: 上流サービスエラー
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 502
                  message: Upstream AI service unavailable
                  type: upstream_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:
    AutoRequest:
      type: object
      required:
        - model
        - messages
      properties:
        model:
          type: string
          description: インテリジェントルーティングを使用
          enum:
            - evolink/auto
          default: evolink/auto
          example: evolink/auto
        messages:
          type: array
          description: 会話メッセージリスト
          items:
            $ref: '#/components/schemas/MessageInput'
          minItems: 1
          example:
            - role: user
              content: 人工知能の発展の歴史を紹介してください
        temperature:
          type: number
          description: |-
            サンプリング温度、出力のランダム性を制御

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

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

            **推奨**: temperature と top_p を同時に調整しないでください
          minimum: 0
          maximum: 1
          example: 0.9
        top_k:
          type: integer
          description: |-
            Top-K サンプリングパラメータ

            **説明**:
            - 例えば 10 は各サンプリング時に確率が最も高い10個のトークンのみを考慮
            - 小さい値は出力をより集中させます
            - デフォルトでは制限なし
          minimum: 1
          example: 40
        stream:
          type: boolean
          description: |-
            ストリーミング方式でレスポンスを返すかどうか

            - `true`: ストリーミング返却、チャンクごとにリアルタイムで内容を返す
            - `false`: 完全なレスポンスを待ってから一括返却
          default: false
          example: false
    ChatCompletionResponse:
      type: object
      properties:
        id:
          type: string
          description: チャット補完の一意の識別子
          example: chatcmpl-20260308112637503180122ABCD1234
        model:
          type: string
          description: 実際に使用されたモデル名
          example: gpt-5.4
        object:
          type: string
          enum:
            - chat.completion
          description: レスポンスタイプ
          example: chat.completion
        created:
          type: integer
          description: 作成タイムスタンプ
          example: 1741428397
        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: エラー処理の提案
    MessageInput:
      type: object
      required:
        - role
        - content
      properties:
        role:
          type: string
          description: メッセージのロール
          enum:
            - system
            - user
            - assistant
        content:
          type: string
          description: メッセージ内容
    Choice:
      type: object
      properties:
        index:
          type: integer
          description: この選択肢のインデックス
          example: 0
        message:
          $ref: '#/components/schemas/AssistantMessage'
        finish_reason:
          type: string
          description: 補完が終了した理由
          enum:
            - stop
            - length
            - content_filter
          example: stop
    Usage:
      type: object
      description: トークン使用統計
      properties:
        prompt_tokens:
          type: integer
          description: 入力のトークン数
          example: 15
        completion_tokens:
          type: integer
          description: 出力のトークン数
          example: 120
        total_tokens:
          type: integer
          description: 合計トークン数
          example: 135
    AssistantMessage:
      type: object
      properties:
        role:
          type: string
          description: メッセージ送信者のロール
          enum:
            - assistant
          example: assistant
        content:
          type: string
          description: AIのレスポンス内容
          example: 人工知能の発展の歴史は1950年代に遡ることができます...
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: |-
        ## すべてのAPIにBearer Token認証が必要です ##

        **APIキーの取得：**

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

        **リクエストヘッダーに追加：**
        ```
        Authorization: Bearer YOUR_API_KEY
        ```
      bearerFormat: sk-evo-xxxxxxxxxx

````