> ## Documentation Index
> Fetch the complete documentation index at: https://docs.opper.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Decisions

> OpenAI Decisions-compatible synchronous evaluation. Send `model`, `input` (a string, or user messages with `input_text` and inline base64 `input_image` parts) and typed `questions` (`predicate`, `choice`, `score`); `answers` come back in question order with probabilities and confidence; a question the model declines comes back as a `refusal` answer. A bare model name is OpenAI's, e.g. `gpt-6-luna`, which is called natively and answers with OpenAI's body unchanged. Other decision models are addressed by their full catalog ID, e.g. `typesafe/jev-latest`, `opper/kev-4b` or `greenpt/metis` (list available endpoints with `GET /v3/models?type=evaluation`); those are reached by translation to System One and accept text input only. GreenPT Metis receives all 1–32 questions together in one upstream request. Translation preserves question order, probabilities and confidence, but joins text-message boundaries and does not expose native impact, score legends or additional answer metadata; use the System One endpoint for the native contract. Billed on input tokens. Uses a project-scoped Opper API key, Comply policies and provider entitlements. Cost and generation ID are returned in headers. Streaming is unsupported.

See the [classification and scoring guide](/build/gateway/evaluations) for working examples, model discovery, and usage and billing behavior.


## OpenAPI

````yaml post /v3/compat/decisions
openapi: 3.1.0
info:
  description: Schema-driven generative API that orchestrates LLM-powered workflows.
  title: Task API
  version: 3.0.0
servers:
  - description: Production
    url: https://api.opper.ai
  - description: Local development
    url: http://localhost:8080
security:
  - BearerAuth: []
tags:
  - description: Schema-driven function management and execution
    name: Functions
  - description: OpenAI-compatible chat completions
    name: Chat
  - description: OpenAI Responses API compatible endpoint
    name: Responses
  - description: Google-compatible interactions endpoint
    name: Interactions
  - description: Model registry and capabilities
    name: Models
  - description: Synchronous image generation
    name: Images
  - description: Text-to-speech and speech-to-text
    name: Audio
  - description: Asynchronous video generation
    name: Videos
  - description: Reusable file storage for media inputs and generated outputs
    name: Files
  - description: Async generation status and downloads
    name: Artifacts
  - description: OpenAI-compatible embeddings
    name: Embeddings
  - description: Recorded HTTP request/response generations
    name: Generations
  - description: System health and status
    name: System
  - description: Roundtable endpoint — fan out a query to multiple LLMs and combine results
    name: Roundtable
  - description: Web search, fetch, and other utility tools
    name: Tools
  - description: Caller identity, credits, and usage
    name: Account
  - description: >-
      Programmatic project and API-key management. Authenticates with an
      `op-mak-…` management token; available on the control_plane and enterprise
      plans.
    name: Management
