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

# Anthropic messages

> Anthropic Messages API with NordlysProxy routing.



## OpenAPI

````yaml openapi.yaml post /v1/messages
openapi: 3.0.3
info:
  description: OpenAPI documentation for Fiber applications
  title: NordlysProxy Inference API
  version: 1.0.0
servers: []
security: []
paths:
  /v1/messages:
    post:
      summary: Anthropic messages
      description: Anthropic Messages API with NordlysProxy routing.
      parameters:
        - in: header
          name: anthropic-beta
          schema:
            items:
              type: string
            type: array
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MessagesAnthropicMessageRequest'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnthropicSdkGoMessage'
          description: OK
      security:
        - apiKey: []
components:
  schemas:
    MessagesAnthropicMessageRequest:
      properties:
        max_tokens:
          example: 256
          format: int64
          type: integer
        messages:
          example:
            - content:
                - text: Explain nordlys routing.
                  type: text
              role: user
          items:
            $ref: '#/components/schemas/AnthropicSdkGoMessageParam'
          nullable: true
          type: array
        metadata:
          $ref: '#/components/schemas/AnthropicSdkGoMetadataParam'
        model:
          example: claude-sonnet-4-5
          type: string
        models:
          items:
            type: string
          nullable: true
          type: array
        provider_configs:
          additionalProperties:
            $ref: '#/components/schemas/RegistryProviderConfigOverride'
          nullable: true
          type: object
        provider_data_collection:
          type: string
        provider_enforce_distillable_text:
          nullable: true
          type: boolean
        provider_ignore:
          items:
            type: string
          nullable: true
          type: array
        provider_max_completion_price:
          nullable: true
          type: number
        provider_max_image_price:
          nullable: true
          type: number
        provider_max_prompt_price:
          nullable: true
          type: number
        provider_max_request_price:
          nullable: true
          type: number
        provider_only:
          items:
            type: string
          nullable: true
          type: array
        provider_order:
          items:
            type: string
          nullable: true
          type: array
        provider_quantizations:
          items:
            type: string
          nullable: true
          type: array
        provider_require_parameters:
          type: boolean
        provider_sort:
          type: string
        provider_zdr:
          nullable: true
          type: boolean
        service_tier:
          type: string
        stop_sequences:
          items:
            type: string
          nullable: true
          type: array
        stream:
          example: false
          type: boolean
        system:
          items:
            $ref: '#/components/schemas/AnthropicSdkGoTextBlockParam'
          nullable: true
          type: array
        temperature:
          $ref: '#/components/schemas/ParamOptFloat64Type2'
        thinking:
          $ref: '#/components/schemas/AnthropicSdkGoThinkingConfigParamUnion'
        tool_choice:
          $ref: '#/components/schemas/AnthropicSdkGoToolChoiceUnionParam'
        tools:
          items:
            $ref: '#/components/schemas/AnthropicSdkGoToolUnionParam'
          nullable: true
          type: array
        top_k:
          $ref: '#/components/schemas/ParamOptInt64Type2'
        top_p:
          $ref: '#/components/schemas/ParamOptFloat64Type2'
      type: object
    AnthropicSdkGoMessage:
      properties:
        content:
          items:
            $ref: '#/components/schemas/AnthropicSdkGoContentBlockUnion'
          nullable: true
          type: array
        id:
          type: string
        model:
          type: string
        role:
          type: string
        stop_reason:
          type: string
        stop_sequence:
          type: string
        type:
          type: string
        usage:
          $ref: '#/components/schemas/AnthropicSdkGoUsage'
      type: object
    AnthropicSdkGoMessageParam:
      properties:
        content:
          items:
            $ref: '#/components/schemas/AnthropicSdkGoContentBlockParamUnion'
          nullable: true
          type: array
        role:
          type: string
      type: object
    AnthropicSdkGoMetadataParam:
      properties:
        user_id:
          $ref: '#/components/schemas/ParamOptStringType2'
      type: object
    RegistryProviderConfigOverride:
      properties:
        api_key:
          nullable: true
          type: string
        base_url:
          nullable: true
          type: string
        endpoint_overrides:
          additionalProperties:
            $ref: '#/components/schemas/RegistryEndpointOverride'
          type: object
      type: object
    AnthropicSdkGoTextBlockParam:
      properties:
        cache_control:
          $ref: '#/components/schemas/AnthropicSdkGoCacheControlEphemeralParam'
        citations:
          items:
            $ref: '#/components/schemas/AnthropicSdkGoTextCitationParamUnion'
          nullable: true
          type: array
        text:
          type: string
        type:
          type: string
      type: object
    ParamOptFloat64Type2:
      type: object
    AnthropicSdkGoThinkingConfigParamUnion:
      properties:
        OfDisabled:
          $ref: '#/components/schemas/AnthropicSdkGoThinkingConfigDisabledParam'
        OfEnabled:
          $ref: '#/components/schemas/AnthropicSdkGoThinkingConfigEnabledParam'
      type: object
    AnthropicSdkGoToolChoiceUnionParam:
      properties:
        OfAny:
          $ref: '#/components/schemas/AnthropicSdkGoToolChoiceAnyParam'
        OfAuto:
          $ref: '#/components/schemas/AnthropicSdkGoToolChoiceAutoParam'
        OfNone:
          $ref: '#/components/schemas/AnthropicSdkGoToolChoiceNoneParam'
        OfTool:
          $ref: '#/components/schemas/AnthropicSdkGoToolChoiceToolParam'
      type: object
    AnthropicSdkGoToolUnionParam:
      properties:
        OfBashTool20250124:
          $ref: '#/components/schemas/AnthropicSdkGoToolBash20250124Param'
        OfTextEditor20250124:
          $ref: '#/components/schemas/AnthropicSdkGoToolTextEditor20250124Param'
        OfTextEditor20250429:
          $ref: '#/components/schemas/AnthropicSdkGoToolTextEditor20250429Param'
        OfTextEditor20250728:
          $ref: '#/components/schemas/AnthropicSdkGoToolTextEditor20250728Param'
        OfTool:
          $ref: '#/components/schemas/AnthropicSdkGoToolParam'
        OfWebSearchTool20250305:
          $ref: '#/components/schemas/AnthropicSdkGoWebSearchTool20250305Param'
      type: object
    ParamOptInt64Type2:
      type: object
    AnthropicSdkGoContentBlockUnion:
      properties:
        citations:
          items:
            $ref: '#/components/schemas/AnthropicSdkGoTextCitationUnion'
          nullable: true
          type: array
        content:
          $ref: >-
            #/components/schemas/AnthropicSdkGoWebSearchToolResultBlockContentUnion
        data:
          type: string
        id:
          type: string
        input: {}
        name:
          type: string
        signature:
          type: string
        text:
          type: string
        thinking:
          type: string
        tool_use_id:
          type: string
        type:
          type: string
      type: object
    AnthropicSdkGoUsage:
      properties:
        cache_creation:
          $ref: '#/components/schemas/AnthropicSdkGoCacheCreation'
        cache_creation_input_tokens:
          format: int64
          type: integer
        cache_read_input_tokens:
          format: int64
          type: integer
        input_tokens:
          format: int64
          type: integer
        output_tokens:
          format: int64
          type: integer
        server_tool_use:
          $ref: '#/components/schemas/AnthropicSdkGoServerToolUsage'
        service_tier:
          type: string
      type: object
    AnthropicSdkGoContentBlockParamUnion:
      properties:
        OfDocument:
          $ref: '#/components/schemas/AnthropicSdkGoDocumentBlockParam'
        OfImage:
          $ref: '#/components/schemas/AnthropicSdkGoImageBlockParam'
        OfRedactedThinking:
          $ref: '#/components/schemas/AnthropicSdkGoRedactedThinkingBlockParam'
        OfSearchResult:
          $ref: '#/components/schemas/AnthropicSdkGoSearchResultBlockParam'
        OfServerToolUse:
          $ref: '#/components/schemas/AnthropicSdkGoServerToolUseBlockParam'
        OfText:
          $ref: '#/components/schemas/AnthropicSdkGoTextBlockParam'
        OfThinking:
          $ref: '#/components/schemas/AnthropicSdkGoThinkingBlockParam'
        OfToolResult:
          $ref: '#/components/schemas/AnthropicSdkGoToolResultBlockParam'
        OfToolUse:
          $ref: '#/components/schemas/AnthropicSdkGoToolUseBlockParam'
        OfWebSearchToolResult:
          $ref: '#/components/schemas/AnthropicSdkGoWebSearchToolResultBlockParam'
      type: object
    ParamOptStringType2:
      type: object
    RegistryEndpointOverride:
      properties:
        base_url:
          type: string
        timeout:
          type: integer
      type: object
    AnthropicSdkGoCacheControlEphemeralParam:
      properties:
        ttl:
          type: string
        type:
          type: string
      type: object
    AnthropicSdkGoTextCitationParamUnion:
      properties:
        OfCharLocation:
          $ref: '#/components/schemas/AnthropicSdkGoCitationCharLocationParam'
        OfContentBlockLocation:
          $ref: '#/components/schemas/AnthropicSdkGoCitationContentBlockLocationParam'
        OfPageLocation:
          $ref: '#/components/schemas/AnthropicSdkGoCitationPageLocationParam'
        OfSearchResultLocation:
          $ref: '#/components/schemas/AnthropicSdkGoCitationSearchResultLocationParam'
        OfWebSearchResultLocation:
          $ref: >-
            #/components/schemas/AnthropicSdkGoCitationWebSearchResultLocationParam
      type: object
    AnthropicSdkGoThinkingConfigDisabledParam:
      properties:
        type:
          type: string
      type: object
    AnthropicSdkGoThinkingConfigEnabledParam:
      properties:
        budget_tokens:
          format: int64
          type: integer
        type:
          type: string
      type: object
    AnthropicSdkGoToolChoiceAnyParam:
      properties:
        disable_parallel_tool_use:
          $ref: '#/components/schemas/ParamOptBoolType2'
        type:
          type: string
      type: object
    AnthropicSdkGoToolChoiceAutoParam:
      properties:
        disable_parallel_tool_use:
          $ref: '#/components/schemas/ParamOptBoolType2'
        type:
          type: string
      type: object
    AnthropicSdkGoToolChoiceNoneParam:
      properties:
        type:
          type: string
      type: object
    AnthropicSdkGoToolChoiceToolParam:
      properties:
        disable_parallel_tool_use:
          $ref: '#/components/schemas/ParamOptBoolType2'
        name:
          type: string
        type:
          type: string
      type: object
    AnthropicSdkGoToolBash20250124Param:
      properties:
        cache_control:
          $ref: '#/components/schemas/AnthropicSdkGoCacheControlEphemeralParam'
        name:
          type: string
        type:
          type: string
      type: object
    AnthropicSdkGoToolTextEditor20250124Param:
      properties:
        cache_control:
          $ref: '#/components/schemas/AnthropicSdkGoCacheControlEphemeralParam'
        name:
          type: string
        type:
          type: string
      type: object
    AnthropicSdkGoToolTextEditor20250429Param:
      properties:
        cache_control:
          $ref: '#/components/schemas/AnthropicSdkGoCacheControlEphemeralParam'
        name:
          type: string
        type:
          type: string
      type: object
    AnthropicSdkGoToolTextEditor20250728Param:
      properties:
        cache_control:
          $ref: '#/components/schemas/AnthropicSdkGoCacheControlEphemeralParam'
        max_characters:
          $ref: '#/components/schemas/ParamOptInt64Type2'
        name:
          type: string
        type:
          type: string
      type: object
    AnthropicSdkGoToolParam:
      properties:
        cache_control:
          $ref: '#/components/schemas/AnthropicSdkGoCacheControlEphemeralParam'
        description:
          $ref: '#/components/schemas/ParamOptStringType2'
        input_schema:
          $ref: '#/components/schemas/AnthropicSdkGoToolInputSchemaParam'
        name:
          type: string
        type:
          type: string
      type: object
    AnthropicSdkGoWebSearchTool20250305Param:
      properties:
        allowed_domains:
          items:
            type: string
          nullable: true
          type: array
        blocked_domains:
          items:
            type: string
          nullable: true
          type: array
        cache_control:
          $ref: '#/components/schemas/AnthropicSdkGoCacheControlEphemeralParam'
        max_uses:
          $ref: '#/components/schemas/ParamOptInt64Type2'
        name:
          type: string
        type:
          type: string
        user_location:
          $ref: >-
            #/components/schemas/AnthropicSdkGoWebSearchTool20250305UserLocationParam
      type: object
    AnthropicSdkGoTextCitationUnion:
      properties:
        cited_text:
          type: string
        document_index:
          format: int64
          type: integer
        document_title:
          type: string
        encrypted_index:
          type: string
        end_block_index:
          format: int64
          type: integer
        end_char_index:
          format: int64
          type: integer
        end_page_number:
          format: int64
          type: integer
        file_id:
          type: string
        search_result_index:
          format: int64
          type: integer
        source:
          type: string
        start_block_index:
          format: int64
          type: integer
        start_char_index:
          format: int64
          type: integer
        start_page_number:
          format: int64
          type: integer
        title:
          type: string
        type:
          type: string
        url:
          type: string
      type: object
    AnthropicSdkGoWebSearchToolResultBlockContentUnion:
      properties:
        OfWebSearchResultBlockArray:
          items:
            $ref: '#/components/schemas/AnthropicSdkGoWebSearchResultBlock'
          nullable: true
          type: array
        error_code:
          type: string
        type:
          type: string
      type: object
    AnthropicSdkGoCacheCreation:
      properties:
        ephemeral_1h_input_tokens:
          format: int64
          type: integer
        ephemeral_5m_input_tokens:
          format: int64
          type: integer
      type: object
    AnthropicSdkGoServerToolUsage:
      properties:
        web_search_requests:
          format: int64
          type: integer
      type: object
    AnthropicSdkGoDocumentBlockParam:
      properties:
        cache_control:
          $ref: '#/components/schemas/AnthropicSdkGoCacheControlEphemeralParam'
        citations:
          $ref: '#/components/schemas/AnthropicSdkGoCitationsConfigParam'
        context:
          $ref: '#/components/schemas/ParamOptStringType2'
        source:
          $ref: '#/components/schemas/AnthropicSdkGoDocumentBlockParamSourceUnion'
        title:
          $ref: '#/components/schemas/ParamOptStringType2'
        type:
          type: string
      type: object
    AnthropicSdkGoImageBlockParam:
      properties:
        cache_control:
          $ref: '#/components/schemas/AnthropicSdkGoCacheControlEphemeralParam'
        source:
          $ref: '#/components/schemas/AnthropicSdkGoImageBlockParamSourceUnion'
        type:
          type: string
      type: object
    AnthropicSdkGoRedactedThinkingBlockParam:
      properties:
        data:
          type: string
        type:
          type: string
      type: object
    AnthropicSdkGoSearchResultBlockParam:
      properties:
        cache_control:
          $ref: '#/components/schemas/AnthropicSdkGoCacheControlEphemeralParam'
        citations:
          $ref: '#/components/schemas/AnthropicSdkGoCitationsConfigParam'
        content:
          items:
            $ref: '#/components/schemas/AnthropicSdkGoTextBlockParam'
          nullable: true
          type: array
        source:
          type: string
        title:
          type: string
        type:
          type: string
      type: object
    AnthropicSdkGoServerToolUseBlockParam:
      properties:
        cache_control:
          $ref: '#/components/schemas/AnthropicSdkGoCacheControlEphemeralParam'
        id:
          type: string
        input: {}
        name:
          type: string
        type:
          type: string
      type: object
    AnthropicSdkGoThinkingBlockParam:
      properties:
        signature:
          type: string
        thinking:
          type: string
        type:
          type: string
      type: object
    AnthropicSdkGoToolResultBlockParam:
      properties:
        cache_control:
          $ref: '#/components/schemas/AnthropicSdkGoCacheControlEphemeralParam'
        content:
          items:
            $ref: >-
              #/components/schemas/AnthropicSdkGoToolResultBlockParamContentUnion
          nullable: true
          type: array
        is_error:
          $ref: '#/components/schemas/ParamOptBoolType2'
        tool_use_id:
          type: string
        type:
          type: string
      type: object
    AnthropicSdkGoToolUseBlockParam:
      properties:
        cache_control:
          $ref: '#/components/schemas/AnthropicSdkGoCacheControlEphemeralParam'
        id:
          type: string
        input: {}
        name:
          type: string
        type:
          type: string
      type: object
    AnthropicSdkGoWebSearchToolResultBlockParam:
      properties:
        cache_control:
          $ref: '#/components/schemas/AnthropicSdkGoCacheControlEphemeralParam'
        content:
          $ref: >-
            #/components/schemas/AnthropicSdkGoWebSearchToolResultBlockParamContentUnion
        tool_use_id:
          type: string
        type:
          type: string
      type: object
    AnthropicSdkGoCitationCharLocationParam:
      properties:
        cited_text:
          type: string
        document_index:
          format: int64
          type: integer
        document_title:
          $ref: '#/components/schemas/ParamOptStringType2'
        end_char_index:
          format: int64
          type: integer
        start_char_index:
          format: int64
          type: integer
        type:
          type: string
      type: object
    AnthropicSdkGoCitationContentBlockLocationParam:
      properties:
        cited_text:
          type: string
        document_index:
          format: int64
          type: integer
        document_title:
          $ref: '#/components/schemas/ParamOptStringType2'
        end_block_index:
          format: int64
          type: integer
        start_block_index:
          format: int64
          type: integer
        type:
          type: string
      type: object
    AnthropicSdkGoCitationPageLocationParam:
      properties:
        cited_text:
          type: string
        document_index:
          format: int64
          type: integer
        document_title:
          $ref: '#/components/schemas/ParamOptStringType2'
        end_page_number:
          format: int64
          type: integer
        start_page_number:
          format: int64
          type: integer
        type:
          type: string
      type: object
    AnthropicSdkGoCitationSearchResultLocationParam:
      properties:
        cited_text:
          type: string
        end_block_index:
          format: int64
          type: integer
        search_result_index:
          format: int64
          type: integer
        source:
          type: string
        start_block_index:
          format: int64
          type: integer
        title:
          $ref: '#/components/schemas/ParamOptStringType2'
        type:
          type: string
      type: object
    AnthropicSdkGoCitationWebSearchResultLocationParam:
      properties:
        cited_text:
          type: string
        encrypted_index:
          type: string
        title:
          $ref: '#/components/schemas/ParamOptStringType2'
        type:
          type: string
        url:
          type: string
      type: object
    ParamOptBoolType2:
      type: object
    AnthropicSdkGoToolInputSchemaParam:
      properties:
        properties: {}
        required:
          items:
            type: string
          nullable: true
          type: array
        type:
          type: string
      type: object
    AnthropicSdkGoWebSearchTool20250305UserLocationParam:
      properties:
        city:
          $ref: '#/components/schemas/ParamOptStringType2'
        country:
          $ref: '#/components/schemas/ParamOptStringType2'
        region:
          $ref: '#/components/schemas/ParamOptStringType2'
        timezone:
          $ref: '#/components/schemas/ParamOptStringType2'
        type:
          type: string
      type: object
    AnthropicSdkGoWebSearchResultBlock:
      properties:
        encrypted_content:
          type: string
        page_age:
          type: string
        title:
          type: string
        type:
          type: string
        url:
          type: string
      type: object
    AnthropicSdkGoCitationsConfigParam:
      properties:
        enabled:
          $ref: '#/components/schemas/ParamOptBoolType2'
      type: object
    AnthropicSdkGoDocumentBlockParamSourceUnion:
      properties:
        OfBase64:
          $ref: '#/components/schemas/AnthropicSdkGoBase64PDFSourceParam'
        OfContent:
          $ref: '#/components/schemas/AnthropicSdkGoContentBlockSourceParam'
        OfText:
          $ref: '#/components/schemas/AnthropicSdkGoPlainTextSourceParam'
        OfURL:
          $ref: '#/components/schemas/AnthropicSdkGoURLPDFSourceParam'
      type: object
    AnthropicSdkGoImageBlockParamSourceUnion:
      properties:
        OfBase64:
          $ref: '#/components/schemas/AnthropicSdkGoBase64ImageSourceParam'
        OfURL:
          $ref: '#/components/schemas/AnthropicSdkGoURLImageSourceParam'
      type: object
    AnthropicSdkGoToolResultBlockParamContentUnion:
      properties:
        OfDocument:
          $ref: '#/components/schemas/AnthropicSdkGoDocumentBlockParam'
        OfImage:
          $ref: '#/components/schemas/AnthropicSdkGoImageBlockParam'
        OfSearchResult:
          $ref: '#/components/schemas/AnthropicSdkGoSearchResultBlockParam'
        OfText:
          $ref: '#/components/schemas/AnthropicSdkGoTextBlockParam'
      type: object
    AnthropicSdkGoWebSearchToolResultBlockParamContentUnion:
      properties:
        OfRequestWebSearchToolResultError:
          $ref: '#/components/schemas/AnthropicSdkGoWebSearchToolRequestErrorParam'
        OfWebSearchToolResultBlockItem:
          items:
            $ref: '#/components/schemas/AnthropicSdkGoWebSearchResultBlockParam'
          nullable: true
          type: array
      type: object
    AnthropicSdkGoBase64PDFSourceParam:
      properties:
        data:
          format: byte
          type: string
        media_type:
          type: string
        type:
          type: string
      type: object
    AnthropicSdkGoContentBlockSourceParam:
      properties:
        content:
          $ref: >-
            #/components/schemas/AnthropicSdkGoContentBlockSourceContentUnionParam
        type:
          type: string
      type: object
    AnthropicSdkGoPlainTextSourceParam:
      properties:
        data:
          type: string
        media_type:
          type: string
        type:
          type: string
      type: object
    AnthropicSdkGoURLPDFSourceParam:
      properties:
        type:
          type: string
        url:
          type: string
      type: object
    AnthropicSdkGoBase64ImageSourceParam:
      properties:
        data:
          format: byte
          type: string
        media_type:
          type: string
        type:
          type: string
      type: object
    AnthropicSdkGoURLImageSourceParam:
      properties:
        type:
          type: string
        url:
          type: string
      type: object
    AnthropicSdkGoWebSearchToolRequestErrorParam:
      properties:
        error_code:
          type: string
        type:
          type: string
      type: object
    AnthropicSdkGoWebSearchResultBlockParam:
      properties:
        encrypted_content:
          type: string
        page_age:
          $ref: '#/components/schemas/ParamOptStringType2'
        title:
          type: string
        type:
          type: string
        url:
          type: string
      type: object
    AnthropicSdkGoContentBlockSourceContentUnionParam:
      properties:
        OfContentBlockSourceContent:
          items:
            $ref: >-
              #/components/schemas/AnthropicSdkGoContentBlockSourceContentItemUnionParam
          nullable: true
          type: array
        OfString:
          $ref: '#/components/schemas/ParamOptStringType2'
      type: object
    AnthropicSdkGoContentBlockSourceContentItemUnionParam:
      properties:
        OfImage:
          $ref: '#/components/schemas/AnthropicSdkGoImageBlockParam'
        OfText:
          $ref: '#/components/schemas/AnthropicSdkGoTextBlockParam'
      type: object
  securitySchemes:
    apiKey:
      in: header
      name: X-API-Key
      type: apiKey

````