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

# Evaluate System One questions

> Evaluate text or structured state against named noul, choice and score questions. Answers use the same question keys. Select a configured decision model with an Aixy API key. Native requests preserve the System One contract; compatible Decisions providers use explicit translation. Provider-specific limits still apply, including rubric size. Unrepresentable extensions fail explicitly. Streaming and output-token caps are unsupported. Hard budgets reject public calls with hard_budget_decision_unbounded. Decision content is processed transiently and is excluded from Activity content capture.



## OpenAPI

````yaml /openapi.json post /v1/systemone
openapi: 3.1.0
info:
  title: Aixy Inference API
  version: 0.1.0
  description: >-
    Route requests to configured AI providers through OpenAI- and
    Anthropic-compatible APIs. Aixy applies project access, model policies,
    guardrails, routing, budgets, and usage attribution before forwarding
    inference traffic. Create connections, API keys and policies in the Aixy
    dashboard. The management API is a dashboard service and is not a public
    integration contract. Native provider features depend on the selected model
    and connection; translated requests support the documented conversation and
    function-tool subset. Unsupported combinations return explicit errors.
    Examples use illustrative model IDs; select an ID available to your project.
servers:
  - url: https://api.aixy-gateway.com
    description: Aixy production gateway
security: []
tags:
  - name: OpenAI
    description: OpenAI-compatible conversations, function tools and incremental streams.
  - name: Anthropic
    description: Anthropic-compatible messages and provider-native input token counting.
  - name: Decisions
    description: Typed, non-streaming classification and scoring inference.
  - name: Models
    description: Discover the models available to your project API key.
paths:
  /v1/systemone:
    post:
      tags:
        - Decisions
      summary: Evaluate System One questions
      description: >-
        Evaluate text or structured state against named noul, choice and score
        questions. Answers use the same question keys. Select a configured
        decision model with an Aixy API key. Native requests preserve the System
        One contract; compatible Decisions providers use explicit translation.
        Provider-specific limits still apply, including rubric size.
        Unrepresentable extensions fail explicitly. Streaming and output-token
        caps are unsupported. Hard budgets reject public calls with
        hard_budget_decision_unbounded. Decision content is processed
        transiently and is excluded from Activity content capture.
      operationId: create_system_one_decision
      parameters:
        - $ref: '#/components/parameters/XRequestId'
        - $ref: '#/components/parameters/XAixyClient'
        - $ref: '#/components/parameters/XAixySession'
        - $ref: '#/components/parameters/XAixySessionId'
        - $ref: '#/components/parameters/XProvider'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SystemOneRequest'
            examples:
              basic:
                summary: Basic request
                value:
                  model: decision-provider/fastino/GLiDE
                  state: Please refund this damaged item.
                  questions:
                    team:
                      type: choice
                      instructions: Which team should handle this request?
                      criteria:
                        billing: Payments and refunds
                        technical: Technical problems
      responses:
        '200':
          description: Structured decision answers.
          headers:
            x-request-id:
              description: >-
                Aixy request identifier for correlation with Activity and
                support.
              schema:
                type: string
              example: req_example_01
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SystemOneResponse'
              example:
                answers:
                  team:
                    type: choice
                    choice: billing
                    confidence: 0.9
        '400':
          $ref: '#/components/responses/GatewayError'
        '401':
          $ref: '#/components/responses/GatewayError'
        '403':
          $ref: '#/components/responses/GatewayError'
        '404':
          $ref: '#/components/responses/GatewayError'
        '408':
          $ref: '#/components/responses/GatewayError'
        '413':
          $ref: '#/components/responses/GatewayError'
        '422':
          $ref: '#/components/responses/GatewayError'
        '424':
          $ref: '#/components/responses/GatewayError'
        '429':
          $ref: '#/components/responses/OpenAIRateLimitError'
        '500':
          $ref: '#/components/responses/InferenceInternalError'
        '502':
          $ref: '#/components/responses/GatewayError'
        '503':
          $ref: '#/components/responses/GatewayError'
        '504':
          $ref: '#/components/responses/GatewayError'
        default:
          $ref: '#/components/responses/NativeProviderError'
      security:
        - GatewayApiKey: []
