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

# POST /v1beta/decisions

> Available at the instance root or under a provider/namespace prefix. Shared paths select the wire dialect from client headers; without dialect evidence, the first listed route wins.



## OpenAPI

````yaml /generated/openapi.json post /v1beta/decisions
openapi: 3.1.0
info:
  description: >-
    Forwarding, management, portal and OAuth APIs generated from Rust types.
    Input and output schemas preserve their respective Serde contracts.
    Streaming events and WebSocket messages are documented alongside HTTP
    payloads.
  title: GPROXY HTTP API
  version: 4.3.3
servers: []
security:
  - bearer: []
  - anthropicKey: []
  - googleKey: []
  - queryKey: []
paths:
  /v1beta/decisions:
    post:
      tags:
        - Forwarding
      summary: POST /v1beta/decisions
      description: >-
        Available at the instance root or under a provider/namespace prefix.
        Shared paths select the wire dialect from client headers; without
        dialect evidence, the first listed route wins.
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Input_CreateDecisionRequestBody2'
        required: true
      responses:
        2XX:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Output_CreateDecisionResponseBody2'
          description: Successful protocol response
        default:
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/Output_Envelope'
                  - properties:
                      error:
                        $ref: '#/components/schemas/Output_ErrorDetail'
                    required:
                      - error
                    type: object
                  - allOf:
                      - $ref: '#/components/schemas/Output_ErrorEvent'
                      - properties:
                          type:
                            const: error
                        required:
                          - type
                        type: object
                  - properties:
                      error:
                        $ref: '#/components/schemas/Output_GenerateContentError'
                    required:
                      - error
                    type: object
            text/plain:
              schema:
                type: string
          description: Gateway or upstream error
