> ## 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 Decisions - 完全なパラメータリファレンス

> - GPT-6 Luna Decisions（`gpt-6-luna-decisions`）はテキスト、画像、またはその両方を判定し、3 種類の構造化された回答を返します。`predicate` は「はい」の確率、`choice` は指定された選択肢のうち 1 つ、`score` は順序付きレベルの確率加重スコアを返します
- 同期 API です。1 回のリクエストですべての回答を直接返し、ストリーミングやタスクのポーリングは不要です
- リクエストボディは OpenAI Decisions API と同じです。OpenAI SDK を使う場合は `base_url` を EvoLink に設定してください。このエンドポイントは OpenAI のモデル ID `gpt-6-luna` も受け付けます
- 入力トークンのみ課金され、出力、キャッシュ読み取り、キャッシュ書き込みは無料です。各リクエストには最低料金が適用されます。1 回の入力が 272,000 トークンを超える場合、そのリクエスト全体の入力単価は通常の 2 倍になります。最新の料金は[モデル料金](https://evolink.ai/pricing)をご覧ください
- 画像はインラインの base64 データ URL（`data:image/...;base64,...`）で指定してください。画像 URL と `file_id` は非対応です。1 リクエストあたり最大 128 枚の画像に対応します
- このエンドポイントは未知のフィールドを拒否します。`stream`、`temperature`、`max_tokens` などの Chat Completions パラメータを送信しないでください
- コンテンツ分類、問い合わせの振り分け、関連性の判定、ルールに基づく採点に適しています。テキスト生成や独自の JSON 構造が必要な場合は [Responses API](/ja/api-manual/language-series/gpt/responses/responses-reference) を使ってください

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

<Note>
  **このモデル ID は本エンドポイント専用です**：`gpt-6-luna-decisions` は `/v1/decisions` でのみ使えます。Chat Completions、Responses などの他のエンドポイントで使うと `400 model_endpoint_mismatch` が返ります。会話やテキスト生成には、`gpt-6-luna` を [Chat Completions](/docs/ja/api-manual/language-series/gpt/chat-completions/chat-completions-reference) または [Responses API](/docs/ja/api-manual/language-series/gpt/responses/responses-reference) で使ってください。
</Note>

<Note>
  **3 種類の質問の選び方**

  | 種類 | 適した質問 | 結果の使い方 |
  | - | - | - |
  | `predicate` | 「はい／いいえ」の質問。例えば苦情かどうか、画像に破損があるか | `probability` は「はい」の確率です。独自のしきい値を設定し、それを超えたら該当すると判定します |
  | `choice` | 互いに重複しないカテゴリから 1 つを選択。例えば担当部署への振り分け | `choice` は選択された項目です。`confidence` が低い場合は人による確認を推奨します |
  | `score` | 低い順に並べたレベルで評価。例えば問題の重大度 | `score` はレベルの確率加重スコア（レベル番号は 0 から開始）で、小数になることがあります |

  1 回のリクエストに複数の独立した質問を含められます。すべて同じ `input` を共有します。後の質問が前の質問の回答に依存する場合は、2 回のリクエストに分けてください。
</Note>

<Note>
  **Chat Completions / Responses との違い**：このエンドポイントは `model`、`input`、`questions`、`safety_identifier` の 4 フィールドのみ受け付けます。他のフィールドを追加すると `400 unknown_parameter` が返ります。画像は base64 データ URL のみ対応し、ストリーミングは利用できません。
</Note>


## OpenAPI

````yaml ja/api-manual/language-series/gpt/decisions/decisions-reference.json POST /v1/decisions
openapi: 3.1.0
info:
  title: GPT Decisions - 完全なパラメータリファレンス
  description: >-
    OpenAI 互換の Decisions API を使い、GPT-6 Luna
    がテキストや画像について構造化された判定を行います。はい／いいえの確率、選択肢からの単一選択、順序付きレベルによる採点に対応します。
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://direct.evolink.ai
    description: 本番環境（推奨）
  - url: https://api.evolink.ai
    description: 代替エンドポイント
security:
  - bearerAuth: []
tags:
  - name: Decisions
    description: 構造化された判定：分類、振り分け、採点
paths:
  /v1/decisions:
    post:
      tags:
        - Decisions
      summary: GPT-6 Luna Decisions（構造化された判定）
      description: >-
        - GPT-6 Luna Decisions（`gpt-6-luna-decisions`）はテキスト、画像、またはその両方を判定し、3
        種類の構造化された回答を返します。`predicate` は「はい」の確率、`choice` は指定された選択肢のうち 1 つ、`score`
        は順序付きレベルの確率加重スコアを返します

        - 同期 API です。1 回のリクエストですべての回答を直接返し、ストリーミングやタスクのポーリングは不要です

        - リクエストボディは OpenAI Decisions API と同じです。OpenAI SDK を使う場合は `base_url` を
        EvoLink に設定してください。このエンドポイントは OpenAI のモデル ID `gpt-6-luna` も受け付けます

        - 入力トークンのみ課金され、出力、キャッシュ読み取り、キャッシュ書き込みは無料です。各リクエストには最低料金が適用されます。1 回の入力が
        272,000 トークンを超える場合、そのリクエスト全体の入力単価は通常の 2
        倍になります。最新の料金は[モデル料金](https://evolink.ai/pricing)をご覧ください

        - 画像はインラインの base64 データ URL（`data:image/...;base64,...`）で指定してください。画像 URL
        と `file_id` は非対応です。1 リクエストあたり最大 128 枚の画像に対応します

        - このエンドポイントは未知のフィールドを拒否します。`stream`、`temperature`、`max_tokens` などの Chat
        Completions パラメータを送信しないでください

        - コンテンツ分類、問い合わせの振り分け、関連性の判定、ルールに基づく採点に適しています。テキスト生成や独自の JSON 構造が必要な場合は
        [Responses
        API](/ja/api-manual/language-series/gpt/responses/responses-reference)
        を使ってください
      operationId: createDecision
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DecisionRequest'
            examples:
              predicate:
                summary: はい／いいえの判定
                value:
                  model: gpt-6-luna-decisions
                  input: The package arrived with a broken screen.
                  questions:
                    - type: predicate
                      name: damaged
                      instructions: Does the customer report a damaged item?
              choice:
                summary: 単一選択（振り分け）
                value:
                  model: gpt-6-luna-decisions
                  input: I was charged twice for my order.
                  questions:
                    - type: choice
                      name: department
                      instructions: Which department should handle this complaint?
                      choices:
                        - value: billing
                          description: Payments, invoices, and refunds.
                        - value: technical
                          description: Problems using the product.
                        - value: other
                          description: Requests outside these categories.
              score:
                summary: 順序付きレベルによる採点
                value:
                  model: gpt-6-luna-decisions
                  input: Export fails in Safari but works in Chrome.
                  questions:
                    - type: score
                      name: severity
                      instructions: How severe is this issue?
                      levels:
                        - label: Cosmetic
                          description: Appearance only; no lost functionality.
                        - label: Workaround available
                          description: A task fails, but another way works.
                        - label: Fully blocked
                          description: A task fails with no workaround.
              multiple:
                summary: 1 回のリクエストで複数の質問
                value:
                  model: gpt-6-luna-decisions
                  input: >-
                    I was charged twice for my order and the app crashes when I
                    open the invoice.
                  questions:
                    - type: predicate
                      name: is_billing
                      instructions: Is this about a billing problem?
                    - type: choice
                      name: department
                      instructions: Which department should handle this complaint?
                      choices:
                        - value: billing
                          description: Payments, invoices, and refunds.
                        - value: technical
                          description: Problems using the product.
                        - value: other
                          description: Requests outside these categories.
                    - type: score
                      name: severity
                      instructions: How severe is this issue?
                      levels:
                        - label: Cosmetic
                          description: Appearance only.
                        - label: Workaround available
                          description: A task fails, but another way works.
                        - label: Fully blocked
                          description: A task fails with no workaround.
              image:
                summary: 画像の判定
                value:
                  model: gpt-6-luna-decisions
                  input:
                    - role: user
                      content:
                        - type: input_text
                          text: Look at the image.
                        - type: input_image
                          image_url: >-
                            data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKklEQVR42mM4ISdHU8QwasGoBaMWjFowasGoBaMWjFowasGoBaMWDBULACXLED1gHZEpAAAAAElFTkSuQmCC
                  questions:
                    - type: predicate
                      name: is_red
                      instructions: Is the image mostly red?
      responses:
        '200':
          description: 質問ごとに 1 つの回答を、リクエスト内の質問と同じ順序で返します
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DecisionResponse'
              example:
                model: gpt-6-luna
                answers:
                  - type: predicate
                    name: is_billing
                    probability: 1
                  - type: choice
                    name: department
                    choice: billing
                    probabilities:
                      - value: billing
                        probability: 0.98
                      - value: technical
                        probability: 0.01
                      - value: other
                        probability: 0.01
                    confidence: 0.97
                  - type: score
                    name: severity
                    score: 1.34
                    probabilities:
                      - value: 0
                        label: Cosmetic
                        probability: 0.04
                      - value: 1
                        label: Workaround available
                        probability: 0.58
                      - value: 2
                        label: Fully blocked
                        probability: 0.38
                    confidence: 0.37
                usage:
                  input_tokens: 426
                  input_tokens_details:
                    cached_tokens: 0
                    cache_write_tokens: 0
                  output_tokens: 0
                  output_tokens_details:
                    reasoning_tokens: 0
                  total_tokens: 426
        '400':
          description: >-
            リクエストパラメータが無効です。`param` はエラーのあるフィールドを示します。主な原因は `questions`
            の欠落、未知のフィールド、base64 データ URL ではない画像、`user` 以外のメッセージ `role`、質問の `name`
            の重複です。このモデル ID を他のエンドポイントで使った場合も
            400（`model_endpoint_mismatch`）が返ります。検証に失敗したリクエストは課金されません
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                unknown_parameter:
                  summary: 未知のフィールドを指定
                  value:
                    error:
                      message: >-
                        Unknown parameter: 'stream'. (request id:
                        20261007223656995142218QgCDR3TF)
                      type: invalid_request_error
                      param: stream
                      code: unknown_parameter
                image_not_data_url:
                  summary: 画像を URL で指定
                  value:
                    error:
                      message: >-
                        Invalid 'input[0].content[1].image_url': string does not
                        match pattern. Expected a string that matches the
                        pattern '^data:'. (request id:
                        2026100722365642880926evUSStdF)
                      type: invalid_request_error
                      param: input[0].content[1].image_url
                      code: invalid_value
                missing_questions:
                  summary: questions が欠落
                  value:
                    error:
                      message: >-
                        Missing required parameter: 'questions'. (request id:
                        20261007223656416678385UfxZWwZD)
                      type: invalid_request_error
                      param: questions
                      code: missing_required_parameter
        '401':
          description: 認証エラー：API Key が未指定または無効です
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: unauthorized
                  message: >-
                    API key is required (request id:
                    202610072235193122631737Nn7cfZ5)
                  param: null
                  type: authentication_error
        '402':
          description: 残高不足
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: >-
            この API Key のモデル許可リストには、`gpt-6-luna-decisions` も `gpt-6-luna`
            も含まれていません
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: >-
            このモデルでは Decisions API が有効になっていません。現在は `gpt-6-luna-decisions`（または
            `gpt-6-luna`）のみ対応しています
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: model_not_found
                  message: >-
                    Model 'gpt-5.5' is not available for the Decisions API (POST
                    /v1/decisions) with this API key. This error is permanent —
                    do not retry with the same model id. Call GET /v1/models:
                    models that support this endpoint are listed with the
                    '-decisions' suffix. (request id:
                    20261007223657322725427OrY2GeLp)
                  param: null
                  retryable: false
                  type: invalid_request_error
        '429':
          description: リクエスト頻度の上限を超えました。時間をおいて再試行してください
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: サーバー内部エラー
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: サービスは一時的に利用できません。時間をおいて再試行してください
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    DecisionRequest:
      type: object
      additionalProperties: false
      required:
        - model
        - input
        - questions
      properties:
        model:
          type: string
          description: >-
            モデル ID。`gpt-6-luna-decisions` を使ってください。このエンドポイントは OpenAI のモデル ID
            `gpt-6-luna` も受け付けます。動作と課金は同一で、使用量と請求記録は `gpt-6-luna-decisions`
            に統一されます。


            `gpt-6-luna-decisions` はこのエンドポイント専用です。Chat Completions、Responses
            などの他のエンドポイントで使うと `400 model_endpoint_mismatch` が返ります。
          enum:
            - gpt-6-luna-decisions
            - gpt-6-luna
          example: gpt-6-luna-decisions
        input:
          description: >-
            すべての質問で共通の判定材料です。テキスト文字列、またはユーザーメッセージの配列を指定します。メッセージにはテキストとインライン画像を含められます。
          oneOf:
            - type: string
              example: I was charged twice for my order.
            - type: array
              minItems: 1
              items:
                $ref: '#/components/schemas/DecisionInputMessage'
        questions:
          type: array
          minItems: 1
          description: >-
            判定する質問を最低 1 つ指定します。各質問は独立しており、異なる種類を組み合わせられます。同じリクエスト内で質問の `name`
            を重複させることはできません。


            | 種類 | 用途 | 主な結果 |

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

            | `predicate` | 条件が成立するかを判定 | `probability`：成立する確率（0 から 1） |

            | `choice` | 指定された選択肢から 1 つを選択 | `choice`：選択された項目 |

            | `score` | 順序付きレベルで採点 | `score`：レベルの確率加重スコア |


            後の質問が前の質問の回答に依存する場合は、2 回のリクエストに分けてください。
          items:
            oneOf:
              - $ref: '#/components/schemas/PredicateQuestion'
              - $ref: '#/components/schemas/ChoiceQuestion'
              - $ref: '#/components/schemas/ScoreQuestion'
        safety_identifier:
          type: string
          description: 任意。独自のエンドユーザー識別子（不透明な文字列）です。不正利用の検出のため、変更せずにモデル提供元へ転送されます
    DecisionResponse:
      type: object
      properties:
        model:
          type: string
          description: 実際に判定を行ったモデル
          example: gpt-6-luna
        answers:
          type: array
          description: 質問ごとに 1 つの回答を、リクエスト内と同じ順序で返します。`name` で質問を対応付け、`type` で回答の種類を区別します
          items:
            oneOf:
              - $ref: '#/components/schemas/PredicateAnswer'
              - $ref: '#/components/schemas/ChoiceAnswer'
              - $ref: '#/components/schemas/ScoreAnswer'
              - $ref: '#/components/schemas/RefusalAnswer'
        usage:
          $ref: '#/components/schemas/DecisionUsage'
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              description: 'エラーの説明。末尾に `(request id: ...)` が付くので、問題の調査時にはこの ID を提示してください'
            type:
              type: string
              description: エラーの種類
            param:
              type:
                - string
                - 'null'
              description: エラーのあるパラメータのパス
            code:
              type:
                - string
                - 'null'
              description: エラーコード
    DecisionInputMessage:
      type: object
      required:
        - role
        - content
      properties:
        role:
          type: string
          enum:
            - user
          description: '`user` のみ受け付けます'
        content:
          description: テキスト文字列、またはテキストブロックと画像ブロックの配列
          oneOf:
            - type: string
            - type: array
              items:
                oneOf:
                  - $ref: '#/components/schemas/InputTextPart'
                  - $ref: '#/components/schemas/InputImagePart'
    PredicateQuestion:
      type: object
      required:
        - type
        - instructions
      properties:
        type:
          type: string
          enum:
            - predicate
        name:
          type: string
          description: 質問の名前。対応する回答にそのまま返されます
        instructions:
          type: string
          description: 判定する条件を、はい／いいえで答えられる質問として記述します
    ChoiceQuestion:
      type: object
      required:
        - type
        - instructions
        - choices
      properties:
        type:
          type: string
          enum:
            - choice
        name:
          type: string
          description: 質問の名前。対応する回答にそのまま返されます
        instructions:
          type: string
          description: 回答する質問
        choices:
          type: array
          minItems: 1
          description: >-
            選択肢です。各選択肢の意味が重複しないようにしてください。カテゴリがすべてのケースを網羅できない場合は、`other`
            などの予備の選択肢を追加することを推奨します
          items:
            type: object
            required:
              - value
            properties:
              value:
                description: >-
                  この選択肢が選ばれたときに返す値。文字列と真偽値は異なる型なので、`true` と `"true"`
                  は別々の選択肢として扱われます
                oneOf:
                  - type: string
                  - type: boolean
              description:
                type: string
                description: この選択肢を選ぶ条件
    ScoreQuestion:
      type: object
      required:
        - type
        - instructions
        - levels
      properties:
        type:
          type: string
          enum:
            - score
        name:
          type: string
          description: 質問の名前。対応する回答にそのまま返されます
        instructions:
          type: string
          description: 回答する質問
        levels:
          type: array
          minItems: 1
          description: 低い順に並べたレベル。レベル番号は 0 から始まります
          items:
            type: object
            required:
              - label
            properties:
              label:
                type: string
                description: レベル名
              description:
                type: string
                description: このレベルに達する基準
    PredicateAnswer:
      type: object
      properties:
        type:
          type: string
          enum:
            - predicate
        name:
          type:
            - string
            - 'null'
          description: リクエストで指定した質問の名前。名前を指定しなかった場合は `null`
        probability:
          type: number
          description: 条件が成立する推定確率（0 から 1）。独自の業務データに基づいて判定のしきい値を設定してください
    ChoiceAnswer:
      type: object
      properties:
        type:
          type: string
          enum:
            - choice
        name:
          type:
            - string
            - 'null'
          description: リクエストで指定した質問の名前。名前を指定しなかった場合は `null`
        choice:
          description: 選択された項目。型はリクエスト内の `value` と同じです
          oneOf:
            - type: string
            - type: boolean
        probabilities:
          type: array
          description: 各選択肢の確率
          items:
            type: object
            properties:
              value:
                oneOf:
                  - type: string
                  - type: boolean
              probability:
                type: number
        confidence:
          type: number
          description: 今回の選択に対する信頼度（0 から 1）
    ScoreAnswer:
      type: object
      properties:
        type:
          type: string
          enum:
            - score
        name:
          type:
            - string
            - 'null'
          description: リクエストで指定した質問の名前。名前を指定しなかった場合は `null`
        score:
          type: number
          description: >-
            各レベル番号の確率加重平均なので、2 つのレベルの間の値になることがあります。例えば 3 つのレベルの確率が 0.04 / 0.58 /
            0.38 の場合、スコアは 1.34 です
        probabilities:
          type: array
          description: 各レベルの確率
          items:
            type: object
            properties:
              value:
                type: integer
                description: レベル番号（0 から開始）
              label:
                type: string
              probability:
                type: number
        confidence:
          type: number
          description: 今回の採点に対する信頼度（0 から 1）
    RefusalAnswer:
      type: object
      description: モデルがこの質問への回答を拒否しました。他の質問への回答には影響せず、リクエスト全体は引き続き 200 を返し、通常どおり課金されます
      properties:
        type:
          type: string
          enum:
            - refusal
        name:
          type:
            - string
            - 'null'
          description: リクエストで指定した質問の名前。名前を指定しなかった場合は `null`
    DecisionUsage:
      type: object
      description: >-
        トークン使用量。このエンドポイントは入力トークンのみ課金し、出力、キャッシュ読み取り、キャッシュ書き込みは無料です。各リクエストには最低料金が適用されます。1
        回の入力が 272,000 トークンを超える場合、そのリクエスト全体の入力単価は通常の 2
        倍になります。最新の料金は[モデル料金](https://evolink.ai/pricing)をご覧ください。
      properties:
        input_tokens:
          type: integer
          description: >-
            課金対象の入力トークン数。テキスト、画像、およびリクエストごと・質問ごとの固定オーバーヘッドを含みます。参考値：1 文と 1 つの
            `predicate` 質問で約 160 トークン、1536×1024 の画像 1 枚で約 1,540 トークン
          example: 426
        input_tokens_details:
          type: object
          description: 入力トークンの内訳。このエンドポイントではキャッシュを個別に課金しません
          properties:
            cached_tokens:
              type: integer
              example: 0
            cache_write_tokens:
              type: integer
              example: 0
        output_tokens:
          type: integer
          description: このエンドポイントでは出力は課金されません
          example: 0
        output_tokens_details:
          type: object
          properties:
            reasoning_tokens:
              type: integer
              example: 0
        total_tokens:
          type: integer
          description: 合計トークン数
          example: 426
    InputTextPart:
      type: object
      required:
        - type
        - text
      properties:
        type:
          type: string
          enum:
            - input_text
        text:
          type: string
          description: テキスト内容
    InputImagePart:
      type: object
      required:
        - type
        - image_url
      properties:
        type:
          type: string
          enum:
            - input_image
        image_url:
          type: string
          pattern: '^data:'
          description: >-
            `data:image/png;base64,...` などのインライン base64 データ URL。`http(s)` の画像
            URL は拒否されます。1 リクエストあたり最大 128 枚の画像に対応します
  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
        ```

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.