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

# Create a message

> Create an Anthropic Messages-compatible response.

Messages requests are validated at the facade boundary and mapped into canonical gateway chat contracts before provider dispatch. Streaming responses use Anthropic-style SSE events while preserving gateway privacy, billing, and sanitized error behavior.



## OpenAPI

````yaml openapi.json POST /v1/messages
openapi: 3.1.0
info:
  contact:
    email: developers@trynito.ai
    name: Nito Developer Support
    url: https://docs.trynito.ai/support
  description: >-
    Nito developer API: inference, Fusion, model catalog, attestation, web
    retrieval, document parsing, API key management, balance, rate-limit
    snapshots, and MCP.
  termsOfService: https://trynito.ai/terms
  title: Nito API
  version: '2026-07-01'
servers:
  - description: Configured gateway
    url: https://app.trynito.ai
security: []
tags:
  - description: >-
      OpenAI Chat Completions-compatible inference routes backed by gateway
      routing, billing, privacy, and streaming controls.
    name: Chat
  - description: >-
      Stateless OpenAI Responses-compatible shims for agent clients, including
      the compact output-item endpoint used by standalone compaction flows.
    name: Responses
  - description: >-
      Anthropic Messages-compatible request, response, token-count, and
      streaming surfaces mapped into canonical gateway contracts.
    name: Messages
  - description: >-
      Model discovery and browser model-picker metadata for safe logical model
      selection.
    name: Models
  - description: >-
      Request-local Attestation metadata for supported Attestable models in the
      Confidential and Encrypted tiers.
    name: Attestation
  - description: >-
      Streamable HTTP MCP transport documented with resource-bound bearer-token
      authentication.
    name: MCP
  - description: >-
      Standalone, credential-authenticated web search and fetch without an
      inference model.
    name: Web
  - description: >-
      OAuth-authorized organization API key administration with explicit consent
      and current owner/admin authorization.
    name: API Keys
  - description: >-
      Browser billing, usage, referral, balance, auto top-up, and x402 funding
      surfaces using integer nanos.
    name: Billing
externalDocs:
  description: Nito developer documentation
  url: https://docs.trynito.ai/nito