components:
  parameters:
    XRequestId:
      name: X-Request-ID
      in: header
      required: false
      description: Optional caller-generated request identifier for end-to-end tracing.
      schema:
        type: string
        maxLength: 255
    XAixyClient:
      name: X-Aixy-Client
      in: header
      required: false
      description: >-
        Optional application[/version] for Activity attribution. Overrides
        User-Agent detection. Use a product name, not personal data or
        credentials. Names are 1-64 ASCII letters, digits, spaces, dots,
        underscores or hyphens, starting with a letter or digit. Optional
        versions start with a digit and use up to 32 letters, digits, dots,
        underscores, plus signs or hyphens. Invalid values are ignored. This
        self-declared label grants no permissions and is not forwarded.
      schema:
        type: string
        maxLength: 97
        example: Acme Support/1.2.3
    XAixySession:
      name: X-Aixy-Session
      in: header
      required: false
      description: >-
        Optional opaque session identifier for virtual routes with session
        affinity. Scoped to the authenticated caller and alias; never forwarded
        or recorded. Send full conversation history. Invalid values return 400
        when affinity is enabled. Omission retains the route's normal strategy.
      schema:
        type: string
        minLength: 1
        maxLength: 128
        pattern: ^[A-Za-z0-9._:-]+$
        example: conversation-82
    XAixySessionId:
      name: X-Aixy-Session-ID
      in: header
      required: false
      description: >-
        Optional opaque conversation identifier recorded in Activity metadata.
        Reuse it for every call in a conversation. Sessions are isolated by
        organization, project, user and API key. Use no personal data or
        secrets. Invalid values are ignored. The header is not forwarded, grants
        no permissions and does not change routing affinity.
      schema:
        type: string
        minLength: 1
        maxLength: 128
        pattern: ^[A-Za-z0-9._:-]+$
        example: conversation-82
    XProvider:
      name: X-Provider
      in: header
      required: false
      description: >-
        Select a configured provider without changing an unqualified model
        identifier. A provider-qualified model is preferred for new
        integrations.
      schema:
        type: string
  schemas:
    SystemOneRequest:
      type: object
      required:
        - model
        - state
        - questions
      not:
        anyOf:
          - required:
              - max_tokens
          - required:
              - max_output_tokens
          - required:
              - max_completion_tokens
      properties:
        model:
          type: string
          minLength: 1
          maxLength: 1048576
          description: Provider-qualified decision model or compatible Aixy routing alias.
        state:
          type:
            - string
            - object
            - array
        questions:
          type: object
          minProperties: 1
          maxProperties: 200
          additionalProperties:
            oneOf:
              - $ref: '#/components/schemas/SystemOneNoulQuestion'
              - $ref: '#/components/schemas/SystemOneChoiceQuestion'
              - $ref: '#/components/schemas/SystemOneScoreQuestion'
        stream:
          type: boolean
          const: false
          default: false
      additionalProperties: true
    SystemOneResponse:
      type: object
      required:
        - answers
      properties:
        model:
          type: string
        answers:
          type: object
          description: One answer under each original question key.
          additionalProperties:
            oneOf:
              - $ref: '#/components/schemas/SystemOneNoulAnswer'
              - $ref: '#/components/schemas/SystemOneChoiceAnswer'
              - $ref: '#/components/schemas/SystemOneScoreAnswer'
              - $ref: '#/components/schemas/SystemOneRefusalAnswer'
        usage:
          $ref: '#/components/schemas/DecisionUsage'
      additionalProperties: true
    SystemOneNoulQuestion:
      type: object
      required:
        - type
        - instructions
      properties:
        type:
          type: string
          const: noul
        instructions:
          type:
            - string
            - object
            - array
        criteria:
          type:
            - object
            - 'null'
          properties:
            'true':
              type:
                - string
                - object
                - array
                - 'null'
            'false':
              type:
                - string
                - object
                - array
                - 'null'
          additionalProperties: false
      additionalProperties: true
    SystemOneChoiceQuestion:
      type: object
      required:
        - type
        - instructions
        - criteria
      properties:
        type:
          type: string
          const: choice
        instructions:
          type:
            - string
            - object
            - array
        criteria:
          type: object
          minProperties: 2
          maxProperties: 255
          additionalProperties:
            type:
              - string
              - object
              - array
              - 'null'
      additionalProperties: true
    SystemOneScoreQuestion:
      type: object
      required:
        - type
        - instructions
        - criteria
      properties:
        type:
          type: string
          const: score
        instructions:
          type:
            - string
            - object
            - array
        criteria:
          description: >-
            Ordered levels or a native numeric-key rubric. Providers may impose
            smaller limits. Numeric-key rubrics require native System One
            support; distinct keys must denote finite, distinct scores.
          oneOf:
            - type: array
              minItems: 2
              maxItems: 255
              items:
                type:
                  - string
                  - object
                  - array
                  - 'null'
            - type: object
              minProperties: 2
              maxProperties: 255
              additionalProperties:
                type:
                  - string
                  - object
                  - array
                  - 'null'
      additionalProperties: true
    SystemOneNoulAnswer:
      type: object
      required:
        - type
        - noul
      properties:
        type:
          type: string
          const: noul
        noul:
          type: number
          minimum: 0
          maximum: 1
      additionalProperties: true
    SystemOneChoiceAnswer:
      type: object
      required:
        - type
        - choice
      properties:
        type:
          type: string
          const: choice
        choice:
          type: string
        probabilities:
          type: object
          additionalProperties:
            type: number
            minimum: 0
            maximum: 1
        confidence:
          type: number
          minimum: 0
          maximum: 1
      additionalProperties: true
    SystemOneScoreAnswer:
      type: object
      required:
        - type
        - score
      properties:
        type:
          type: string
          const: score
        score:
          type: number
        probabilities:
          type: object
          additionalProperties:
            type: number
            minimum: 0
            maximum: 1
        legend:
          type: object
          additionalProperties:
            type:
              - string
              - object
              - array
              - 'null'
        confidence:
          type: number
          minimum: 0
          maximum: 1
      additionalProperties: true
    SystemOneRefusalAnswer:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          const: refusal
      additionalProperties: true
    DecisionUsage:
      type: object
      properties:
        input_tokens:
          type: integer
          minimum: 0
        output_tokens:
          type: integer
          minimum: 0
        total_tokens:
          type: integer
          minimum: 0
        input_tokens_details:
          type: object
          additionalProperties: true
        output_tokens_details:
          type: object
          additionalProperties: true
      additionalProperties: true
    InferenceErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - message
          properties:
            message:
              type: string
            code:
              type:
                - string
                - 'null'
            type:
              type:
                - string
                - 'null'
            param:
              type:
                - string
                - integer
                - 'null'
            details:
              type:
                - object
                - 'null'
              additionalProperties: true
          additionalProperties: true
        type:
          type: string
        request_id:
          type: string
      additionalProperties: true
    AnthropicErrorResponse:
      type: object
      required:
        - type
        - error
      properties:
        type:
          type: string
          enum:
            - error
        error:
          type: object
          required:
            - type
            - message
          properties:
            type:
              type: string
            message:
              type: string
          additionalProperties: true
        request_id:
          type: string
      additionalProperties: true
  responses:
    GatewayError:
      description: >-
        The gateway or upstream provider rejected the request. Gateway codes
        identify invalid_request or unsupported_feature (400),
        invalid_gateway_api_key (401), access or policy denials (403),
        unavailable models (404), request deadlines (408/504), body limits
        (413), hard-budget admission failures (424), and upstream or gateway
        availability failures (502/503). Native provider error details may
        differ.
      headers:
        x-request-id:
          description: Aixy request identifier for correlation with Activity and support.
          schema:
            type: string
          example: req_example_01
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/InferenceErrorResponse'
          example:
            error:
              code: invalid_gateway_api_key
              message: Gateway API key is invalid or revoked
    OpenAIRateLimitError:
      description: >-
        Aixy or the OpenAI-compatible provider rejected the request because of a
        rate limit.
      headers:
        x-request-id:
          description: Aixy request identifier for correlation with Activity and support.
          schema:
            type: string
          example: req_example_01
        Retry-After:
          description: >-
            Optional retry delay. Aixy rate-limit rejections provide a positive
            delay in seconds; a provider may supply its own Retry-After value,
            including an HTTP date.
          required: false
          schema:
            type: string
          example: '60'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/InferenceErrorResponse'
          example:
            error:
              code: gateway_rate_limit_exceeded
              message: The configured rate limit was reached. Retry later.
    InferenceInternalError:
      description: >-
        An internal failure occurred. Some failures return a generic text
        response; record x-request-id and avoid relying on a JSON body for every
        server error.
      headers:
        x-request-id:
          description: Aixy request identifier for correlation with Activity and support.
          schema:
            type: string
          example: req_example_01
      content:
        text/plain:
          schema:
            type: string
          example: Internal Server Error
        application/json:
          schema:
            anyOf:
              - $ref: '#/components/schemas/InferenceErrorResponse'
              - $ref: '#/components/schemas/AnthropicErrorResponse'
    NativeProviderError:
      description: >-
        A native provider may return another error status and its original
        payload. After streaming starts, failures can arrive inside the SSE
        stream instead of changing the HTTP status. Handle both HTTP errors and
        protocol error events.
      headers:
        x-request-id:
          description: Aixy request identifier for correlation with Activity and support.
          schema:
            type: string
          example: req_example_01
      content:
        application/json:
          schema:
            type: object
            additionalProperties: true
  securitySchemes:
    GatewayApiKey:
      type: http
      scheme: bearer
      bearerFormat: gak_…
      description: >-
        A project-scoped Aixy API key. Create keys in the dashboard and send the
        secret as a Bearer token.

````

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