components:
  schemas:
    Input_CreateDecisionRequestBody2:
      additionalProperties: true
      properties:
        input:
          $ref: '#/components/schemas/Input_DecisionInput2'
        model:
          type: string
        questions:
          additionalProperties:
            $ref: '#/components/schemas/Input_DecisionQuestion2'
          description: |-
            1–1,000 questions. Keys match `[A-Za-z0-9_-]+`, up to 64 characters;
            the model never sees them.
          type: object
      required:
        - model
        - input
        - questions
      type: object
    Output_CreateDecisionResponseBody2:
      additionalProperties: true
      properties:
        answers:
          additionalProperties:
            $ref: '#/components/schemas/Output_DecisionAnswer2'
          description: One answer per question, under the question's key.
          type: object
        prompt_feedback: true
        usage:
          anyOf:
            - $ref: '#/components/schemas/Output_InteractionUsage'
            - type: 'null'
      required:
        - answers
      type: object
    Output_Envelope:
      properties:
        error:
          $ref: '#/components/schemas/Output_EnvelopeBody'
      required:
        - error
      type: object
    Output_ErrorDetail:
      properties:
        code:
          type:
            - string
            - 'null'
        message:
          type: string
        param:
          type:
            - string
            - 'null'
        type:
          type:
            - string
            - 'null'
      required:
        - message
      type: object
    Output_ErrorEvent:
      additionalProperties: true
      properties:
        error:
          $ref: '#/components/schemas/Output_StreamError'
        request_id:
          type:
            - string
            - 'null'
      required:
        - error
      type: object
    Output_GenerateContentError:
      additionalProperties: true
      properties:
        code:
          format: int64
          type: integer
        details:
          items: true
          type:
            - array
            - 'null'
        message:
          type: string
        status:
          type:
            - string
            - 'null'
      required:
        - code
        - message
      type: object
    Input_DecisionInput2:
      anyOf:
        - type: string
        - $ref: '#/components/schemas/Input_InteractionContent'
        - items:
            $ref: '#/components/schemas/Input_InteractionContent'
          type: array
      description: |-
        Shared context for every question. Tool-call, tool-result and thought
        blocks are refused upstream.
    Input_DecisionQuestion2:
      oneOf:
        - additionalProperties: true
          description: |-
            Yes or no. Criteria say what yes and no mean when the question alone
            is ambiguous.
          properties:
            criteria:
              anyOf:
                - $ref: '#/components/schemas/Input_DecisionNoulCriteria'
                - type: 'null'
            instructions:
              $ref: '#/components/schemas/Input_DecisionInstructions2'
            type:
              const: noul
              type: string
          required:
            - type
            - instructions
          type: object
        - additionalProperties: true
          description: |-
            One of 2–255 options: option id to a description of when it applies,
            empty when the id explains itself. Upstream sorts the ids in UTF-8
            byte order.
          properties:
            criteria:
              additionalProperties:
                type: string
              type: object
            instructions:
              $ref: '#/components/schemas/Input_DecisionInstructions2'
            type:
              const: choice
              type: string
          required:
            - type
            - instructions
            - criteria
          type: object
        - additionalProperties: true
          description: |-
            2–255 non-empty level descriptions from lowest to highest, indexed
            from 0.
          properties:
            criteria:
              items:
                type: string
              type: array
            instructions:
              $ref: '#/components/schemas/Input_DecisionInstructions2'
            type:
              const: score
              type: string
          required:
            - type
            - instructions
            - criteria
          type: object
    Output_DecisionAnswer2:
      description: |-
        Probabilities are calibrated; `confidence` is the top outcome's
        probability, `max(noul, 1 - noul)` for a yes/no answer.
      oneOf:
        - additionalProperties: true
          properties:
            confidence:
              format: double
              type:
                - number
                - 'null'
            noul:
              description: Probability of yes, always within 0.01–0.99.
              format: double
              type:
                - number
                - 'null'
            type:
              const: noul
              type: string
          required:
            - type
          type: object
        - additionalProperties: true
          properties:
            choice:
              type:
                - string
                - 'null'
            confidence:
              format: double
              type:
                - number
                - 'null'
            probabilities:
              additionalProperties:
                format: double
                type: number
              type: object
            type:
              const: choice
              type: string
          required:
            - type
          type: object
        - additionalProperties: true
          properties:
            confidence:
              format: double
              type:
                - number
                - 'null'
            legend:
              additionalProperties:
                type: string
              description: Level index to the level's description.
              type: object
            probabilities:
              additionalProperties:
                format: double
                type: number
              type: object
            score:
              description: Probability-weighted average of the level indices.
              format: double
              type:
                - number
                - 'null'
            type:
              const: score
              type: string
          required:
            - type
          type: object
    Output_InteractionUsage:
      additionalProperties: true
      properties:
        cached_tokens_by_modality:
          items:
            $ref: '#/components/schemas/Output_InteractionModalityTokens'
          type: array
        grounding_tool_count:
          items:
            $ref: '#/components/schemas/Output_InteractionGroundingToolCount'
          type: array
        initial_input_tokens:
          format: uint64
          minimum: 0
          type:
            - integer
            - 'null'
        input_tokens_by_modality:
          items:
            $ref: '#/components/schemas/Output_InteractionModalityTokens'
          type: array
        output_tokens_by_modality:
          items:
            $ref: '#/components/schemas/Output_InteractionModalityTokens'
          type: array
        tool_use_tokens_by_modality:
          items:
            $ref: '#/components/schemas/Output_InteractionModalityTokens'
          type: array
        total_cached_tokens:
          format: uint64
          minimum: 0
          type:
            - integer
            - 'null'
        total_input_tokens:
          format: uint64
          minimum: 0
          type:
            - integer
            - 'null'
        total_output_tokens:
          format: uint64
          minimum: 0
          type:
            - integer
            - 'null'
        total_thought_tokens:
          format: uint64
          minimum: 0
          type:
            - integer
            - 'null'
        total_tokens:
          format: uint64
          minimum: 0
          type:
            - integer
            - 'null'
        total_tool_use_tokens:
          format: uint64
          minimum: 0
          type:
            - integer
            - 'null'
      type: object
    Output_EnvelopeBody:
      properties:
        code:
          type: string
        message:
          type: string
      required:
        - code
        - message
      type: object
    Output_StreamError:
      additionalProperties: true
      properties:
        message:
          type: string
        type:
          $ref: '#/components/schemas/Output_StreamErrorType'
      required:
        - type
        - message
      type: object
    Input_InteractionContent:
      oneOf:
        - $ref: '#/components/schemas/Input_InteractionText'
          properties:
            type:
              const: text
              type: string
          required:
            - type
          type: object
        - $ref: '#/components/schemas/Input_InteractionMedia'
          properties:
            type:
              const: image
              type: string
          required:
            - type
          type: object
        - $ref: '#/components/schemas/Input_InteractionMedia'
          properties:
            type:
              const: audio
              type: string
          required:
            - type
          type: object
        - $ref: '#/components/schemas/Input_InteractionMedia'
          properties:
            type:
              const: video
              type: string
          required:
            - type
          type: object
        - $ref: '#/components/schemas/Input_InteractionMedia'
          properties:
            type:
              const: document
              type: string
          required:
            - type
          type: object
    Input_DecisionNoulCriteria:
      additionalProperties: true
      properties:
        false_description:
          type:
            - string
            - 'null'
        true_description:
          type:
            - string
            - 'null'
      type: object
    Input_DecisionInstructions2:
      anyOf:
        - type: string
        - $ref: '#/components/schemas/Input_DecisionTextContent2'
        - items:
            $ref: '#/components/schemas/Input_DecisionTextContent2'
          type: array
      description: |-
        A question's instructions. Text only; adjacent blocks are concatenated
        with no separator.
    Output_InteractionModalityTokens:
      additionalProperties: true
      properties:
        modality:
          type: string
        tokens:
          format: uint64
          minimum: 0
          type: integer
      required:
        - modality
        - tokens
      type: object
    Output_InteractionGroundingToolCount:
      additionalProperties: true
      properties:
        count:
          format: uint64
          minimum: 0
          type: integer
        type:
          type: string
      required:
        - type
        - count
      type: object
    Output_StreamErrorType:
      enum:
        - api_error
        - authentication_error
        - billing_error
        - invalid_request_error
        - not_found_error
        - overloaded_error
        - permission_error
        - rate_limit_error
        - timeout_error
        - conflict_error
        - request_too_large
      type: string
    Input_InteractionText:
      additionalProperties: true
      properties:
        annotations:
          items: true
          type: array
        text:
          type: string
      required:
        - text
      type: object
    Input_InteractionMedia:
      additionalProperties: true
      properties:
        channels:
          format: uint64
          minimum: 0
          type:
            - integer
            - 'null'
        data:
          type:
            - string
            - 'null'
        metadata: true
        mime_type:
          type:
            - string
            - 'null'
        processing:
          anyOf:
            - $ref: '#/components/schemas/Input_InteractionMediaProcessing'
            - type: 'null'
        resolution:
          type:
            - string
            - 'null'
        sample_rate:
          format: uint64
          minimum: 0
          type:
            - integer
            - 'null'
        uri:
          type:
            - string
            - 'null'
      type: object
    Input_DecisionTextContent2:
      oneOf:
        - $ref: '#/components/schemas/Input_InteractionText'
          properties:
            type:
              const: text
              type: string
          required:
            - type
          type: object
    Input_InteractionMediaProcessing:
      anyOf:
        - $ref: '#/components/schemas/Input_InteractionProcessingMode'
        - $ref: '#/components/schemas/Input_StaticMediaProcessing'
    Input_InteractionProcessingMode:
      enum:
        - static
        - agentic
      type: string
    Input_StaticMediaProcessing:
      additionalProperties: true
      properties:
        content_layers:
          items:
            type: string
          type:
            - array
            - 'null'
        end_offset:
          type:
            - string
            - 'null'
        fps:
          format: double
          type:
            - number
            - 'null'
        page_options:
          anyOf:
            - $ref: '#/components/schemas/Input_PageProcessingOptions'
            - type: 'null'
        spreadsheet_options:
          anyOf:
            - $ref: '#/components/schemas/Input_SpreadsheetProcessingOptions'
            - type: 'null'
        start_offset:
          type:
            - string
            - 'null'
        type:
          $ref: '#/components/schemas/Input_StaticProcessingType'
      required:
        - type
      type: object
    Input_PageProcessingOptions:
      additionalProperties: true
      properties:
        content_layers:
          items:
            type: string
          type:
            - array
            - 'null'
        end_page:
          format: int64
          type:
            - integer
            - 'null'
        start_page:
          format: int64
          type:
            - integer
            - 'null'
      type: object
    Input_SpreadsheetProcessingOptions:
      additionalProperties: true
      properties:
        content_layers:
          items:
            type: string
          type:
            - array
            - 'null'
        sheet_index:
          format: int64
          type:
            - integer
            - 'null'
        visible_cells:
          type:
            - string
            - 'null'
      type: object
    Input_StaticProcessingType:
      enum:
        - static
      type: string
  securitySchemes:
    bearer:
      scheme: bearer
      type: http
    anthropicKey:
      in: header
      name: x-api-key
      type: apiKey
    googleKey:
      in: header
      name: x-goog-api-key
      type: apiKey
    queryKey:
      in: query
      name: key
      type: apiKey

````

## Related topics

- [Routing & Endpoints](https://gproxy.leenhawk.com/reference/routing-table.md)
- [Providers & Credentials](https://gproxy.leenhawk.com/guides/providers.md)
- [POST /v1beta/files](https://gproxy.leenhawk.com/api-reference/forwarding/post-v1betafiles.md)
- [POST /v1beta/interactions](https://gproxy.leenhawk.com/api-reference/forwarding/post-v1betainteractions.md)
- [POST /v1/decisions](https://gproxy.leenhawk.com/api-reference/forwarding/post-v1decisions.md)


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