paths:
  /v1/messages:
    post:
      tags:
        - Messages
      summary: Create an Anthropic Messages-compatible message
      description: >-
        Create an Anthropic Messages-compatible response.


        Messages requests are validated at the facade boundary and mapped into
        canonical gateway chat contracts before provider dispatch. Streaming
        responses use Anthropic-style SSE events while preserving gateway
        privacy, billing, and sanitized error behavior.
      operationId: createAnthropicMessage
      requestBody:
        content:
          application/json:
            example:
              max_tokens: 128
              messages:
                - content: Say hello.
                  role: user
              model: anthropic/claude-sonnet-4
            schema:
              $ref: '#/components/schemas/AnthropicMessagesRequest'
        description: >-
          Request payload for `createAnthropicMessage`. Examples use
          placeholder-safe values and do not include real secrets or private
          prompt content.
        required: true
      responses:
        '200':
          content:
            application/json:
              example:
                content:
                  - text: Hello.
                    type: text
                id: msg_test_123
                model: anthropic/claude-sonnet-4
                role: assistant
                stop_reason: end_turn
                stop_sequence: null
                type: message
                usage:
                  customer_cost:
                    amount_nanos: '125000'
                    currency_code: USD
                  input_tokens: 12
                  output_tokens: 5
                  server_tool_use:
                    web_search_requests: 1
              schema:
                $ref: '#/components/schemas/AnthropicMessageResponse'
            text/event-stream:
              example: >
                event: message_start

                data:
                {"type":"message_start","message":{"id":"msg_test_123","type":"message","role":"assistant","content":[],"model":"anthropic/claude-sonnet-4","usage":{"input_tokens":12,"output_tokens":0}}}


                event: content_block_delta

                data:
                {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Hello."}}


                event: message_delta

                data:
                {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":12,"output_tokens":5,"customer_cost":{"amount_nanos":"125000","currency_code":"USD"}}}


                event: message_stop

                data: {"type":"message_stop"}
              schema:
                additionalProperties: true
                type: object
          description: Anthropic JSON response or server-sent event stream.
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
        '400':
          content:
            application/json:
              example:
                error:
                  message: The request is invalid.
                  type: invalid_request_error
                type: error
              schema:
                $ref: '#/components/schemas/AnthropicErrorResponse'
          description: Invalid Anthropic-compatible request
        '401':
          content:
            application/json:
              example:
                error:
                  message: authentication required
                  type: authentication_error
                type: error
              schema:
                $ref: '#/components/schemas/AnthropicErrorResponse'
          description: Anthropic-compatible authentication required
        '402':
          content:
            application/json:
              example:
                error:
                  message: >-
                    billing credits or an active subscription are required for
                    this request
                  type: api_error
                type: error
              schema:
                $ref: '#/components/schemas/AnthropicErrorResponse'
          description: Payment required
        '403':
          content:
            application/json:
              example:
                error:
                  message: credential is not authorized for this operation
                  type: permission_error
                type: error
              schema:
                $ref: '#/components/schemas/AnthropicErrorResponse'
          description: Anthropic-compatible request forbidden
        '413':
          content:
            application/json:
              example:
                error:
                  message: request body is too large
                  type: request_too_large
                type: error
              schema:
                $ref: '#/components/schemas/AnthropicErrorResponse'
          description: Anthropic-compatible request too large
        '429':
          content:
            application/json:
              example:
                error:
                  message: rate limited
                  type: rate_limit_error
                type: error
              schema:
                $ref: '#/components/schemas/AnthropicErrorResponse'
          description: Anthropic-compatible request rate limited or quota exhausted
          headers:
            Retry-After:
              description: >-
                Seconds to wait before retrying when the gateway can compute a
                retry window.
              example: '60'
              schema:
                type: string
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
        '500':
          content:
            application/json:
              example:
                error:
                  message: internal error
                  type: api_error
                type: error
              schema:
                $ref: '#/components/schemas/AnthropicErrorResponse'
          description: Anthropic-compatible internal server error
        '503':
          content:
            application/json:
              example:
                error:
                  message: service unavailable
                  type: overloaded_error
                type: error
              schema:
                $ref: '#/components/schemas/AnthropicErrorResponse'
          description: Anthropic-compatible service unavailable
      security:
        - PublicApiBearer: []
        - PublicApiKeyHeader: []
        - CliOAuthBearer: []
components:
  schemas:
    AnthropicMessagesRequest:
      additionalProperties: false
      description: >-
        Schema for `AnthropicMessagesRequest` values returned by or accepted by
        the Nito gateway.
      example:
        max_tokens: 128
        messages:
          - content: Say hello.
            role: user
        model: anthropic/claude-sonnet-4
      properties:
        max_tokens:
          description: The `max_tokens` field on `AnthropicMessagesRequest`.
          example: 12
          type: integer
        messages:
          description: The `messages` field on `AnthropicMessagesRequest`.
          example: []
          items:
            description: >-
              Nested schema within `AnthropicMessagesRequest` for
              `AnthropicMessagesRequest.messages.items`.
            oneOf:
              - additionalProperties: false
                description: >-
                  Nested schema within `AnthropicMessagesRequest` for
                  `AnthropicMessagesRequest.messages.items.oneOf[0]`.
                properties:
                  content:
                    description: The `content` field on `AnthropicMessagesRequest`.
                    example: Say hello.
                    oneOf:
                      - description: >-
                          Nested schema within `AnthropicMessagesRequest` for
                          `AnthropicMessagesRequest.messages.items.oneOf[0].content.oneOf[0]`.
                        type: string
                      - description: >-
                          Nested schema within `AnthropicMessagesRequest` for
                          `AnthropicMessagesRequest.messages.items.oneOf[0].content.oneOf[1]`.
                        items:
                          description: >-
                            Nested schema within `AnthropicMessagesRequest` for
                            `AnthropicMessagesRequest.messages.items.oneOf[0].content.oneOf[1].items`.
                          oneOf:
                            - additionalProperties: false
                              description: >-
                                Nested schema within `AnthropicMessagesRequest`
                                for
                                `AnthropicMessagesRequest.messages.items.oneOf[0].content.oneOf[1].items.oneOf[0]`.
                              properties:
                                cache_control:
                                  additionalProperties: true
                                  description: >-
                                    The `cache_control` field on
                                    `AnthropicMessagesRequest`.
                                  example: {}
                                  type: object
                                text:
                                  description: >-
                                    The `text` field on
                                    `AnthropicMessagesRequest`.
                                  example: Say hello.
                                  pattern: .*\S.*
                                  type: string
                                type:
                                  const: text
                                  description: >-
                                    The `type` field on
                                    `AnthropicMessagesRequest`.
                                  example: text
                                  type: string
                              required:
                                - type
                                - text
                              type: object
                            - additionalProperties: false
                              description: >-
                                Nested schema within `AnthropicMessagesRequest`
                                for
                                `AnthropicMessagesRequest.messages.items.oneOf[0].content.oneOf[1].items.oneOf[1]`.
                              properties:
                                cache_control:
                                  additionalProperties: true
                                  description: >-
                                    The `cache_control` field on
                                    `AnthropicMessagesRequest`.
                                  example: {}
                                  type: object
                                content:
                                  description: >-
                                    The `content` field on
                                    `AnthropicMessagesRequest`.
                                  example: Say hello.
                                  oneOf:
                                    - description: >-
                                        Nested schema within
                                        `AnthropicMessagesRequest` for
                                        `AnthropicMessagesRequest.messages.items.oneOf[0].content.oneOf[1].items.oneOf[1].content.oneOf[0]`.
                                      type: string
                                    - description: >-
                                        Nested schema within
                                        `AnthropicMessagesRequest` for
                                        `AnthropicMessagesRequest.messages.items.oneOf[0].content.oneOf[1].items.oneOf[1].content.oneOf[1]`.
                                      items:
                                        additionalProperties: false
                                        description: >-
                                          Nested schema within
                                          `AnthropicMessagesRequest` for
                                          `AnthropicMessagesRequest.messages.items.oneOf[0].content.oneOf[1].items.oneOf[1].content.oneOf[1].items`.
                                        properties:
                                          cache_control:
                                            additionalProperties: true
                                            description: >-
                                              The `cache_control` field on
                                              `AnthropicMessagesRequest`.
                                            example: {}
                                            type: object
                                          text:
                                            description: >-
                                              The `text` field on
                                              `AnthropicMessagesRequest`.
                                            example: Say hello.
                                            type: string
                                          type:
                                            const: text
                                            description: >-
                                              The `type` field on
                                              `AnthropicMessagesRequest`.
                                            example: text
                                            type: string
                                        required:
                                          - type
                                          - text
                                        type: object
                                      minItems: 1
                                      type: array
                                is_error:
                                  description: >-
                                    The `is_error` field on
                                    `AnthropicMessagesRequest`.
                                  example: true
                                  type: boolean
                                tool_use_id:
                                  description: >-
                                    The `tool_use_id` field on
                                    `AnthropicMessagesRequest`.
                                  example: 00000000-0000-4000-8000-000000000001
                                  pattern: .*\S.*
                                  type: string
                                type:
                                  const: tool_result
                                  description: >-
                                    The `type` field on
                                    `AnthropicMessagesRequest`.
                                  example: tool_result
                                  type: string
                              required:
                                - type
                                - tool_use_id
                              type: object
                            - additionalProperties: false
                              description: >-
                                Nested schema within `AnthropicMessagesRequest`
                                for
                                `AnthropicMessagesRequest.messages.items.oneOf[0].content.oneOf[1].items.oneOf[2]`.
                              properties:
                                cache_control:
                                  additionalProperties: true
                                  description: >-
                                    The `cache_control` field on
                                    `AnthropicMessagesRequest`.
                                  example: {}
                                  type: object
                                source:
                                  description: >-
                                    The `source` field on
                                    `AnthropicMessagesRequest`.
                                  example: {}
                                  oneOf:
                                    - additionalProperties: false
                                      description: >-
                                        Nested schema within
                                        `AnthropicMessagesRequest` for
                                        `AnthropicMessagesRequest.messages.items.oneOf[0].content.oneOf[1].items.oneOf[2].source.oneOf[0]`.
                                      properties:
                                        data:
                                          description: >-
                                            The `data` field on
                                            `AnthropicMessagesRequest`.
                                          example: example
                                          pattern: >-
                                            ^[A-Za-z0-9+/=_\s-]*[A-Za-z0-9+/=_-][A-Za-z0-9+/=_\s-]*$
                                          type: string
                                        media_type:
                                          description: >-
                                            The `media_type` field on
                                            `AnthropicMessagesRequest`.
                                          example: example
                                          pattern: .*\S.*
                                          type: string
                                        type:
                                          const: base64
                                          description: >-
                                            The `type` field on
                                            `AnthropicMessagesRequest`.
                                          example: base64
                                          type: string
                                      required:
                                        - type
                                        - media_type
                                        - data
                                      type: object
                                    - additionalProperties: false
                                      description: >-
                                        Nested schema within
                                        `AnthropicMessagesRequest` for
                                        `AnthropicMessagesRequest.messages.items.oneOf[0].content.oneOf[1].items.oneOf[2].source.oneOf[1]`.
                                      properties:
                                        media_type:
                                          description: >-
                                            The `media_type` field on
                                            `AnthropicMessagesRequest`.
                                          example: example
                                          type: string
                                        type:
                                          const: url
                                          description: >-
                                            The `type` field on
                                            `AnthropicMessagesRequest`.
                                          example: url
                                          type: string
                                        url:
                                          description: >-
                                            The `url` field on
                                            `AnthropicMessagesRequest`.
                                          example: https://example.com/callback
                                          pattern: >-
                                            ^[Hh][Tt][Tt][Pp][Ss]://(?!(?:[Ll][Oo][Cc][Aa][Ll][Hh][Oo][Ss][Tt]|[Ii][Pp]6-[Ll][Oo][Cc][Aa][Ll][Hh][Oo][Ss][Tt]|[Ii][Pp]6-[Ll][Oo][Oo][Pp][Bb][Aa][Cc][Kk]|[Mm][Ee][Tt][Aa][Dd][Aa][Tt][Aa]\.[Gg][Oo][Oo][Gg][Ll][Ee]\.[Ii][Nn][Tt][Ee][Rr][Nn][Aa][Ll]|[Mm][Ee][Tt][Aa][Dd][Aa][Tt][Aa]\.[Gg][Oo][Oo][Gg])(?::[0-9]+)?(?:[/?#]|$))(?!(?:0|10|127|22[4-9]|23[0-9])(?:\.[0-9]{1,3}){3}(?::[0-9]+)?(?:[/?#]|$))(?!(?:169\.254|192\.168)(?:\.[0-9]{1,3}){2}(?::[0-9]+)?(?:[/?#]|$))(?!(?:172\.(?:1[6-9]|2[0-9]|3[0-1]))(?:\.[0-9]{1,3}){2}(?::[0-9]+)?(?:[/?#]|$))(?!(?:\[(?![23][0-9A-Fa-f]{0,3}:)[0-9A-Fa-f:.]+\])(?::[0-9]+)?(?:[/?#]|$))[^@\s/?#]+(?::[0-9]+)?(?:[/?#]\S*)?$
                                          type: string
                                      required:
                                        - type
                                        - url
                                      type: object
                                title:
                                  description: >-
                                    The `title` field on
                                    `AnthropicMessagesRequest`.
                                  example: example
                                  type: string
                                type:
                                  const: image
                                  description: >-
                                    The `type` field on
                                    `AnthropicMessagesRequest`.
                                  example: image
                                  type: string
                              required:
                                - type
                                - source
                              type: object
                            - additionalProperties: false
                              description: >-
                                Nested schema within `AnthropicMessagesRequest`
                                for
                                `AnthropicMessagesRequest.messages.items.oneOf[0].content.oneOf[1].items.oneOf[3]`.
                              properties:
                                cache_control:
                                  additionalProperties: true
                                  description: >-
                                    The `cache_control` field on
                                    `AnthropicMessagesRequest`.
                                  example: {}
                                  type: object
                                source:
                                  description: >-
                                    The `source` field on
                                    `AnthropicMessagesRequest`.
                                  example: {}
                                  oneOf:
                                    - additionalProperties: false
                                      description: >-
                                        Nested schema within
                                        `AnthropicMessagesRequest` for
                                        `AnthropicMessagesRequest.messages.items.oneOf[0].content.oneOf[1].items.oneOf[3].source.oneOf[0]`.
                                      properties:
                                        data:
                                          description: >-
                                            The `data` field on
                                            `AnthropicMessagesRequest`.
                                          example: example
                                          pattern: >-
                                            ^[A-Za-z0-9+/=_\s-]*[A-Za-z0-9+/=_-][A-Za-z0-9+/=_\s-]*$
                                          type: string
                                        media_type:
                                          description: >-
                                            The `media_type` field on
                                            `AnthropicMessagesRequest`.
                                          example: example
                                          pattern: .*\S.*
                                          type: string
                                        type:
                                          const: base64
                                          description: >-
                                            The `type` field on
                                            `AnthropicMessagesRequest`.
                                          example: base64
                                          type: string
                                      required:
                                        - type
                                        - media_type
                                        - data
                                      type: object
                                    - additionalProperties: false
                                      description: >-
                                        Nested schema within
                                        `AnthropicMessagesRequest` for
                                        `AnthropicMessagesRequest.messages.items.oneOf[0].content.oneOf[1].items.oneOf[3].source.oneOf[1]`.
                                      properties:
                                        media_type:
                                          description: >-
                                            The `media_type` field on
                                            `AnthropicMessagesRequest`.
                                          enum:
                                            - ''
                                            - application/pdf
                                          example: application/pdf
                                          type: string
                                        type:
                                          const: url
                                          description: >-
                                            The `type` field on
                                            `AnthropicMessagesRequest`.
                                          example: url
                                          type: string
                                        url:
                                          description: >-
                                            The `url` field on
                                            `AnthropicMessagesRequest`.
                                          example: https://example.com/callback
                                          pattern: >-
                                            ^[Hh][Tt][Tt][Pp][Ss]://(?!(?:[Ll][Oo][Cc][Aa][Ll][Hh][Oo][Ss][Tt]|[Ii][Pp]6-[Ll][Oo][Cc][Aa][Ll][Hh][Oo][Ss][Tt]|[Ii][Pp]6-[Ll][Oo][Oo][Pp][Bb][Aa][Cc][Kk]|[Mm][Ee][Tt][Aa][Dd][Aa][Tt][Aa]\.[Gg][Oo][Oo][Gg][Ll][Ee]\.[Ii][Nn][Tt][Ee][Rr][Nn][Aa][Ll]|[Mm][Ee][Tt][Aa][Dd][Aa][Tt][Aa]\.[Gg][Oo][Oo][Gg])(?::[0-9]+)?(?:[/?#]|$))(?!(?:0|10|127|22[4-9]|23[0-9])(?:\.[0-9]{1,3}){3}(?::[0-9]+)?(?:[/?#]|$))(?!(?:169\.254|192\.168)(?:\.[0-9]{1,3}){2}(?::[0-9]+)?(?:[/?#]|$))(?!(?:172\.(?:1[6-9]|2[0-9]|3[0-1]))(?:\.[0-9]{1,3}){2}(?::[0-9]+)?(?:[/?#]|$))(?!(?:\[(?![23][0-9A-Fa-f]{0,3}:)[0-9A-Fa-f:.]+\])(?::[0-9]+)?(?:[/?#]|$))[^@\s/?#]+(?::[0-9]+)?(?:[/?#]\S*)?$
                                          type: string
                                      required:
                                        - type
                                        - url
                                      type: object
                                title:
                                  description: >-
                                    The `title` field on
                                    `AnthropicMessagesRequest`.
                                  example: example
                                  type: string
                                type:
                                  const: document
                                  description: >-
                                    The `type` field on
                                    `AnthropicMessagesRequest`.
                                  example: document
                                  type: string
                              required:
                                - type
                                - source
                              type: object
                        minItems: 1
                        type: array
                  role:
                    const: user
                    description: The `role` field on `AnthropicMessagesRequest`.
                    example: user
                    type: string
                required:
                  - role
                  - content
                type: object
              - additionalProperties: false
                description: >-
                  Nested schema within `AnthropicMessagesRequest` for
                  `AnthropicMessagesRequest.messages.items.oneOf[1]`.
                properties:
                  content:
                    description: The `content` field on `AnthropicMessagesRequest`.
                    example: Say hello.
                    oneOf:
                      - description: >-
                          Nested schema within `AnthropicMessagesRequest` for
                          `AnthropicMessagesRequest.messages.items.oneOf[1].content.oneOf[0]`.
                        type: string
                      - description: >-
                          Nested schema within `AnthropicMessagesRequest` for
                          `AnthropicMessagesRequest.messages.items.oneOf[1].content.oneOf[1]`.
                        items:
                          description: >-
                            Nested schema within `AnthropicMessagesRequest` for
                            `AnthropicMessagesRequest.messages.items.oneOf[1].content.oneOf[1].items`.
                          oneOf:
                            - additionalProperties: false
                              description: >-
                                Nested schema within `AnthropicMessagesRequest`
                                for
                                `AnthropicMessagesRequest.messages.items.oneOf[1].content.oneOf[1].items.oneOf[0]`.
                              properties:
                                cache_control:
                                  additionalProperties: true
                                  description: >-
                                    The `cache_control` field on
                                    `AnthropicMessagesRequest`.
                                  example: {}
                                  type: object
                                text:
                                  description: >-
                                    The `text` field on
                                    `AnthropicMessagesRequest`.
                                  example: Say hello.
                                  type: string
                                type:
                                  const: text
                                  description: >-
                                    The `type` field on
                                    `AnthropicMessagesRequest`.
                                  example: text
                                  type: string
                              required:
                                - type
                                - text
                              type: object
                            - additionalProperties: false
                              description: >-
                                Nested schema within `AnthropicMessagesRequest`
                                for
                                `AnthropicMessagesRequest.messages.items.oneOf[1].content.oneOf[1].items.oneOf[1]`.
                              properties:
                                cache_control:
                                  additionalProperties: true
                                  description: >-
                                    The `cache_control` field on
                                    `AnthropicMessagesRequest`.
                                  example: {}
                                  type: object
                                id:
                                  description: >-
                                    The `id` field on
                                    `AnthropicMessagesRequest`.
                                  example: 00000000-0000-4000-8000-000000000001
                                  pattern: .*\S.*
                                  type: string
                                input:
                                  additionalProperties: true
                                  description: >-
                                    The `input` field on
                                    `AnthropicMessagesRequest`.
                                  example: {}
                                  type: object
                                name:
                                  description: >-
                                    The `name` field on
                                    `AnthropicMessagesRequest`.
                                  example: example
                                  pattern: .*\S.*
                                  type: string
                                type:
                                  const: tool_use
                                  description: >-
                                    The `type` field on
                                    `AnthropicMessagesRequest`.
                                  example: tool_use
                                  type: string
                              required:
                                - type
                                - id
                                - name
                              type: object
                            - additionalProperties: false
                              description: >-
                                Nested schema within `AnthropicMessagesRequest`
                                for
                                `AnthropicMessagesRequest.messages.items.oneOf[1].content.oneOf[1].items.oneOf[2]`.
                              properties:
                                signature:
                                  description: >-
                                    The `signature` field on
                                    `AnthropicMessagesRequest`.
                                  example: example
                                  type: string
                                thinking:
                                  description: >-
                                    The `thinking` field on
                                    `AnthropicMessagesRequest`.
                                  example: example
                                  type: string
                                type:
                                  const: thinking
                                  description: >-
                                    The `type` field on
                                    `AnthropicMessagesRequest`.
                                  example: thinking
                                  type: string
                              required:
                                - type
                              type: object
                            - additionalProperties: false
                              description: >-
                                Nested schema within `AnthropicMessagesRequest`
                                for
                                `AnthropicMessagesRequest.messages.items.oneOf[1].content.oneOf[1].items.oneOf[3]`.
                              properties:
                                data:
                                  description: >-
                                    The `data` field on
                                    `AnthropicMessagesRequest`.
                                  example: example
                                  type: string
                                type:
                                  const: redacted_thinking
                                  description: >-
                                    The `type` field on
                                    `AnthropicMessagesRequest`.
                                  example: redacted_thinking
                                  type: string
                              required:
                                - type
                                - data
                              type: object
                        minItems: 1
                        type: array
                  role:
                    const: assistant
                    description: The `role` field on `AnthropicMessagesRequest`.
                    example: assistant
                    type: string
                required:
                  - role
                  - content
                type: object
          minItems: 1
          type: array
        metadata:
          additionalProperties: false
          description: The `metadata` field on `AnthropicMessagesRequest`.
          example: {}
          properties:
            user_id:
              description: The `user_id` field on `AnthropicMessagesRequest`.
              example: 00000000-0000-4000-8000-000000000001
              type: string
          type: object
        model:
          description: The `model` field on `AnthropicMessagesRequest`.
          example: openai/gpt-5.5
          type: string
        output_config:
          additionalProperties: false
          description: The `output_config` field on `AnthropicMessagesRequest`.
          example: {}
          properties:
            effort:
              description: The `effort` field on `AnthropicMessagesRequest`.
              enum:
                - low
                - medium
                - high
                - xhigh
                - max
              example: low
              type: string
          type: object
        service_tier:
          description: The `service_tier` field on `AnthropicMessagesRequest`.
          example: example
          type: string
        stream:
          description: The `stream` field on `AnthropicMessagesRequest`.
          example: true
          type: boolean
        system:
          description: The `system` field on `AnthropicMessagesRequest`.
          example: example
          oneOf:
            - description: >-
                Nested schema within `AnthropicMessagesRequest` for
                `AnthropicMessagesRequest.system.oneOf[0]`.
              type: string
            - description: >-
                Nested schema within `AnthropicMessagesRequest` for
                `AnthropicMessagesRequest.system.oneOf[1]`.
              items:
                additionalProperties: false
                description: >-
                  Nested schema within `AnthropicMessagesRequest` for
                  `AnthropicMessagesRequest.system.oneOf[1].items`.
                properties:
                  cache_control:
                    additionalProperties: true
                    description: The `cache_control` field on `AnthropicMessagesRequest`.
                    example: {}
                    type: object
                  text:
                    description: The `text` field on `AnthropicMessagesRequest`.
                    example: Say hello.
                    type: string
                  type:
                    const: text
                    description: The `type` field on `AnthropicMessagesRequest`.
                    example: text
                    type: string
                required:
                  - type
                  - text
                type: object
              type: array
        temperature:
          description: The `temperature` field on `AnthropicMessagesRequest`.
          example: 0.5
          type: number
        thinking:
          additionalProperties: false
          description: The `thinking` field on `AnthropicMessagesRequest`.
          example: {}
          properties:
            budget_tokens:
              description: The `budget_tokens` field on `AnthropicMessagesRequest`.
              example: 12
              minimum: 1
              type: integer
            type:
              description: The `type` field on `AnthropicMessagesRequest`.
              enum:
                - enabled
                - disabled
                - adaptive
                - auto
              example: enabled
              type: string
          type: object
        tool_choice:
          description: The `tool_choice` field on `AnthropicMessagesRequest`.
          example: {}
          oneOf:
            - additionalProperties: false
              description: >-
                Nested schema within `AnthropicMessagesRequest` for
                `AnthropicMessagesRequest.tool_choice.oneOf[0]`.
              properties:
                type:
                  description: The `type` field on `AnthropicMessagesRequest`.
                  enum:
                    - auto
                    - none
                    - any
                  example: auto
                  type: string
              required:
                - type
              type: object
            - additionalProperties: false
              description: >-
                Nested schema within `AnthropicMessagesRequest` for
                `AnthropicMessagesRequest.tool_choice.oneOf[1]`.
              properties:
                name:
                  description: The `name` field on `AnthropicMessagesRequest`.
                  example: example
                  pattern: .*\S.*
                  type: string
                type:
                  const: tool
                  description: The `type` field on `AnthropicMessagesRequest`.
                  example: tool
                  type: string
              required:
                - type
                - name
              type: object
            - description: >-
                Nested schema within `AnthropicMessagesRequest` for
                `AnthropicMessagesRequest.tool_choice.oneOf[2]`.
              type: 'null'
        tools:
          description: The `tools` field on `AnthropicMessagesRequest`.
          example: []
          items:
            description: >-
              Nested schema within `AnthropicMessagesRequest` for
              `AnthropicMessagesRequest.tools.items`.
            oneOf:
              - additionalProperties: false
                description: >-
                  Nested schema within `AnthropicMessagesRequest` for
                  `AnthropicMessagesRequest.tools.items.oneOf[0]`.
                properties:
                  allowed_callers:
                    description: The `allowed_callers` field on `AnthropicMessagesRequest`.
                    example: []
                    items:
                      description: >-
                        Nested schema within `AnthropicMessagesRequest` for
                        `AnthropicMessagesRequest.tools.items.oneOf[0].allowed_callers.items`.
                      type: string
                    type: array
                  cache_control:
                    additionalProperties: true
                    description: The `cache_control` field on `AnthropicMessagesRequest`.
                    example: {}
                    type: object
                  description:
                    description: The `description` field on `AnthropicMessagesRequest`.
                    example: example
                    type: string
                  input_examples:
                    additionalProperties: true
                    description: The `input_examples` field on `AnthropicMessagesRequest`.
                    example: {}
                    type: object
                  input_schema:
                    additionalProperties: true
                    description: The `input_schema` field on `AnthropicMessagesRequest`.
                    example: {}
                    type: object
                  max_uses:
                    description: The `max_uses` field on `AnthropicMessagesRequest`.
                    example: 1
                    type: integer
                  name:
                    description: The `name` field on `AnthropicMessagesRequest`.
                    example: example
                    pattern: .*\S.*
                    type: string
                  type:
                    description: The `type` field on `AnthropicMessagesRequest`.
                    enum:
                      - custom
                    example: custom
                    type: string
                required:
                  - name
                  - input_schema
                type: object
              - additionalProperties: false
                description: >-
                  Nested schema within `AnthropicMessagesRequest` for
                  `AnthropicMessagesRequest.tools.items.oneOf[1]`.
                properties:
                  allowed_callers:
                    description: The `allowed_callers` field on `AnthropicMessagesRequest`.
                    example: []
                    items:
                      description: >-
                        Nested schema within `AnthropicMessagesRequest` for
                        `AnthropicMessagesRequest.tools.items.oneOf[0].allowed_callers.items`.
                      type: string
                    type: array
                  cache_control:
                    additionalProperties: true
                    description: The `cache_control` field on `AnthropicMessagesRequest`.
                    example: {}
                    type: object
                  description:
                    description: The `description` field on `AnthropicMessagesRequest`.
                    example: example
                    type: string
                  input_examples:
                    additionalProperties: true
                    description: The `input_examples` field on `AnthropicMessagesRequest`.
                    example: {}
                    type: object
                  input_schema:
                    additionalProperties: true
                    description: The `input_schema` field on `AnthropicMessagesRequest`.
                    example: {}
                    type: object
                  max_uses:
                    description: The `max_uses` field on `AnthropicMessagesRequest`.
                    example: 1
                    type: integer
                  name:
                    description: The `name` field on `AnthropicMessagesRequest`.
                    example: example
                    pattern: .*\S.*
                    type: string
                  type:
                    description: The `type` field on `AnthropicMessagesRequest`.
                    example: example
                    pattern: ^bash_
                    type: string
                required:
                  - type
                  - name
                type: object
              - additionalProperties: false
                description: >-
                  Nested schema within `AnthropicMessagesRequest` for
                  `AnthropicMessagesRequest.tools.items.oneOf[2]`.
                properties:
                  allowed_callers:
                    description: The `allowed_callers` field on `AnthropicMessagesRequest`.
                    example: []
                    items:
                      description: >-
                        Nested schema within `AnthropicMessagesRequest` for
                        `AnthropicMessagesRequest.tools.items.oneOf[0].allowed_callers.items`.
                      type: string
                    type: array
                  cache_control:
                    additionalProperties: true
                    description: The `cache_control` field on `AnthropicMessagesRequest`.
                    example: {}
                    type: object
                  description:
                    description: The `description` field on `AnthropicMessagesRequest`.
                    example: example
                    type: string
                  input_examples:
                    additionalProperties: true
                    description: The `input_examples` field on `AnthropicMessagesRequest`.
                    example: {}
                    type: object
                  input_schema:
                    additionalProperties: true
                    description: The `input_schema` field on `AnthropicMessagesRequest`.
                    example: {}
                    type: object
                  max_uses:
                    description: The `max_uses` field on `AnthropicMessagesRequest`.
                    example: 1
                    type: integer
                  name:
                    description: The `name` field on `AnthropicMessagesRequest`.
                    example: example
                    pattern: .*\S.*
                    type: string
                  type:
                    description: The `type` field on `AnthropicMessagesRequest`.
                    example: example
                    pattern: ^text_editor_
                    type: string
                required:
                  - type
                  - name
                type: object
              - additionalProperties: false
                description: >-
                  Nested schema within `AnthropicMessagesRequest` for
                  `AnthropicMessagesRequest.tools.items.oneOf[3]`.
                properties:
                  allowed_callers:
                    description: The `allowed_callers` field on `AnthropicMessagesRequest`.
                    example: []
                    items:
                      description: >-
                        Nested schema within `AnthropicMessagesRequest` for
                        `AnthropicMessagesRequest.tools.items.oneOf[3].allowed_callers.items`.
                      type: string
                    type: array
                  allowed_domains:
                    description: The `allowed_domains` field on `AnthropicMessagesRequest`.
                    example: []
                    items:
                      description: >-
                        Nested schema within `AnthropicMessagesRequest` for
                        `AnthropicMessagesRequest.tools.items.oneOf[3].allowed_domains.items`.
                      type: string
                    type: array
                  blocked_domains:
                    description: The `blocked_domains` field on `AnthropicMessagesRequest`.
                    example: []
                    items:
                      description: >-
                        Nested schema within `AnthropicMessagesRequest` for
                        `AnthropicMessagesRequest.tools.items.oneOf[3].blocked_domains.items`.
                      type: string
                    type: array
                  max_uses:
                    description: The `max_uses` field on `AnthropicMessagesRequest`.
                    example: 1
                    type: integer
                  name:
                    const: web_search
                    description: The `name` field on `AnthropicMessagesRequest`.
                    example: web_search
                    pattern: .*\S.*
                    type: string
                  response_inclusion:
                    description: >-
                      The `response_inclusion` field on
                      `AnthropicMessagesRequest`.
                    enum:
                      - full
                      - excluded
                    example: full
                    type: string
                  type:
                    description: The `type` field on `AnthropicMessagesRequest`.
                    enum:
                      - web_search_20250305
                      - web_search_20260209
                      - web_search_20260318
                    example: web_search_20250305
                    type: string
                  user_location:
                    additionalProperties: false
                    description: The `user_location` field on `AnthropicMessagesRequest`.
                    example: {}
                    properties:
                      city:
                        description: The `city` field on `AnthropicMessagesRequest`.
                        example: example
                        type: string
                      country:
                        description: The `country` field on `AnthropicMessagesRequest`.
                        example: US
                        type: string
                      region:
                        description: The `region` field on `AnthropicMessagesRequest`.
                        example: example
                        type: string
                      timezone:
                        description: The `timezone` field on `AnthropicMessagesRequest`.
                        example: example
                        type: string
                      type:
                        const: approximate
                        description: The `type` field on `AnthropicMessagesRequest`.
                        example: approximate
                        type: string
                    type: object
                required:
                  - type
                  - name
                type: object
          type: array
        top_p:
          description: The `top_p` field on `AnthropicMessagesRequest`.
          example: 0.5
          type: number
      required:
        - messages
      type: object
    AnthropicMessageResponse:
      description: >-
        Schema for `AnthropicMessageResponse` values returned by or accepted by
        the Nito gateway.
      example:
        content:
          - text: Hello.
            type: text
        id: msg_test_123
        model: anthropic/claude-sonnet-4
        role: assistant
        stop_reason: end_turn
        stop_sequence: null
        type: message
        usage:
          customer_cost:
            amount_nanos: '125000'
            currency_code: USD
          input_tokens: 12
          output_tokens: 5
          server_tool_use:
            web_search_requests: 1
      properties:
        content:
          description: The `content` field on `AnthropicMessageResponse`.
          example: []
          items:
            description: >-
              Nested schema within `AnthropicMessageResponse` for
              `AnthropicMessageResponse.content.items`.
            properties:
              id:
                description: The `id` field on `AnthropicMessageResponse`.
                example: 00000000-0000-4000-8000-000000000001
                type: string
              input:
                additionalProperties: true
                description: The `input` field on `AnthropicMessageResponse`.
                example: {}
                type: object
              name:
                description: The `name` field on `AnthropicMessageResponse`.
                example: example
                type: string
              text:
                description: The `text` field on `AnthropicMessageResponse`.
                example: Say hello.
                type: string
              thinking:
                description: The `thinking` field on `AnthropicMessageResponse`.
                example: example
                type: string
              type:
                description: The `type` field on `AnthropicMessageResponse`.
                example: example
                type: string
            required:
              - type
            type: object
          type: array
        id:
          description: The `id` field on `AnthropicMessageResponse`.
          example: 00000000-0000-4000-8000-000000000001
          type: string
        model:
          description: The `model` field on `AnthropicMessageResponse`.
          example: openai/gpt-5.5
          type: string
        role:
          description: The `role` field on `AnthropicMessageResponse`.
          enum:
            - assistant
          example: assistant
          type: string
        stop_reason:
          description: The `stop_reason` field on `AnthropicMessageResponse`.
          example: example
          type: string
        stop_sequence:
          description: The `stop_sequence` field on `AnthropicMessageResponse`.
          example: example
          oneOf:
            - description: >-
                Nested schema within `AnthropicMessageResponse` for
                `AnthropicMessageResponse.stop_sequence.oneOf[0]`.
              type: string
            - description: >-
                Nested schema within `AnthropicMessageResponse` for
                `AnthropicMessageResponse.stop_sequence.oneOf[1]`.
              type: 'null'
        type:
          description: The `type` field on `AnthropicMessageResponse`.
          enum:
            - message
          example: message
          type: string
        usage:
          description: The `usage` field on `AnthropicMessageResponse`.
          example: {}
          properties:
            cache_creation_input_tokens:
              description: >-
                The `cache_creation_input_tokens` field on
                `AnthropicMessageResponse`.
              example: 12
              type: integer
            cache_read_input_tokens:
              description: >-
                The `cache_read_input_tokens` field on
                `AnthropicMessageResponse`.
              example: 12
              type: integer
            customer_cost:
              description: >-
                Exact gateway-calculated customer charge after successful
                settlement. Omitted for subscription-included,
                free-tier-sponsored, failed, and voided requests; an explicitly
                zero-priced successful route returns amount_nanos as 0.
              example: {}
              properties:
                amount_nanos:
                  description: >-
                    Exact non-negative integer nanos paired with currency_code.
                    One currency unit is 1,000,000,000 nanos; for example
                    15000000 is USD 0.015.
                  example: '15000000'
                  pattern: ^[0-9]+$
                  type: string
                currency_code:
                  description: ISO 4217 currency code for amount_nanos.
                  example: USD
                  type: string
              required:
                - amount_nanos
                - currency_code
              type: object
            input_tokens:
              description: The `input_tokens` field on `AnthropicMessageResponse`.
              example: 12
              type: integer
            output_tokens:
              description: The `output_tokens` field on `AnthropicMessageResponse`.
              example: 12
              type: integer
            server_tool_use:
              description: The `server_tool_use` field on `AnthropicMessageResponse`.
              example: {}
              properties:
                web_search_requests:
                  description: >-
                    The `web_search_requests` field on
                    `AnthropicMessageResponse`.
                  example: 1
                  type: integer
              type: object
          required:
            - input_tokens
            - output_tokens
          type: object
      required:
        - id
        - type
        - role
        - content
        - model
        - stop_reason
        - stop_sequence
        - usage
      type: object
    AnthropicErrorResponse:
      description: >-
        Schema for `AnthropicErrorResponse` values returned by or accepted by
        the Nito gateway.
      example:
        error:
          message: example
          type: invalid_request_error
        type: error
      properties:
        error:
          description: The `error` field on `AnthropicErrorResponse`.
          example: {}
          properties:
            message:
              description: The `message` field on `AnthropicErrorResponse`.
              example: example
              type: string
            type:
              description: The `type` field on `AnthropicErrorResponse`.
              enum:
                - invalid_request_error
                - authentication_error
                - permission_error
                - not_found_error
                - request_too_large
                - rate_limit_error
                - overloaded_error
                - api_error
              example: invalid_request_error
              type: string
          required:
            - type
            - message
          type: object
        type:
          description: The `type` field on `AnthropicErrorResponse`.
          enum:
            - error
          example: error
          type: string
      required:
        - type
        - error
      type: object
  headers:
    RateLimitLimit:
      description: Maximum requests for the controlling gateway request-rate bucket.
      schema:
        type: string
    RateLimitRemaining:
      description: >-
        Additional requests immediately available in the controlling gateway
        request-rate bucket.
      schema:
        type: string
    RateLimitReset:
      description: >-
        UTC Unix epoch seconds, rounded up, when the controlling gateway
        request-rate bucket is fully replenished.
      schema:
        type: string
  securitySchemes:
    PublicApiBearer:
      description: 'Org API key as Authorization: Bearer z_sk_...'
      scheme: bearer
      type: http
    PublicApiKeyHeader:
      description: Org API-key compatibility header. CLI and MCP tokens are rejected here.
      in: header
      name: X-API-Key
      type: apiKey
    CliOAuthBearer:
      description: 'OAuth CLI access token as Authorization: Bearer nito_cli_...'
      scheme: bearer
      type: http

````

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