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

# Create a decision

> Answers a list of typed questions about one input. Each answer carries a probability instead of generated text. Available on the US server only. See [Decisions](https://www.assemblyai.com/docs/llm-gateway/decisions) for the full guide.



## OpenAPI

````yaml api-reference/specs/llm-gateway.yaml POST /decisions
openapi: 3.1.0
info:
  title: AAI Chat Completions API
  description: API for generating text with various language models.
  version: 1.0.0
servers:
  - url: https://llm-gateway.assemblyai.com/v1
    description: Production Server
    x-fern-server-name: Production
security:
  - ApiKey: []
paths:
  /decisions:
    post:
      summary: Create a decision
      description: >-
        Answers a list of typed questions about one input. Each answer carries a
        probability instead of generated text. Available on the US server only.
        See [Decisions](https://www.assemblyai.com/docs/llm-gateway/decisions)
        for the full guide.
      operationId: createDecision
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DecisionRequest'
            examples:
              decision_example:
                summary: Check a support call
                value:
                  model: gpt-6-luna
                  input: >-
                    Agent: Thanks for calling Northwind Internet, this is Priya.
                    Can I get your account number?

                    Customer: Sure, it's 4471-2209.

                    Agent: Thanks. And can you confirm the address on the
                    account?

                    Customer: 18 Harbor Lane. My internet has dropped three
                    times today and I work from home.

                    Agent: I'm sorry about that. There's an outage in your area.
                    A technician is already on it, and it should be fixed by 5
                    PM.

                    Customer: Okay, that's fine. Thanks for letting me know.
                  questions:
                    - type: predicate
                      name: confirmed_account_details
                      instructions: >-
                        Did the agent ask the caller to confirm their account
                        details?
                    - type: choice
                      name: call_outcome
                      instructions: How did the call end?
                      choices:
                        - value: resolved
                          description: The issue was fixed or fully answered on the call
                        - value: follow_up
                          description: The customer was told the issue will be fixed later
                        - value: escalated
                          description: The call was transferred or escalated
                    - type: score
                      name: customer_sentiment
                      instructions: How did the customer feel at the end of the call?
                      levels:
                        - label: negative
                          description: Upset or frustrated
                        - label: neutral
                          description: Neither upset nor pleased
                        - label: positive
                          description: Satisfied or thankful
      responses:
        '200':
          description: One answer per question, in request order.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DecisionResponse'
        '400':
          description: >-
            The request is invalid, or the model's provider needs an opt-in your
            account hasn't accepted. `metadata.errors` lists each problem.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        default:
          description: An unexpected error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    DecisionRequest:
      type: object
      description: >-
        The request body for the decisions endpoint. Unknown fields are
        rejected.
      properties:
        model:
          type: string
          enum:
            - gpt-6-luna
            - jev-1.13.0
          description: >-
            The model to use. `jev-1.13.0` requires accepting the Jev opt-in on
            the [Data
            Controls](https://www.assemblyai.com/dashboard/settings/data-controls)
            page.
        input:
          description: >-
            The evidence every question is asked about. A string, or an array of
            user messages made of `input_text` parts.
          oneOf:
            - type: string
            - type: array
              items:
                type: object
                additionalProperties: true
        questions:
          type: array
          minItems: 1
          maxItems: 400
          items:
            $ref: '#/components/schemas/DecisionQuestion'
          description: The questions to answer. Names must be unique.
        model_region:
          type: string
          enum:
            - global
          description: >-
            Optional. Set to `global` for global routing. Supported on
            `gpt-6-luna` only.
        prompt_cache_key:
          type: string
          description: Optional. Requests with the same key share a prompt cache.
        fallbacks:
          type: array
          items:
            $ref: '#/components/schemas/DecisionFallback'
          description: >-
            Models to try in order if the main request fails. See [Specify
            fallback
            models](https://www.assemblyai.com/docs/llm-gateway/fallback).
        fallback_config:
          $ref: '#/components/schemas/FallbackConfig'
      required:
        - model
        - input
        - questions
    DecisionResponse:
      type: object
      properties:
        request_id:
          type: string
          format: uuid
        model:
          type: string
          description: The model that answered.
        answers:
          type: array
          items:
            $ref: '#/components/schemas/DecisionAnswer'
          description: One answer per question, in request order.
        usage:
          $ref: '#/components/schemas/DecisionUsage'
    ErrorResponse:
      type: object
      properties:
        code:
          type: integer
          format: int32
          description: HTTP status code for the error.
        message:
          type: string
          description: A human-readable description of the error.
        request_id:
          type: string
          format: uuid
          description: Unique identifier for the request.
        metadata:
          type: object
          description: >-
            Optional. Present on 400 responses with per-field validation
            details.
          properties:
            errors:
              type: array
              items:
                type: string
              description: List of specific validation failure messages.
      required:
        - code
        - message
        - request_id
    DecisionQuestion:
      type: object
      properties:
        type:
          type: string
          enum:
            - predicate
            - choice
            - score
          description: >-
            `predicate` asks whether something is true, `choice` picks one of
            `choices`, and `score` places the input on the scale given by
            `levels`.
        name:
          type: string
          description: >-
            A name for the question, unique within the request. The answer
            carries the same name.
        instructions:
          description: >-
            The question. A string, or an array of `input_text` parts (and
            `input_image` parts on `gpt-6-luna`).
          oneOf:
            - type: string
            - type: array
              items:
                type: object
                additionalProperties: true
        choices:
          type: array
          minItems: 2
          items:
            $ref: '#/components/schemas/DecisionChoice'
          description: >-
            Required for `choice` questions, and not allowed for other types.
            Values must be unique.
        levels:
          type: array
          minItems: 2
          maxItems: 10
          items:
            $ref: '#/components/schemas/DecisionLevel'
          description: >-
            Required for `score` questions, and not allowed for other types.
            Ordered from lowest to highest.
      required:
        - type
        - name
        - instructions
    DecisionFallback:
      type: object
      description: >-
        A fallback for a decisions request. `input` and `questions` are
        inherited from the main request when omitted. Nested fallbacks aren't
        supported.
      properties:
        model:
          type: string
          enum:
            - gpt-6-luna
            - jev-1.13.0
        input:
          description: Overrides the main request's `input`.
          oneOf:
            - type: string
            - type: array
              items:
                type: object
                additionalProperties: true
        questions:
          type: array
          items:
            $ref: '#/components/schemas/DecisionQuestion'
          description: Overrides the main request's `questions`.
        model_region:
          type: string
          enum:
            - global
          description: Overrides the main request's `model_region`.
      required:
        - model
    FallbackConfig:
      type: object
      description: >-
        Configuration for fallback behavior. See [Specify fallback
        models](https://www.assemblyai.com/docs/llm-gateway/fallback) for more
        details.
      properties:
        retry:
          type: boolean
          default: true
          description: >-
            Whether to automatically retry the request once after 500ms on
            failure. Defaults to `true`.
        depth:
          type: integer
          minimum: 1
          maximum: 2
          default: 1
          description: >-
            The maximum number of fallbacks to traverse. Defaults to `1`, with a
            maximum of `2`.
    DecisionAnswer:
      type: object
      properties:
        type:
          type: string
          enum:
            - predicate
            - choice
            - score
        name:
          type: string
          description: The question's name.
        probability:
          type: number
          description: '`predicate` only. The probability that the statement is true.'
        choice:
          type: string
          description: '`choice` only. The most likely option''s value.'
        score:
          type: number
          description: '`score` only. The expected level index, weighted by probability.'
        probabilities:
          type: array
          items:
            $ref: '#/components/schemas/DecisionProbability'
          description: >-
            `choice` and `score` only. The probability of each option or level,
            in request order.
        confidence:
          type: number
          description: >-
            `choice` and `score` only. How concentrated the probabilities are,
            from 0 to 1.
    DecisionUsage:
      type: object
      properties:
        input_tokens:
          type: integer
        input_tokens_details:
          type: object
          properties:
            cached_tokens:
              type: integer
            cache_write_tokens:
              type: integer
        output_tokens:
          type: integer
        output_tokens_details:
          type: object
          properties:
            reasoning_tokens:
              type: integer
        total_tokens:
          type: integer
    DecisionChoice:
      type: object
      properties:
        value:
          type: string
          description: The value returned when this option is chosen.
        description:
          type: string
          description: What this option means.
      required:
        - value
    DecisionLevel:
      type: object
      properties:
        label:
          type: string
          description: The level's name.
        description:
          type: string
          description: What this level means.
      required:
        - label
    DecisionProbability:
      type: object
      properties:
        value:
          description: >-
            The option's value for `choice` questions, or the level's index for
            `score` questions.
          oneOf:
            - type: string
            - type: integer
        label:
          type: string
          description: '`score` only. The level''s label.'
        probability:
          type: number
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: Authorization

````