paths:
  /v3/compat/decisions:
    post:
      tags:
        - Compatibility
      summary: Decisions API
      description: >-
        OpenAI Decisions-compatible synchronous evaluation. Send `model`,
        `input` (a string, or user messages with `input_text` and inline base64
        `input_image` parts) and typed `questions` (`predicate`, `choice`,
        `score`); `answers` come back in question order with probabilities and
        confidence; a question the model declines comes back as a `refusal`
        answer. A bare model name is OpenAI's, e.g. `gpt-6-luna`, which is
        called natively and answers with OpenAI's body unchanged. Other decision
        models are addressed by their full catalog ID, e.g.
        `typesafe/jev-latest`, `opper/kev-4b` or `greenpt/metis` (list available
        endpoints with `GET /v3/models?type=evaluation`); those are reached by
        translation to System One and accept text input only. GreenPT Metis
        receives all 1–32 questions together in one upstream request.
        Translation preserves question order, probabilities and confidence, but
        joins text-message boundaries and does not expose native impact, score
        legends or additional answer metadata; use the System One endpoint for
        the native contract. Billed on input tokens. Uses a project-scoped Opper
        API key, Comply policies and provider entitlements. Cost and generation
        ID are returned in headers. Streaming is unsupported.
      operationId: createDecision
      parameters:
        - description: >-
            Function name for tracing and project-level guardrail function-scope
            filtering.
          in: header
          name: X-Opper-Name
          schema:
            type: string
        - description: Parent span ID for distributed tracing context.
          in: header
          name: X-Opper-Parent-Span-Id
          schema:
            format: uuid
            type: string
        - description: >-
            Comma-separated `key:value` usage-attribution tags (e.g.
            `tenant:acme,project:demo`, max 8). Recorded on the generation's
            billing/metrics rows; group spend by any key via GET
            /v2/analytics/usage?group_by=<key>. Header-borne twin of the
            /v3/session URL prefix tags (which win per key when both are
            present); `opper.`-prefixed keys and `session_id` are reserved.
            Malformed values return 400.
          in: header
          name: X-Opper-Tags
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DecisionRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DecisionResponse'
          description: Successful response
          headers:
            X-Generation-Cost:
              description: Execution cost in USD, matching X-Opper-Cost.
              schema:
                format: double
                type: number
            X-Generation-Id:
              description: Opper generation ID for this evaluation.
              schema:
                type: string
            X-Opper-Cost:
              description: Execution cost of the request as a floating-point number.
              schema:
                format: double
                type: number
            X-Opper-Trace-Id:
              description: Trace UUID for this evaluation.
              schema:
                format: uuid
                type: string
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad request
        '401':
          description: Unauthorized - missing or invalid API key
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal server error
components:
  schemas:
    DecisionRequest:
      additionalProperties: false
      properties:
        input:
          oneOf:
            - type: string
            - items:
                properties:
                  content:
                    oneOf:
                      - type: string
                      - items:
                          oneOf:
                            - properties:
                                text:
                                  type: string
                                type:
                                  enum:
                                    - input_text
                                  type: string
                              required:
                                - type
                                - text
                              type: object
                            - properties:
                                detail:
                                  description: Image detail level. Defaults to auto.
                                  enum:
                                    - low
                                    - high
                                    - auto
                                    - original
                                  type: string
                                image_url:
                                  description: >-
                                    Inline base64 data URL. Hosted URLs and file
                                    IDs are not accepted.
                                  pattern: '^data:'
                                  type: string
                                type:
                                  enum:
                                    - input_image
                                  type: string
                              required:
                                - type
                                - image_url
                              type: object
                        minItems: 1
                        type: array
                  role:
                    enum:
                      - user
                    type: string
                  type:
                    enum:
                      - message
                    type: string
                required:
                  - role
                  - content
                type: object
              minItems: 1
              type: array
        model:
          example: gpt-6-luna
          minLength: 1
          type: string
        questions:
          items:
            $ref: '#/components/schemas/DecisionQuestion'
          minItems: 1
          type: array
        safety_identifier:
          description: >-
            Accepted for compatibility with OpenAI's API, then dropped: Opper
            neither forwards nor stores it. Requests to OpenAI carry Opper's own
            identifier for your project.
          type: string
      required:
        - model
        - input
        - questions
      type: object
    DecisionResponse:
      additionalProperties: true
      properties:
        answers:
          description: One answer per question, in question order.
          items:
            $ref: '#/components/schemas/DecisionAnswer'
          type: array
        model:
          type: string
        usage:
          $ref: '#/components/schemas/DecisionUsage'
      required:
        - model
        - answers
        - usage
      type: object
    ErrorResponse:
      properties:
        error:
          properties:
            code:
              type: string
            details:
              description: Any value
            message:
              type: string
          required:
            - code
            - message
          type: object
        meta:
          type: object
      required:
        - error
      type: object
    DecisionQuestion:
      oneOf:
        - additionalProperties: false
          properties:
            instructions:
              type: string
            name:
              description: Unique within the request; echoed on the answer.
              type: string
            type:
              enum:
                - predicate
              type: string
          required:
            - type
            - instructions
          type: object
        - additionalProperties: false
          properties:
            choices:
              items:
                additionalProperties: false
                properties:
                  description:
                    type: string
                  value:
                    description: >-
                      A string or a boolean. Values are typed: the string "true"
                      and the boolean true are different choices.
                    type:
                      - string
                      - boolean
                required:
                  - value
                type: object
              maxItems: 255
              minItems: 2
              type: array
            instructions:
              type: string
            name:
              description: Unique within the request; echoed on the answer.
              type: string
            type:
              enum:
                - choice
              type: string
          required:
            - type
            - instructions
            - choices
          type: object
        - additionalProperties: false
          properties:
            instructions:
              type: string
            levels:
              description: Ordered from lowest to highest; level indices start at 0.
              items:
                additionalProperties: false
                properties:
                  description:
                    type: string
                  label:
                    type: string
                required:
                  - label
                type: object
              maxItems: 10
              minItems: 2
              type: array
            name:
              description: Unique within the request; echoed on the answer.
              type: string
            type:
              enum:
                - score
              type: string
          required:
            - type
            - instructions
            - levels
          type: object
    DecisionAnswer:
      oneOf:
        - additionalProperties: true
          properties:
            name:
              type:
                - string
                - 'null'
            probability:
              maximum: 1
              minimum: 0
              type: number
            type:
              enum:
                - predicate
              type: string
          required:
            - type
            - probability
          type: object
        - additionalProperties: true
          properties:
            choice:
              description: >-
                A string or a boolean. Values are typed: the string "true" and
                the boolean true are different choices.
              type:
                - string
                - boolean
            confidence:
              maximum: 1
              minimum: 0
              type: number
            name:
              type:
                - string
                - 'null'
            probabilities:
              items:
                properties:
                  label:
                    type: string
                  probability:
                    maximum: 1
                    minimum: 0
                    type: number
                  value:
                    description: >-
                      A string or a boolean. Values are typed: the string "true"
                      and the boolean true are different choices.
                    type:
                      - string
                      - boolean
                required:
                  - value
                  - probability
                type: object
              type: array
            type:
              enum:
                - choice
              type: string
          required:
            - type
            - choice
            - confidence
            - probabilities
          type: object
        - additionalProperties: true
          properties:
            confidence:
              maximum: 1
              minimum: 0
              type: number
            name:
              type:
                - string
                - 'null'
            probabilities:
              items:
                properties:
                  label:
                    type: string
                  probability:
                    maximum: 1
                    minimum: 0
                    type: number
                  value:
                    minimum: 0
                    type: integer
                required:
                  - value
                  - probability
                type: object
              type: array
            score:
              description: Probability-weighted average of the level indices.
              maximum: 9
              minimum: 0
              type: number
            type:
              enum:
                - score
              type: string
          required:
            - type
            - score
            - confidence
            - probabilities
          type: object
        - additionalProperties: true
          properties:
            name:
              type:
                - string
                - 'null'
            type:
              enum:
                - refusal
              type: string
          required:
            - type
          type: object
    DecisionUsage:
      additionalProperties: true
      properties:
        input_tokens:
          minimum: 0
          type: integer
        output_tokens:
          minimum: 0
          type: integer
        total_tokens:
          minimum: 0
          type: integer
      required:
        - input_tokens
      type: object
  securitySchemes:
    BearerAuth:
      bearerFormat: API Key
      description: API key authentication. Pass your API key as a Bearer token.
      scheme: bearer
      type: http

````

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