# Create a message

POST https://openrouter.ai/api/v1/messages
Content-Type: application/json

Creates a message using the Anthropic Messages API format. Supports text, images, PDFs, tools, and extended thinking.

Reference: https://openrouter.ai/docs/api/api-reference/anthropic-messages/create-messages

## OpenAPI Specification

```yaml
openapi: 3.1.1
info:
  title: Create a message
  version: endpoint_anthropicMessages.createMessages
paths:
  /messages:
    post:
      operationId: create-messages
      summary: Create a message
      description: >-
        Creates a message using the Anthropic Messages API format. Supports
        text, images, PDFs, tools, and extended thinking.
      tags:
        - - subpackage_anthropicMessages
      parameters:
        - name: Authorization
          in: header
          description: API key as bearer token in Authorization header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnthropicMessagesResponse'
        '400':
          description: Invalid request error
          content: {}
        '401':
          description: Authentication error
          content: {}
        '403':
          description: Permission denied error
          content: {}
        '404':
          description: Not found error
          content: {}
        '429':
          description: Rate limit error
          content: {}
        '500':
          description: API error
          content: {}
        '503':
          description: Overloaded error
          content: {}
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AnthropicMessagesRequest'
components:
  schemas:
    OpenRouterAnthropicMessageParamRole:
      type: string
      enum:
        - value: user
        - value: assistant
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf0Type:
      type: string
      enum:
        - value: text
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf0CitationsItemsOneOf0Type:
      type: string
      enum:
        - value: char_location
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf0CitationsItems0:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf0CitationsItemsOneOf0Type
        cited_text:
          type: string
        document_index:
          type: number
          format: double
        document_title:
          type:
            - string
            - 'null'
        start_char_index:
          type: number
          format: double
        end_char_index:
          type: number
          format: double
      required:
        - type
        - cited_text
        - document_index
        - document_title
        - start_char_index
        - end_char_index
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf0CitationsItemsOneOf1Type:
      type: string
      enum:
        - value: page_location
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf0CitationsItems1:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf0CitationsItemsOneOf1Type
        cited_text:
          type: string
        document_index:
          type: number
          format: double
        document_title:
          type:
            - string
            - 'null'
        start_page_number:
          type: number
          format: double
        end_page_number:
          type: number
          format: double
      required:
        - type
        - cited_text
        - document_index
        - document_title
        - start_page_number
        - end_page_number
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf0CitationsItemsOneOf2Type:
      type: string
      enum:
        - value: content_block_location
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf0CitationsItems2:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf0CitationsItemsOneOf2Type
        cited_text:
          type: string
        document_index:
          type: number
          format: double
        document_title:
          type:
            - string
            - 'null'
        start_block_index:
          type: number
          format: double
        end_block_index:
          type: number
          format: double
      required:
        - type
        - cited_text
        - document_index
        - document_title
        - start_block_index
        - end_block_index
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf0CitationsItemsOneOf3Type:
      type: string
      enum:
        - value: web_search_result_location
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf0CitationsItems3:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf0CitationsItemsOneOf3Type
        cited_text:
          type: string
        encrypted_index:
          type: string
        title:
          type:
            - string
            - 'null'
        url:
          type: string
      required:
        - type
        - cited_text
        - encrypted_index
        - title
        - url
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf0CitationsItemsOneOf4Type:
      type: string
      enum:
        - value: search_result_location
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf0CitationsItems4:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf0CitationsItemsOneOf4Type
        cited_text:
          type: string
        search_result_index:
          type: number
          format: double
        source:
          type: string
        title:
          type:
            - string
            - 'null'
        start_block_index:
          type: number
          format: double
        end_block_index:
          type: number
          format: double
      required:
        - type
        - cited_text
        - search_result_index
        - source
        - title
        - start_block_index
        - end_block_index
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf0CitationsItems:
      oneOf:
        - $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf0CitationsItems0
        - $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf0CitationsItems1
        - $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf0CitationsItems2
        - $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf0CitationsItems3
        - $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf0CitationsItems4
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf0CacheControlType:
      type: string
      enum:
        - value: ephemeral
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf0CacheControlTtl:
      type: string
      enum:
        - value: 5m
        - value: 1h
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf0CacheControl:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf0CacheControlType
        ttl:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf0CacheControlTtl
      required:
        - type
    OpenRouterAnthropicMessageParamContentOneOf1Items0:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf0Type
        text:
          type: string
        citations:
          type:
            - array
            - 'null'
          items:
            $ref: >-
              #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf0CitationsItems
        cache_control:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf0CacheControl
      required:
        - type
        - text
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf1Type:
      type: string
      enum:
        - value: image
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf1SourceOneOf0Type:
      type: string
      enum:
        - value: base64
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf1SourceOneOf0MediaType:
      type: string
      enum:
        - value: image/jpeg
        - value: image/png
        - value: image/gif
        - value: image/webp
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf1Source0:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf1SourceOneOf0Type
        media_type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf1SourceOneOf0MediaType
        data:
          type: string
      required:
        - type
        - media_type
        - data
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf1SourceOneOf1Type:
      type: string
      enum:
        - value: url
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf1Source1:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf1SourceOneOf1Type
        url:
          type: string
      required:
        - type
        - url
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf1Source:
      oneOf:
        - $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf1Source0
        - $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf1Source1
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf1CacheControlType:
      type: string
      enum:
        - value: ephemeral
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf1CacheControlTtl:
      type: string
      enum:
        - value: 5m
        - value: 1h
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf1CacheControl:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf1CacheControlType
        ttl:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf1CacheControlTtl
      required:
        - type
    OpenRouterAnthropicMessageParamContentOneOf1Items1:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf1Type
        source:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf1Source
        cache_control:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf1CacheControl
      required:
        - type
        - source
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2Type:
      type: string
      enum:
        - value: document
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf0Type:
      type: string
      enum:
        - value: base64
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf0MediaType:
      type: string
      enum:
        - value: application/pdf
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2Source0:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf0Type
        media_type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf0MediaType
        data:
          type: string
      required:
        - type
        - media_type
        - data
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf1Type:
      type: string
      enum:
        - value: text
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf1MediaType:
      type: string
      enum:
        - value: text/plain
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2Source1:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf1Type
        media_type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf1MediaType
        data:
          type: string
      required:
        - type
        - media_type
        - data
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2Type:
      type: string
      enum:
        - value: content
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2ContentOneOf1ItemsOneOf0Type:
      type: string
      enum:
        - value: text
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2ContentOneOf1ItemsOneOf0CitationsItemsOneOf0Type:
      type: string
      enum:
        - value: char_location
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2ContentOneOf1ItemsOneOf0CitationsItems0:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2ContentOneOf1ItemsOneOf0CitationsItemsOneOf0Type
        cited_text:
          type: string
        document_index:
          type: number
          format: double
        document_title:
          type:
            - string
            - 'null'
        start_char_index:
          type: number
          format: double
        end_char_index:
          type: number
          format: double
      required:
        - type
        - cited_text
        - document_index
        - document_title
        - start_char_index
        - end_char_index
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2ContentOneOf1ItemsOneOf0CitationsItemsOneOf1Type:
      type: string
      enum:
        - value: page_location
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2ContentOneOf1ItemsOneOf0CitationsItems1:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2ContentOneOf1ItemsOneOf0CitationsItemsOneOf1Type
        cited_text:
          type: string
        document_index:
          type: number
          format: double
        document_title:
          type:
            - string
            - 'null'
        start_page_number:
          type: number
          format: double
        end_page_number:
          type: number
          format: double
      required:
        - type
        - cited_text
        - document_index
        - document_title
        - start_page_number
        - end_page_number
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2ContentOneOf1ItemsOneOf0CitationsItemsOneOf2Type:
      type: string
      enum:
        - value: content_block_location
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2ContentOneOf1ItemsOneOf0CitationsItems2:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2ContentOneOf1ItemsOneOf0CitationsItemsOneOf2Type
        cited_text:
          type: string
        document_index:
          type: number
          format: double
        document_title:
          type:
            - string
            - 'null'
        start_block_index:
          type: number
          format: double
        end_block_index:
          type: number
          format: double
      required:
        - type
        - cited_text
        - document_index
        - document_title
        - start_block_index
        - end_block_index
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2ContentOneOf1ItemsOneOf0CitationsItemsOneOf3Type:
      type: string
      enum:
        - value: web_search_result_location
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2ContentOneOf1ItemsOneOf0CitationsItems3:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2ContentOneOf1ItemsOneOf0CitationsItemsOneOf3Type
        cited_text:
          type: string
        encrypted_index:
          type: string
        title:
          type:
            - string
            - 'null'
        url:
          type: string
      required:
        - type
        - cited_text
        - encrypted_index
        - title
        - url
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2ContentOneOf1ItemsOneOf0CitationsItemsOneOf4Type:
      type: string
      enum:
        - value: search_result_location
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2ContentOneOf1ItemsOneOf0CitationsItems4:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2ContentOneOf1ItemsOneOf0CitationsItemsOneOf4Type
        cited_text:
          type: string
        search_result_index:
          type: number
          format: double
        source:
          type: string
        title:
          type:
            - string
            - 'null'
        start_block_index:
          type: number
          format: double
        end_block_index:
          type: number
          format: double
      required:
        - type
        - cited_text
        - search_result_index
        - source
        - title
        - start_block_index
        - end_block_index
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2ContentOneOf1ItemsOneOf0CitationsItems:
      oneOf:
        - $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2ContentOneOf1ItemsOneOf0CitationsItems0
        - $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2ContentOneOf1ItemsOneOf0CitationsItems1
        - $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2ContentOneOf1ItemsOneOf0CitationsItems2
        - $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2ContentOneOf1ItemsOneOf0CitationsItems3
        - $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2ContentOneOf1ItemsOneOf0CitationsItems4
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2ContentOneOf1ItemsOneOf0CacheControlType:
      type: string
      enum:
        - value: ephemeral
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2ContentOneOf1ItemsOneOf0CacheControlTtl:
      type: string
      enum:
        - value: 5m
        - value: 1h
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2ContentOneOf1ItemsOneOf0CacheControl:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2ContentOneOf1ItemsOneOf0CacheControlType
        ttl:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2ContentOneOf1ItemsOneOf0CacheControlTtl
      required:
        - type
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2ContentOneOf1Items0:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2ContentOneOf1ItemsOneOf0Type
        text:
          type: string
        citations:
          type:
            - array
            - 'null'
          items:
            $ref: >-
              #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2ContentOneOf1ItemsOneOf0CitationsItems
        cache_control:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2ContentOneOf1ItemsOneOf0CacheControl
      required:
        - type
        - text
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2ContentOneOf1ItemsOneOf1Type:
      type: string
      enum:
        - value: image
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2ContentOneOf1ItemsOneOf1SourceOneOf0Type:
      type: string
      enum:
        - value: base64
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2ContentOneOf1ItemsOneOf1SourceOneOf0MediaType:
      type: string
      enum:
        - value: image/jpeg
        - value: image/png
        - value: image/gif
        - value: image/webp
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2ContentOneOf1ItemsOneOf1Source0:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2ContentOneOf1ItemsOneOf1SourceOneOf0Type
        media_type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2ContentOneOf1ItemsOneOf1SourceOneOf0MediaType
        data:
          type: string
      required:
        - type
        - media_type
        - data
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2ContentOneOf1ItemsOneOf1SourceOneOf1Type:
      type: string
      enum:
        - value: url
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2ContentOneOf1ItemsOneOf1Source1:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2ContentOneOf1ItemsOneOf1SourceOneOf1Type
        url:
          type: string
      required:
        - type
        - url
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2ContentOneOf1ItemsOneOf1Source:
      oneOf:
        - $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2ContentOneOf1ItemsOneOf1Source0
        - $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2ContentOneOf1ItemsOneOf1Source1
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2ContentOneOf1ItemsOneOf1CacheControlType:
      type: string
      enum:
        - value: ephemeral
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2ContentOneOf1ItemsOneOf1CacheControlTtl:
      type: string
      enum:
        - value: 5m
        - value: 1h
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2ContentOneOf1ItemsOneOf1CacheControl:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2ContentOneOf1ItemsOneOf1CacheControlType
        ttl:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2ContentOneOf1ItemsOneOf1CacheControlTtl
      required:
        - type
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2ContentOneOf1Items1:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2ContentOneOf1ItemsOneOf1Type
        source:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2ContentOneOf1ItemsOneOf1Source
        cache_control:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2ContentOneOf1ItemsOneOf1CacheControl
      required:
        - type
        - source
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2ContentOneOf1Items:
      oneOf:
        - $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2ContentOneOf1Items0
        - $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2ContentOneOf1Items1
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2Content1:
      type: array
      items:
        $ref: >-
          #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2ContentOneOf1Items
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2Content:
      oneOf:
        - type: string
        - $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2Content1
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2Source2:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2Type
        content:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf2Content
      required:
        - type
        - content
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf3Type:
      type: string
      enum:
        - value: url
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2Source3:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2SourceOneOf3Type
        url:
          type: string
      required:
        - type
        - url
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2Source:
      oneOf:
        - $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2Source0
        - $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2Source1
        - $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2Source2
        - $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2Source3
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2Citations:
      type: object
      properties:
        enabled:
          type: boolean
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2CacheControlType:
      type: string
      enum:
        - value: ephemeral
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2CacheControlTtl:
      type: string
      enum:
        - value: 5m
        - value: 1h
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2CacheControl:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2CacheControlType
        ttl:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2CacheControlTtl
      required:
        - type
    OpenRouterAnthropicMessageParamContentOneOf1Items2:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2Type
        source:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2Source
        citations:
          oneOf:
            - $ref: >-
                #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2Citations
            - type: 'null'
        context:
          type:
            - string
            - 'null'
        title:
          type:
            - string
            - 'null'
        cache_control:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf2CacheControl
      required:
        - type
        - source
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf3Type:
      type: string
      enum:
        - value: tool_use
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf3CacheControlType:
      type: string
      enum:
        - value: ephemeral
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf3CacheControlTtl:
      type: string
      enum:
        - value: 5m
        - value: 1h
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf3CacheControl:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf3CacheControlType
        ttl:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf3CacheControlTtl
      required:
        - type
    OpenRouterAnthropicMessageParamContentOneOf1Items3:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf3Type
        id:
          type: string
        name:
          type: string
        input:
          oneOf:
            - description: Any type
            - type: 'null'
        cache_control:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf3CacheControl
      required:
        - type
        - id
        - name
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4Type:
      type: string
      enum:
        - value: tool_result
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf0Type:
      type: string
      enum:
        - value: text
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf0CitationsItemsOneOf0Type:
      type: string
      enum:
        - value: char_location
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf0CitationsItems0:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf0CitationsItemsOneOf0Type
        cited_text:
          type: string
        document_index:
          type: number
          format: double
        document_title:
          type:
            - string
            - 'null'
        start_char_index:
          type: number
          format: double
        end_char_index:
          type: number
          format: double
      required:
        - type
        - cited_text
        - document_index
        - document_title
        - start_char_index
        - end_char_index
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf0CitationsItemsOneOf1Type:
      type: string
      enum:
        - value: page_location
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf0CitationsItems1:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf0CitationsItemsOneOf1Type
        cited_text:
          type: string
        document_index:
          type: number
          format: double
        document_title:
          type:
            - string
            - 'null'
        start_page_number:
          type: number
          format: double
        end_page_number:
          type: number
          format: double
      required:
        - type
        - cited_text
        - document_index
        - document_title
        - start_page_number
        - end_page_number
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf0CitationsItemsOneOf2Type:
      type: string
      enum:
        - value: content_block_location
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf0CitationsItems2:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf0CitationsItemsOneOf2Type
        cited_text:
          type: string
        document_index:
          type: number
          format: double
        document_title:
          type:
            - string
            - 'null'
        start_block_index:
          type: number
          format: double
        end_block_index:
          type: number
          format: double
      required:
        - type
        - cited_text
        - document_index
        - document_title
        - start_block_index
        - end_block_index
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf0CitationsItemsOneOf3Type:
      type: string
      enum:
        - value: web_search_result_location
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf0CitationsItems3:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf0CitationsItemsOneOf3Type
        cited_text:
          type: string
        encrypted_index:
          type: string
        title:
          type:
            - string
            - 'null'
        url:
          type: string
      required:
        - type
        - cited_text
        - encrypted_index
        - title
        - url
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf0CitationsItemsOneOf4Type:
      type: string
      enum:
        - value: search_result_location
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf0CitationsItems4:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf0CitationsItemsOneOf4Type
        cited_text:
          type: string
        search_result_index:
          type: number
          format: double
        source:
          type: string
        title:
          type:
            - string
            - 'null'
        start_block_index:
          type: number
          format: double
        end_block_index:
          type: number
          format: double
      required:
        - type
        - cited_text
        - search_result_index
        - source
        - title
        - start_block_index
        - end_block_index
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf0CitationsItems:
      oneOf:
        - $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf0CitationsItems0
        - $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf0CitationsItems1
        - $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf0CitationsItems2
        - $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf0CitationsItems3
        - $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf0CitationsItems4
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf0CacheControlType:
      type: string
      enum:
        - value: ephemeral
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf0CacheControlTtl:
      type: string
      enum:
        - value: 5m
        - value: 1h
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf0CacheControl:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf0CacheControlType
        ttl:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf0CacheControlTtl
      required:
        - type
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4ContentOneOf1Items0:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf0Type
        text:
          type: string
        citations:
          type:
            - array
            - 'null'
          items:
            $ref: >-
              #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf0CitationsItems
        cache_control:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf0CacheControl
      required:
        - type
        - text
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf1Type:
      type: string
      enum:
        - value: image
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf1SourceOneOf0Type:
      type: string
      enum:
        - value: base64
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf1SourceOneOf0MediaType:
      type: string
      enum:
        - value: image/jpeg
        - value: image/png
        - value: image/gif
        - value: image/webp
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf1Source0:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf1SourceOneOf0Type
        media_type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf1SourceOneOf0MediaType
        data:
          type: string
      required:
        - type
        - media_type
        - data
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf1SourceOneOf1Type:
      type: string
      enum:
        - value: url
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf1Source1:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf1SourceOneOf1Type
        url:
          type: string
      required:
        - type
        - url
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf1Source:
      oneOf:
        - $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf1Source0
        - $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf1Source1
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf1CacheControlType:
      type: string
      enum:
        - value: ephemeral
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf1CacheControlTtl:
      type: string
      enum:
        - value: 5m
        - value: 1h
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf1CacheControl:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf1CacheControlType
        ttl:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf1CacheControlTtl
      required:
        - type
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4ContentOneOf1Items1:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf1Type
        source:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf1Source
        cache_control:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4ContentOneOf1ItemsOneOf1CacheControl
      required:
        - type
        - source
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4ContentOneOf1Items:
      oneOf:
        - $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4ContentOneOf1Items0
        - $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4ContentOneOf1Items1
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4Content1:
      type: array
      items:
        $ref: >-
          #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4ContentOneOf1Items
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4Content:
      oneOf:
        - type: string
        - $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4Content1
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4CacheControlType:
      type: string
      enum:
        - value: ephemeral
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4CacheControlTtl:
      type: string
      enum:
        - value: 5m
        - value: 1h
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4CacheControl:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4CacheControlType
        ttl:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4CacheControlTtl
      required:
        - type
    OpenRouterAnthropicMessageParamContentOneOf1Items4:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4Type
        tool_use_id:
          type: string
        content:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4Content
        is_error:
          type: boolean
        cache_control:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf4CacheControl
      required:
        - type
        - tool_use_id
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf5Type:
      type: string
      enum:
        - value: thinking
    OpenRouterAnthropicMessageParamContentOneOf1Items5:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf5Type
        thinking:
          type: string
        signature:
          type: string
      required:
        - type
        - thinking
        - signature
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf6Type:
      type: string
      enum:
        - value: redacted_thinking
    OpenRouterAnthropicMessageParamContentOneOf1Items6:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf6Type
        data:
          type: string
      required:
        - type
        - data
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf7Type:
      type: string
      enum:
        - value: server_tool_use
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf7Name:
      type: string
      enum:
        - value: web_search
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf7CacheControlType:
      type: string
      enum:
        - value: ephemeral
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf7CacheControlTtl:
      type: string
      enum:
        - value: 5m
        - value: 1h
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf7CacheControl:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf7CacheControlType
        ttl:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf7CacheControlTtl
      required:
        - type
    OpenRouterAnthropicMessageParamContentOneOf1Items7:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf7Type
        id:
          type: string
        name:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf7Name
        input:
          oneOf:
            - description: Any type
            - type: 'null'
        cache_control:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf7CacheControl
      required:
        - type
        - id
        - name
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf8Type:
      type: string
      enum:
        - value: web_search_tool_result
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf8ContentOneOf0ItemsType:
      type: string
      enum:
        - value: web_search_result
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf8ContentOneOf0Items:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf8ContentOneOf0ItemsType
        encrypted_content:
          type: string
        title:
          type: string
        url:
          type: string
        page_age:
          type:
            - string
            - 'null'
      required:
        - type
        - encrypted_content
        - title
        - url
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf8Content0:
      type: array
      items:
        $ref: >-
          #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf8ContentOneOf0Items
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf8ContentOneOf1Type:
      type: string
      enum:
        - value: web_search_tool_result_error
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf8ContentOneOf1ErrorCode:
      type: string
      enum:
        - value: invalid_tool_input
        - value: unavailable
        - value: max_uses_exceeded
        - value: too_many_requests
        - value: query_too_long
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf8Content1:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf8ContentOneOf1Type
        error_code:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf8ContentOneOf1ErrorCode
      required:
        - type
        - error_code
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf8Content:
      oneOf:
        - $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf8Content0
        - $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf8Content1
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf8CacheControlType:
      type: string
      enum:
        - value: ephemeral
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf8CacheControlTtl:
      type: string
      enum:
        - value: 5m
        - value: 1h
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf8CacheControl:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf8CacheControlType
        ttl:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf8CacheControlTtl
      required:
        - type
    OpenRouterAnthropicMessageParamContentOneOf1Items8:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf8Type
        tool_use_id:
          type: string
        content:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf8Content
        cache_control:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf8CacheControl
      required:
        - type
        - tool_use_id
        - content
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf9Type:
      type: string
      enum:
        - value: search_result
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf9ContentItemsType:
      type: string
      enum:
        - value: text
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf9ContentItemsCitationsItemsOneOf0Type:
      type: string
      enum:
        - value: char_location
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf9ContentItemsCitationsItems0:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf9ContentItemsCitationsItemsOneOf0Type
        cited_text:
          type: string
        document_index:
          type: number
          format: double
        document_title:
          type:
            - string
            - 'null'
        start_char_index:
          type: number
          format: double
        end_char_index:
          type: number
          format: double
      required:
        - type
        - cited_text
        - document_index
        - document_title
        - start_char_index
        - end_char_index
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf9ContentItemsCitationsItemsOneOf1Type:
      type: string
      enum:
        - value: page_location
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf9ContentItemsCitationsItems1:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf9ContentItemsCitationsItemsOneOf1Type
        cited_text:
          type: string
        document_index:
          type: number
          format: double
        document_title:
          type:
            - string
            - 'null'
        start_page_number:
          type: number
          format: double
        end_page_number:
          type: number
          format: double
      required:
        - type
        - cited_text
        - document_index
        - document_title
        - start_page_number
        - end_page_number
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf9ContentItemsCitationsItemsOneOf2Type:
      type: string
      enum:
        - value: content_block_location
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf9ContentItemsCitationsItems2:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf9ContentItemsCitationsItemsOneOf2Type
        cited_text:
          type: string
        document_index:
          type: number
          format: double
        document_title:
          type:
            - string
            - 'null'
        start_block_index:
          type: number
          format: double
        end_block_index:
          type: number
          format: double
      required:
        - type
        - cited_text
        - document_index
        - document_title
        - start_block_index
        - end_block_index
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf9ContentItemsCitationsItemsOneOf3Type:
      type: string
      enum:
        - value: web_search_result_location
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf9ContentItemsCitationsItems3:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf9ContentItemsCitationsItemsOneOf3Type
        cited_text:
          type: string
        encrypted_index:
          type: string
        title:
          type:
            - string
            - 'null'
        url:
          type: string
      required:
        - type
        - cited_text
        - encrypted_index
        - title
        - url
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf9ContentItemsCitationsItemsOneOf4Type:
      type: string
      enum:
        - value: search_result_location
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf9ContentItemsCitationsItems4:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf9ContentItemsCitationsItemsOneOf4Type
        cited_text:
          type: string
        search_result_index:
          type: number
          format: double
        source:
          type: string
        title:
          type:
            - string
            - 'null'
        start_block_index:
          type: number
          format: double
        end_block_index:
          type: number
          format: double
      required:
        - type
        - cited_text
        - search_result_index
        - source
        - title
        - start_block_index
        - end_block_index
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf9ContentItemsCitationsItems:
      oneOf:
        - $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf9ContentItemsCitationsItems0
        - $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf9ContentItemsCitationsItems1
        - $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf9ContentItemsCitationsItems2
        - $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf9ContentItemsCitationsItems3
        - $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf9ContentItemsCitationsItems4
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf9ContentItemsCacheControlType:
      type: string
      enum:
        - value: ephemeral
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf9ContentItemsCacheControlTtl:
      type: string
      enum:
        - value: 5m
        - value: 1h
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf9ContentItemsCacheControl:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf9ContentItemsCacheControlType
        ttl:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf9ContentItemsCacheControlTtl
      required:
        - type
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf9ContentItems:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf9ContentItemsType
        text:
          type: string
        citations:
          type:
            - array
            - 'null'
          items:
            $ref: >-
              #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf9ContentItemsCitationsItems
        cache_control:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf9ContentItemsCacheControl
      required:
        - type
        - text
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf9Citations:
      type: object
      properties:
        enabled:
          type: boolean
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf9CacheControlType:
      type: string
      enum:
        - value: ephemeral
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf9CacheControlTtl:
      type: string
      enum:
        - value: 5m
        - value: 1h
    OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf9CacheControl:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf9CacheControlType
        ttl:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf9CacheControlTtl
      required:
        - type
    OpenRouterAnthropicMessageParamContentOneOf1Items9:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf9Type
        source:
          type: string
        title:
          type: string
        content:
          type: array
          items:
            $ref: >-
              #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf9ContentItems
        citations:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf9Citations
        cache_control:
          $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1ItemsOneOf9CacheControl
      required:
        - type
        - source
        - title
        - content
    OpenRouterAnthropicMessageParamContentOneOf1Items:
      oneOf:
        - $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1Items0
        - $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1Items1
        - $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1Items2
        - $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1Items3
        - $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1Items4
        - $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1Items5
        - $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1Items6
        - $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1Items7
        - $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1Items8
        - $ref: >-
            #/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1Items9
    OpenRouterAnthropicMessageParamContent1:
      type: array
      items:
        $ref: '#/components/schemas/OpenRouterAnthropicMessageParamContentOneOf1Items'
    OpenRouterAnthropicMessageParamContent:
      oneOf:
        - type: string
        - $ref: '#/components/schemas/OpenRouterAnthropicMessageParamContent1'
    OpenRouterAnthropicMessageParam:
      type: object
      properties:
        role:
          $ref: '#/components/schemas/OpenRouterAnthropicMessageParamRole'
        content:
          $ref: '#/components/schemas/OpenRouterAnthropicMessageParamContent'
      required:
        - role
        - content
    AnthropicMessagesRequestSystemOneOf1ItemsType:
      type: string
      enum:
        - value: text
    AnthropicMessagesRequestSystemOneOf1ItemsCitationsItemsOneOf0Type:
      type: string
      enum:
        - value: char_location
    AnthropicMessagesRequestSystemOneOf1ItemsCitationsItems0:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/AnthropicMessagesRequestSystemOneOf1ItemsCitationsItemsOneOf0Type
        cited_text:
          type: string
        document_index:
          type: number
          format: double
        document_title:
          type:
            - string
            - 'null'
        start_char_index:
          type: number
          format: double
        end_char_index:
          type: number
          format: double
      required:
        - type
        - cited_text
        - document_index
        - document_title
        - start_char_index
        - end_char_index
    AnthropicMessagesRequestSystemOneOf1ItemsCitationsItemsOneOf1Type:
      type: string
      enum:
        - value: page_location
    AnthropicMessagesRequestSystemOneOf1ItemsCitationsItems1:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/AnthropicMessagesRequestSystemOneOf1ItemsCitationsItemsOneOf1Type
        cited_text:
          type: string
        document_index:
          type: number
          format: double
        document_title:
          type:
            - string
            - 'null'
        start_page_number:
          type: number
          format: double
        end_page_number:
          type: number
          format: double
      required:
        - type
        - cited_text
        - document_index
        - document_title
        - start_page_number
        - end_page_number
    AnthropicMessagesRequestSystemOneOf1ItemsCitationsItemsOneOf2Type:
      type: string
      enum:
        - value: content_block_location
    AnthropicMessagesRequestSystemOneOf1ItemsCitationsItems2:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/AnthropicMessagesRequestSystemOneOf1ItemsCitationsItemsOneOf2Type
        cited_text:
          type: string
        document_index:
          type: number
          format: double
        document_title:
          type:
            - string
            - 'null'
        start_block_index:
          type: number
          format: double
        end_block_index:
          type: number
          format: double
      required:
        - type
        - cited_text
        - document_index
        - document_title
        - start_block_index
        - end_block_index
    AnthropicMessagesRequestSystemOneOf1ItemsCitationsItemsOneOf3Type:
      type: string
      enum:
        - value: web_search_result_location
    AnthropicMessagesRequestSystemOneOf1ItemsCitationsItems3:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/AnthropicMessagesRequestSystemOneOf1ItemsCitationsItemsOneOf3Type
        cited_text:
          type: string
        encrypted_index:
          type: string
        title:
          type:
            - string
            - 'null'
        url:
          type: string
      required:
        - type
        - cited_text
        - encrypted_index
        - title
        - url
    AnthropicMessagesRequestSystemOneOf1ItemsCitationsItemsOneOf4Type:
      type: string
      enum:
        - value: search_result_location
    AnthropicMessagesRequestSystemOneOf1ItemsCitationsItems4:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/AnthropicMessagesRequestSystemOneOf1ItemsCitationsItemsOneOf4Type
        cited_text:
          type: string
        search_result_index:
          type: number
          format: double
        source:
          type: string
        title:
          type:
            - string
            - 'null'
        start_block_index:
          type: number
          format: double
        end_block_index:
          type: number
          format: double
      required:
        - type
        - cited_text
        - search_result_index
        - source
        - title
        - start_block_index
        - end_block_index
    AnthropicMessagesRequestSystemOneOf1ItemsCitationsItems:
      oneOf:
        - $ref: >-
            #/components/schemas/AnthropicMessagesRequestSystemOneOf1ItemsCitationsItems0
        - $ref: >-
            #/components/schemas/AnthropicMessagesRequestSystemOneOf1ItemsCitationsItems1
        - $ref: >-
            #/components/schemas/AnthropicMessagesRequestSystemOneOf1ItemsCitationsItems2
        - $ref: >-
            #/components/schemas/AnthropicMessagesRequestSystemOneOf1ItemsCitationsItems3
        - $ref: >-
            #/components/schemas/AnthropicMessagesRequestSystemOneOf1ItemsCitationsItems4
    AnthropicMessagesRequestSystemOneOf1ItemsCacheControlType:
      type: string
      enum:
        - value: ephemeral
    AnthropicMessagesRequestSystemOneOf1ItemsCacheControlTtl:
      type: string
      enum:
        - value: 5m
        - value: 1h
    AnthropicMessagesRequestSystemOneOf1ItemsCacheControl:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/AnthropicMessagesRequestSystemOneOf1ItemsCacheControlType
        ttl:
          $ref: >-
            #/components/schemas/AnthropicMessagesRequestSystemOneOf1ItemsCacheControlTtl
      required:
        - type
    AnthropicMessagesRequestSystemOneOf1Items:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/AnthropicMessagesRequestSystemOneOf1ItemsType'
        text:
          type: string
        citations:
          type:
            - array
            - 'null'
          items:
            $ref: >-
              #/components/schemas/AnthropicMessagesRequestSystemOneOf1ItemsCitationsItems
        cache_control:
          $ref: >-
            #/components/schemas/AnthropicMessagesRequestSystemOneOf1ItemsCacheControl
      required:
        - type
        - text
    AnthropicMessagesRequestSystem1:
      type: array
      items:
        $ref: '#/components/schemas/AnthropicMessagesRequestSystemOneOf1Items'
    AnthropicMessagesRequestSystem:
      oneOf:
        - type: string
        - $ref: '#/components/schemas/AnthropicMessagesRequestSystem1'
    AnthropicMessagesRequestMetadata:
      type: object
      properties:
        user_id:
          type:
            - string
            - 'null'
    AnthropicMessagesRequestToolsItemsOneOf0InputSchemaType:
      type: string
      enum:
        - value: object
    AnthropicMessagesRequestToolsItemsOneOf0InputSchema:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/AnthropicMessagesRequestToolsItemsOneOf0InputSchemaType
        properties:
          oneOf:
            - description: Any type
            - type: 'null'
        required:
          type:
            - array
            - 'null'
          items:
            type: string
      required:
        - type
    AnthropicMessagesRequestToolsItemsOneOf0Type:
      type: string
      enum:
        - value: custom
    AnthropicMessagesRequestToolsItemsOneOf0CacheControlType:
      type: string
      enum:
        - value: ephemeral
    AnthropicMessagesRequestToolsItemsOneOf0CacheControlTtl:
      type: string
      enum:
        - value: 5m
        - value: 1h
    AnthropicMessagesRequestToolsItemsOneOf0CacheControl:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/AnthropicMessagesRequestToolsItemsOneOf0CacheControlType
        ttl:
          $ref: >-
            #/components/schemas/AnthropicMessagesRequestToolsItemsOneOf0CacheControlTtl
      required:
        - type
    AnthropicMessagesRequestToolsItems0:
      type: object
      properties:
        name:
          type: string
        description:
          type: string
        input_schema:
          $ref: >-
            #/components/schemas/AnthropicMessagesRequestToolsItemsOneOf0InputSchema
        type:
          $ref: '#/components/schemas/AnthropicMessagesRequestToolsItemsOneOf0Type'
        cache_control:
          $ref: >-
            #/components/schemas/AnthropicMessagesRequestToolsItemsOneOf0CacheControl
      required:
        - name
        - input_schema
    AnthropicMessagesRequestToolsItemsOneOf1Type:
      type: string
      enum:
        - value: bash_20250124
    AnthropicMessagesRequestToolsItemsOneOf1Name:
      type: string
      enum:
        - value: bash
    AnthropicMessagesRequestToolsItemsOneOf1CacheControlType:
      type: string
      enum:
        - value: ephemeral
    AnthropicMessagesRequestToolsItemsOneOf1CacheControlTtl:
      type: string
      enum:
        - value: 5m
        - value: 1h
    AnthropicMessagesRequestToolsItemsOneOf1CacheControl:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/AnthropicMessagesRequestToolsItemsOneOf1CacheControlType
        ttl:
          $ref: >-
            #/components/schemas/AnthropicMessagesRequestToolsItemsOneOf1CacheControlTtl
      required:
        - type
    AnthropicMessagesRequestToolsItems1:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/AnthropicMessagesRequestToolsItemsOneOf1Type'
        name:
          $ref: '#/components/schemas/AnthropicMessagesRequestToolsItemsOneOf1Name'
        cache_control:
          $ref: >-
            #/components/schemas/AnthropicMessagesRequestToolsItemsOneOf1CacheControl
      required:
        - type
        - name
    AnthropicMessagesRequestToolsItemsOneOf2Type:
      type: string
      enum:
        - value: text_editor_20250124
    AnthropicMessagesRequestToolsItemsOneOf2Name:
      type: string
      enum:
        - value: str_replace_editor
    AnthropicMessagesRequestToolsItemsOneOf2CacheControlType:
      type: string
      enum:
        - value: ephemeral
    AnthropicMessagesRequestToolsItemsOneOf2CacheControlTtl:
      type: string
      enum:
        - value: 5m
        - value: 1h
    AnthropicMessagesRequestToolsItemsOneOf2CacheControl:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/AnthropicMessagesRequestToolsItemsOneOf2CacheControlType
        ttl:
          $ref: >-
            #/components/schemas/AnthropicMessagesRequestToolsItemsOneOf2CacheControlTtl
      required:
        - type
    AnthropicMessagesRequestToolsItems2:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/AnthropicMessagesRequestToolsItemsOneOf2Type'
        name:
          $ref: '#/components/schemas/AnthropicMessagesRequestToolsItemsOneOf2Name'
        cache_control:
          $ref: >-
            #/components/schemas/AnthropicMessagesRequestToolsItemsOneOf2CacheControl
      required:
        - type
        - name
    AnthropicMessagesRequestToolsItemsOneOf3Type:
      type: string
      enum:
        - value: web_search_20250305
    AnthropicMessagesRequestToolsItemsOneOf3Name:
      type: string
      enum:
        - value: web_search
    AnthropicMessagesRequestToolsItemsOneOf3UserLocationType:
      type: string
      enum:
        - value: approximate
    AnthropicMessagesRequestToolsItemsOneOf3UserLocation:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/AnthropicMessagesRequestToolsItemsOneOf3UserLocationType
        city:
          type:
            - string
            - 'null'
        country:
          type:
            - string
            - 'null'
        region:
          type:
            - string
            - 'null'
        timezone:
          type:
            - string
            - 'null'
      required:
        - type
    AnthropicMessagesRequestToolsItemsOneOf3CacheControlType:
      type: string
      enum:
        - value: ephemeral
    AnthropicMessagesRequestToolsItemsOneOf3CacheControlTtl:
      type: string
      enum:
        - value: 5m
        - value: 1h
    AnthropicMessagesRequestToolsItemsOneOf3CacheControl:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/AnthropicMessagesRequestToolsItemsOneOf3CacheControlType
        ttl:
          $ref: >-
            #/components/schemas/AnthropicMessagesRequestToolsItemsOneOf3CacheControlTtl
      required:
        - type
    AnthropicMessagesRequestToolsItems3:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/AnthropicMessagesRequestToolsItemsOneOf3Type'
        name:
          $ref: '#/components/schemas/AnthropicMessagesRequestToolsItemsOneOf3Name'
        allowed_domains:
          type:
            - array
            - 'null'
          items:
            type: string
        blocked_domains:
          type:
            - array
            - 'null'
          items:
            type: string
        max_uses:
          type:
            - number
            - 'null'
          format: double
        user_location:
          oneOf:
            - $ref: >-
                #/components/schemas/AnthropicMessagesRequestToolsItemsOneOf3UserLocation
            - type: 'null'
        cache_control:
          $ref: >-
            #/components/schemas/AnthropicMessagesRequestToolsItemsOneOf3CacheControl
      required:
        - type
        - name
    AnthropicMessagesRequestToolsItems:
      oneOf:
        - $ref: '#/components/schemas/AnthropicMessagesRequestToolsItems0'
        - $ref: '#/components/schemas/AnthropicMessagesRequestToolsItems1'
        - $ref: '#/components/schemas/AnthropicMessagesRequestToolsItems2'
        - $ref: '#/components/schemas/AnthropicMessagesRequestToolsItems3'
    AnthropicMessagesRequestToolChoiceOneOf0Type:
      type: string
      enum:
        - value: auto
    AnthropicMessagesRequestToolChoice0:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/AnthropicMessagesRequestToolChoiceOneOf0Type'
        disable_parallel_tool_use:
          type: boolean
      required:
        - type
    AnthropicMessagesRequestToolChoiceOneOf1Type:
      type: string
      enum:
        - value: any
    AnthropicMessagesRequestToolChoice1:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/AnthropicMessagesRequestToolChoiceOneOf1Type'
        disable_parallel_tool_use:
          type: boolean
      required:
        - type
    AnthropicMessagesRequestToolChoiceOneOf2Type:
      type: string
      enum:
        - value: none
    AnthropicMessagesRequestToolChoice2:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/AnthropicMessagesRequestToolChoiceOneOf2Type'
      required:
        - type
    AnthropicMessagesRequestToolChoiceOneOf3Type:
      type: string
      enum:
        - value: tool
    AnthropicMessagesRequestToolChoice3:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/AnthropicMessagesRequestToolChoiceOneOf3Type'
        name:
          type: string
        disable_parallel_tool_use:
          type: boolean
      required:
        - type
        - name
    AnthropicMessagesRequestToolChoice:
      oneOf:
        - $ref: '#/components/schemas/AnthropicMessagesRequestToolChoice0'
        - $ref: '#/components/schemas/AnthropicMessagesRequestToolChoice1'
        - $ref: '#/components/schemas/AnthropicMessagesRequestToolChoice2'
        - $ref: '#/components/schemas/AnthropicMessagesRequestToolChoice3'
    AnthropicMessagesRequestThinkingOneOf0Type:
      type: string
      enum:
        - value: enabled
    AnthropicMessagesRequestThinking0:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/AnthropicMessagesRequestThinkingOneOf0Type'
        budget_tokens:
          type: number
          format: double
      required:
        - type
        - budget_tokens
    AnthropicMessagesRequestThinkingOneOf1Type:
      type: string
      enum:
        - value: disabled
    AnthropicMessagesRequestThinking1:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/AnthropicMessagesRequestThinkingOneOf1Type'
      required:
        - type
    AnthropicMessagesRequestThinking:
      oneOf:
        - $ref: '#/components/schemas/AnthropicMessagesRequestThinking0'
        - $ref: '#/components/schemas/AnthropicMessagesRequestThinking1'
    AnthropicMessagesRequestServiceTier:
      type: string
      enum:
        - value: auto
        - value: standard_only
    DataCollection:
      type: string
      enum:
        - value: deny
        - value: allow
    ProviderName:
      type: string
      enum:
        - value: AI21
        - value: AionLabs
        - value: Alibaba
        - value: Ambient
        - value: Amazon Bedrock
        - value: Amazon Nova
        - value: Anthropic
        - value: Arcee AI
        - value: AtlasCloud
        - value: Avian
        - value: Azure
        - value: BaseTen
        - value: BytePlus
        - value: Black Forest Labs
        - value: Cerebras
        - value: Chutes
        - value: Cirrascale
        - value: Clarifai
        - value: Cloudflare
        - value: Cohere
        - value: Crusoe
        - value: DeepInfra
        - value: DeepSeek
        - value: Featherless
        - value: Fireworks
        - value: Friendli
        - value: GMICloud
        - value: Google
        - value: Google AI Studio
        - value: Groq
        - value: Hyperbolic
        - value: Inception
        - value: Inceptron
        - value: InferenceNet
        - value: Infermatic
        - value: Inflection
        - value: Liquid
        - value: Mara
        - value: Mancer 2
        - value: Minimax
        - value: ModelRun
        - value: Mistral
        - value: Modular
        - value: Moonshot AI
        - value: Morph
        - value: NCompass
        - value: Nebius
        - value: NextBit
        - value: Novita
        - value: Nvidia
        - value: OpenAI
        - value: OpenInference
        - value: Parasail
        - value: Perplexity
        - value: Phala
        - value: Relace
        - value: SambaNova
        - value: Seed
        - value: SiliconFlow
        - value: Sourceful
        - value: Stealth
        - value: StreamLake
        - value: Switchpoint
        - value: Together
        - value: Upstage
        - value: Venice
        - value: WandB
        - value: Xiaomi
        - value: xAI
        - value: Z.AI
        - value: FakeProvider
    AnthropicMessagesRequestProviderOrderItems:
      oneOf:
        - $ref: '#/components/schemas/ProviderName'
        - type: string
    AnthropicMessagesRequestProviderOnlyItems:
      oneOf:
        - $ref: '#/components/schemas/ProviderName'
        - type: string
    AnthropicMessagesRequestProviderIgnoreItems:
      oneOf:
        - $ref: '#/components/schemas/ProviderName'
        - type: string
    Quantization:
      type: string
      enum:
        - value: int4
        - value: int8
        - value: fp4
        - value: fp6
        - value: fp8
        - value: fp16
        - value: bf16
        - value: fp32
        - value: unknown
    AnthropicMessagesRequestProviderSort:
      type: object
      properties: {}
    BigNumberUnion:
      type: string
    AnthropicMessagesRequestProviderMaxPriceCompletion:
      type: object
      properties: {}
    AnthropicMessagesRequestProviderMaxPriceImage:
      type: object
      properties: {}
    AnthropicMessagesRequestProviderMaxPriceAudio:
      type: object
      properties: {}
    AnthropicMessagesRequestProviderMaxPriceRequest:
      type: object
      properties: {}
    AnthropicMessagesRequestProviderMaxPrice:
      type: object
      properties:
        prompt:
          $ref: '#/components/schemas/BigNumberUnion'
        completion:
          $ref: >-
            #/components/schemas/AnthropicMessagesRequestProviderMaxPriceCompletion
        image:
          $ref: '#/components/schemas/AnthropicMessagesRequestProviderMaxPriceImage'
        audio:
          $ref: '#/components/schemas/AnthropicMessagesRequestProviderMaxPriceAudio'
        request:
          $ref: '#/components/schemas/AnthropicMessagesRequestProviderMaxPriceRequest'
    PercentileThroughputCutoffs:
      type: object
      properties:
        p50:
          type:
            - number
            - 'null'
          format: double
          description: Minimum p50 throughput (tokens/sec)
        p75:
          type:
            - number
            - 'null'
          format: double
          description: Minimum p75 throughput (tokens/sec)
        p90:
          type:
            - number
            - 'null'
          format: double
          description: Minimum p90 throughput (tokens/sec)
        p99:
          type:
            - number
            - 'null'
          format: double
          description: Minimum p99 throughput (tokens/sec)
    PreferredMinThroughput:
      oneOf:
        - type: number
          format: double
        - $ref: '#/components/schemas/PercentileThroughputCutoffs'
        - description: Any type
    PercentileLatencyCutoffs:
      type: object
      properties:
        p50:
          type:
            - number
            - 'null'
          format: double
          description: Maximum p50 latency (seconds)
        p75:
          type:
            - number
            - 'null'
          format: double
          description: Maximum p75 latency (seconds)
        p90:
          type:
            - number
            - 'null'
          format: double
          description: Maximum p90 latency (seconds)
        p99:
          type:
            - number
            - 'null'
          format: double
          description: Maximum p99 latency (seconds)
    PreferredMaxLatency:
      oneOf:
        - type: number
          format: double
        - $ref: '#/components/schemas/PercentileLatencyCutoffs'
        - description: Any type
    AnthropicMessagesRequestProvider:
      type: object
      properties:
        allow_fallbacks:
          type:
            - boolean
            - 'null'
          description: >
            Whether to allow backup providers to serve requests

            - true: (default) when the primary provider (or your custom
            providers in "order") is unavailable, use the next best provider.

            - false: use only the primary/custom provider, and return the
            upstream error if it's unavailable.
        require_parameters:
          type:
            - boolean
            - 'null'
          description: >-
            Whether to filter providers to only those that support the
            parameters you've provided. If this setting is omitted or set to
            false, then providers will receive only the parameters they support,
            and ignore the rest.
        data_collection:
          $ref: '#/components/schemas/DataCollection'
        zdr:
          type:
            - boolean
            - 'null'
          description: >-
            Whether to restrict routing to only ZDR (Zero Data Retention)
            endpoints. When true, only endpoints that do not retain prompts will
            be used.
        enforce_distillable_text:
          type:
            - boolean
            - 'null'
          description: >-
            Whether to restrict routing to only models that allow text
            distillation. When true, only models where the author has allowed
            distillation will be used.
        order:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/AnthropicMessagesRequestProviderOrderItems'
          description: >-
            An ordered list of provider slugs. The router will attempt to use
            the first provider in the subset of this list that supports your
            requested model, and fall back to the next if it is unavailable. If
            no providers are available, the request will fail with an error
            message.
        only:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/AnthropicMessagesRequestProviderOnlyItems'
          description: >-
            List of provider slugs to allow. If provided, this list is merged
            with your account-wide allowed provider settings for this request.
        ignore:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/AnthropicMessagesRequestProviderIgnoreItems'
          description: >-
            List of provider slugs to ignore. If provided, this list is merged
            with your account-wide ignored provider settings for this request.
        quantizations:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/Quantization'
          description: A list of quantization levels to filter the provider by.
        sort:
          $ref: '#/components/schemas/AnthropicMessagesRequestProviderSort'
        max_price:
          $ref: '#/components/schemas/AnthropicMessagesRequestProviderMaxPrice'
          description: >-
            The object specifying the maximum price you want to pay for this
            request. USD price per million tokens, for prompt and completion.
        preferred_min_throughput:
          $ref: '#/components/schemas/PreferredMinThroughput'
        preferred_max_latency:
          $ref: '#/components/schemas/PreferredMaxLatency'
    AnthropicMessagesRequestPluginsItemsOneOf0Id:
      type: string
      enum:
        - value: auto-router
    AnthropicMessagesRequestPluginsItems0:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/AnthropicMessagesRequestPluginsItemsOneOf0Id'
        enabled:
          type: boolean
          description: >-
            Set to false to disable the auto-router plugin for this request.
            Defaults to true.
        allowed_models:
          type: array
          items:
            type: string
          description: >-
            List of model patterns to filter which models the auto-router can
            route between. Supports wildcards (e.g., "anthropic/*" matches all
            Anthropic models). When not specified, uses the default supported
            models list.
      required:
        - id
    AnthropicMessagesRequestPluginsItemsOneOf1Id:
      type: string
      enum:
        - value: moderation
    AnthropicMessagesRequestPluginsItems1:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/AnthropicMessagesRequestPluginsItemsOneOf1Id'
      required:
        - id
    AnthropicMessagesRequestPluginsItemsOneOf2Id:
      type: string
      enum:
        - value: web
    WebSearchEngine:
      type: string
      enum:
        - value: native
        - value: exa
    AnthropicMessagesRequestPluginsItems2:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/AnthropicMessagesRequestPluginsItemsOneOf2Id'
        enabled:
          type: boolean
          description: >-
            Set to false to disable the web-search plugin for this request.
            Defaults to true.
        max_results:
          type: number
          format: double
        search_prompt:
          type: string
        engine:
          $ref: '#/components/schemas/WebSearchEngine'
      required:
        - id
    AnthropicMessagesRequestPluginsItemsOneOf3Id:
      type: string
      enum:
        - value: file-parser
    PDFParserEngine:
      type: string
      enum:
        - value: mistral-ocr
        - value: pdf-text
        - value: native
    PDFParserOptions:
      type: object
      properties:
        engine:
          $ref: '#/components/schemas/PDFParserEngine'
    AnthropicMessagesRequestPluginsItems3:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/AnthropicMessagesRequestPluginsItemsOneOf3Id'
        enabled:
          type: boolean
          description: >-
            Set to false to disable the file-parser plugin for this request.
            Defaults to true.
        pdf:
          $ref: '#/components/schemas/PDFParserOptions'
      required:
        - id
    AnthropicMessagesRequestPluginsItemsOneOf4Id:
      type: string
      enum:
        - value: response-healing
    AnthropicMessagesRequestPluginsItems4:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/AnthropicMessagesRequestPluginsItemsOneOf4Id'
        enabled:
          type: boolean
          description: >-
            Set to false to disable the response-healing plugin for this
            request. Defaults to true.
      required:
        - id
    AnthropicMessagesRequestPluginsItems:
      oneOf:
        - $ref: '#/components/schemas/AnthropicMessagesRequestPluginsItems0'
        - $ref: '#/components/schemas/AnthropicMessagesRequestPluginsItems1'
        - $ref: '#/components/schemas/AnthropicMessagesRequestPluginsItems2'
        - $ref: '#/components/schemas/AnthropicMessagesRequestPluginsItems3'
        - $ref: '#/components/schemas/AnthropicMessagesRequestPluginsItems4'
    AnthropicMessagesRequest:
      type: object
      properties:
        model:
          type: string
        max_tokens:
          type: number
          format: double
        messages:
          type: array
          items:
            $ref: '#/components/schemas/OpenRouterAnthropicMessageParam'
        system:
          $ref: '#/components/schemas/AnthropicMessagesRequestSystem'
        metadata:
          $ref: '#/components/schemas/AnthropicMessagesRequestMetadata'
        stop_sequences:
          type: array
          items:
            type: string
        stream:
          type: boolean
        temperature:
          type: number
          format: double
        top_p:
          type: number
          format: double
        top_k:
          type: number
          format: double
        tools:
          type: array
          items:
            $ref: '#/components/schemas/AnthropicMessagesRequestToolsItems'
        tool_choice:
          $ref: '#/components/schemas/AnthropicMessagesRequestToolChoice'
        thinking:
          $ref: '#/components/schemas/AnthropicMessagesRequestThinking'
        service_tier:
          $ref: '#/components/schemas/AnthropicMessagesRequestServiceTier'
        provider:
          oneOf:
            - $ref: '#/components/schemas/AnthropicMessagesRequestProvider'
            - type: 'null'
          description: >-
            When multiple model providers are available, optionally indicate
            your routing preference.
        plugins:
          type: array
          items:
            $ref: '#/components/schemas/AnthropicMessagesRequestPluginsItems'
          description: >-
            Plugins you want to enable for this request, including their
            settings.
        user:
          type: string
          description: >-
            A unique identifier representing your end-user, which helps
            distinguish between different users of your app. This allows your
            app to identify specific users in case of abuse reports, preventing
            your entire app from being affected by the actions of individual
            users. Maximum of 128 characters.
        session_id:
          type: string
          description: >-
            A unique identifier for grouping related requests (e.g., a
            conversation or agent workflow) for observability. If provided in
            both the request body and the x-session-id header, the body value
            takes precedence. Maximum of 128 characters.
        models:
          type: array
          items:
            type: string
      required:
        - model
        - max_tokens
        - messages
    BaseAnthropicMessagesResponseType:
      type: string
      enum:
        - value: message
    BaseAnthropicMessagesResponseRole:
      type: string
      enum:
        - value: assistant
    BaseAnthropicMessagesResponseContentItemsOneOf0Type:
      type: string
      enum:
        - value: text
    BaseAnthropicMessagesResponseContentItemsOneOf0CitationsItemsOneOf0Type:
      type: string
      enum:
        - value: char_location
    BaseAnthropicMessagesResponseContentItemsOneOf0CitationsItems0:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/BaseAnthropicMessagesResponseContentItemsOneOf0CitationsItemsOneOf0Type
        cited_text:
          type: string
        document_index:
          type: number
          format: double
        document_title:
          type:
            - string
            - 'null'
        start_char_index:
          type: number
          format: double
        end_char_index:
          type: number
          format: double
        file_id:
          type:
            - string
            - 'null'
      required:
        - type
        - cited_text
        - document_index
        - document_title
        - start_char_index
        - end_char_index
        - file_id
    BaseAnthropicMessagesResponseContentItemsOneOf0CitationsItemsOneOf1Type:
      type: string
      enum:
        - value: page_location
    BaseAnthropicMessagesResponseContentItemsOneOf0CitationsItems1:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/BaseAnthropicMessagesResponseContentItemsOneOf0CitationsItemsOneOf1Type
        cited_text:
          type: string
        document_index:
          type: number
          format: double
        document_title:
          type:
            - string
            - 'null'
        start_page_number:
          type: number
          format: double
        end_page_number:
          type: number
          format: double
        file_id:
          type:
            - string
            - 'null'
      required:
        - type
        - cited_text
        - document_index
        - document_title
        - start_page_number
        - end_page_number
        - file_id
    BaseAnthropicMessagesResponseContentItemsOneOf0CitationsItemsOneOf2Type:
      type: string
      enum:
        - value: content_block_location
    BaseAnthropicMessagesResponseContentItemsOneOf0CitationsItems2:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/BaseAnthropicMessagesResponseContentItemsOneOf0CitationsItemsOneOf2Type
        cited_text:
          type: string
        document_index:
          type: number
          format: double
        document_title:
          type:
            - string
            - 'null'
        start_block_index:
          type: number
          format: double
        end_block_index:
          type: number
          format: double
        file_id:
          type:
            - string
            - 'null'
      required:
        - type
        - cited_text
        - document_index
        - document_title
        - start_block_index
        - end_block_index
        - file_id
    BaseAnthropicMessagesResponseContentItemsOneOf0CitationsItemsOneOf3Type:
      type: string
      enum:
        - value: web_search_result_location
    BaseAnthropicMessagesResponseContentItemsOneOf0CitationsItems3:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/BaseAnthropicMessagesResponseContentItemsOneOf0CitationsItemsOneOf3Type
        cited_text:
          type: string
        encrypted_index:
          type: string
        title:
          type:
            - string
            - 'null'
        url:
          type: string
      required:
        - type
        - cited_text
        - encrypted_index
        - title
        - url
    BaseAnthropicMessagesResponseContentItemsOneOf0CitationsItemsOneOf4Type:
      type: string
      enum:
        - value: search_result_location
    BaseAnthropicMessagesResponseContentItemsOneOf0CitationsItems4:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/BaseAnthropicMessagesResponseContentItemsOneOf0CitationsItemsOneOf4Type
        cited_text:
          type: string
        search_result_index:
          type: number
          format: double
        source:
          type: string
        title:
          type:
            - string
            - 'null'
        start_block_index:
          type: number
          format: double
        end_block_index:
          type: number
          format: double
      required:
        - type
        - cited_text
        - search_result_index
        - source
        - title
        - start_block_index
        - end_block_index
    BaseAnthropicMessagesResponseContentItemsOneOf0CitationsItems:
      oneOf:
        - $ref: >-
            #/components/schemas/BaseAnthropicMessagesResponseContentItemsOneOf0CitationsItems0
        - $ref: >-
            #/components/schemas/BaseAnthropicMessagesResponseContentItemsOneOf0CitationsItems1
        - $ref: >-
            #/components/schemas/BaseAnthropicMessagesResponseContentItemsOneOf0CitationsItems2
        - $ref: >-
            #/components/schemas/BaseAnthropicMessagesResponseContentItemsOneOf0CitationsItems3
        - $ref: >-
            #/components/schemas/BaseAnthropicMessagesResponseContentItemsOneOf0CitationsItems4
    BaseAnthropicMessagesResponseContentItems0:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/BaseAnthropicMessagesResponseContentItemsOneOf0Type
        text:
          type: string
        citations:
          type:
            - array
            - 'null'
          items:
            $ref: >-
              #/components/schemas/BaseAnthropicMessagesResponseContentItemsOneOf0CitationsItems
      required:
        - type
        - text
        - citations
    BaseAnthropicMessagesResponseContentItemsOneOf1Type:
      type: string
      enum:
        - value: tool_use
    BaseAnthropicMessagesResponseContentItems1:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/BaseAnthropicMessagesResponseContentItemsOneOf1Type
        id:
          type: string
        name:
          type: string
        input:
          oneOf:
            - description: Any type
            - type: 'null'
      required:
        - type
        - id
        - name
    BaseAnthropicMessagesResponseContentItemsOneOf2Type:
      type: string
      enum:
        - value: thinking
    BaseAnthropicMessagesResponseContentItems2:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/BaseAnthropicMessagesResponseContentItemsOneOf2Type
        thinking:
          type: string
        signature:
          type: string
      required:
        - type
        - thinking
        - signature
    BaseAnthropicMessagesResponseContentItemsOneOf3Type:
      type: string
      enum:
        - value: redacted_thinking
    BaseAnthropicMessagesResponseContentItems3:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/BaseAnthropicMessagesResponseContentItemsOneOf3Type
        data:
          type: string
      required:
        - type
        - data
    BaseAnthropicMessagesResponseContentItemsOneOf4Type:
      type: string
      enum:
        - value: server_tool_use
    BaseAnthropicMessagesResponseContentItemsOneOf4Name:
      type: string
      enum:
        - value: web_search
    BaseAnthropicMessagesResponseContentItems4:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/BaseAnthropicMessagesResponseContentItemsOneOf4Type
        id:
          type: string
        name:
          $ref: >-
            #/components/schemas/BaseAnthropicMessagesResponseContentItemsOneOf4Name
        input:
          oneOf:
            - description: Any type
            - type: 'null'
      required:
        - type
        - id
        - name
    BaseAnthropicMessagesResponseContentItemsOneOf5Type:
      type: string
      enum:
        - value: web_search_tool_result
    BaseAnthropicMessagesResponseContentItemsOneOf5ContentOneOf0ItemsType:
      type: string
      enum:
        - value: web_search_result
    BaseAnthropicMessagesResponseContentItemsOneOf5ContentOneOf0Items:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/BaseAnthropicMessagesResponseContentItemsOneOf5ContentOneOf0ItemsType
        encrypted_content:
          type: string
        page_age:
          type:
            - string
            - 'null'
        title:
          type: string
        url:
          type: string
      required:
        - type
        - encrypted_content
        - page_age
        - title
        - url
    BaseAnthropicMessagesResponseContentItemsOneOf5Content0:
      type: array
      items:
        $ref: >-
          #/components/schemas/BaseAnthropicMessagesResponseContentItemsOneOf5ContentOneOf0Items
    BaseAnthropicMessagesResponseContentItemsOneOf5ContentOneOf1Type:
      type: string
      enum:
        - value: web_search_tool_result_error
    BaseAnthropicMessagesResponseContentItemsOneOf5ContentOneOf1ErrorCode:
      type: string
      enum:
        - value: invalid_tool_input
        - value: unavailable
        - value: max_uses_exceeded
        - value: too_many_requests
        - value: query_too_long
    BaseAnthropicMessagesResponseContentItemsOneOf5Content1:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/BaseAnthropicMessagesResponseContentItemsOneOf5ContentOneOf1Type
        error_code:
          $ref: >-
            #/components/schemas/BaseAnthropicMessagesResponseContentItemsOneOf5ContentOneOf1ErrorCode
      required:
        - type
        - error_code
    BaseAnthropicMessagesResponseContentItemsOneOf5Content:
      oneOf:
        - $ref: >-
            #/components/schemas/BaseAnthropicMessagesResponseContentItemsOneOf5Content0
        - $ref: >-
            #/components/schemas/BaseAnthropicMessagesResponseContentItemsOneOf5Content1
    BaseAnthropicMessagesResponseContentItems5:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/BaseAnthropicMessagesResponseContentItemsOneOf5Type
        tool_use_id:
          type: string
        content:
          $ref: >-
            #/components/schemas/BaseAnthropicMessagesResponseContentItemsOneOf5Content
      required:
        - type
        - tool_use_id
        - content
    BaseAnthropicMessagesResponseContentItems:
      oneOf:
        - $ref: '#/components/schemas/BaseAnthropicMessagesResponseContentItems0'
        - $ref: '#/components/schemas/BaseAnthropicMessagesResponseContentItems1'
        - $ref: '#/components/schemas/BaseAnthropicMessagesResponseContentItems2'
        - $ref: '#/components/schemas/BaseAnthropicMessagesResponseContentItems3'
        - $ref: '#/components/schemas/BaseAnthropicMessagesResponseContentItems4'
        - $ref: '#/components/schemas/BaseAnthropicMessagesResponseContentItems5'
    BaseAnthropicMessagesResponseStopReason:
      type: string
      enum:
        - value: end_turn
        - value: max_tokens
        - value: stop_sequence
        - value: tool_use
        - value: pause_turn
        - value: refusal
        - value: model_context_window_exceeded
    BaseAnthropicMessagesResponseUsageCacheCreation:
      type: object
      properties:
        ephemeral_5m_input_tokens:
          type: number
          format: double
        ephemeral_1h_input_tokens:
          type: number
          format: double
      required:
        - ephemeral_5m_input_tokens
        - ephemeral_1h_input_tokens
    BaseAnthropicMessagesResponseUsageServerToolUse:
      type: object
      properties:
        web_search_requests:
          type: number
          format: double
      required:
        - web_search_requests
    BaseAnthropicMessagesResponseUsageServiceTier:
      type: string
      enum:
        - value: standard
        - value: priority
        - value: batch
    BaseAnthropicMessagesResponseUsage:
      type: object
      properties:
        input_tokens:
          type: number
          format: double
        output_tokens:
          type: number
          format: double
        cache_creation_input_tokens:
          type:
            - number
            - 'null'
          format: double
        cache_read_input_tokens:
          type:
            - number
            - 'null'
          format: double
        cache_creation:
          oneOf:
            - $ref: >-
                #/components/schemas/BaseAnthropicMessagesResponseUsageCacheCreation
            - type: 'null'
        server_tool_use:
          oneOf:
            - $ref: >-
                #/components/schemas/BaseAnthropicMessagesResponseUsageServerToolUse
            - type: 'null'
        service_tier:
          oneOf:
            - $ref: >-
                #/components/schemas/BaseAnthropicMessagesResponseUsageServiceTier
            - type: 'null'
      required:
        - input_tokens
        - output_tokens
        - cache_creation_input_tokens
        - cache_read_input_tokens
        - cache_creation
        - server_tool_use
        - service_tier
    AnthropicMessagesResponse:
      type: object
      properties:
        id:
          type: string
        type:
          $ref: '#/components/schemas/BaseAnthropicMessagesResponseType'
        role:
          $ref: '#/components/schemas/BaseAnthropicMessagesResponseRole'
        content:
          type: array
          items:
            $ref: '#/components/schemas/BaseAnthropicMessagesResponseContentItems'
        model:
          type: string
        stop_reason:
          oneOf:
            - $ref: '#/components/schemas/BaseAnthropicMessagesResponseStopReason'
            - type: 'null'
        stop_sequence:
          type:
            - string
            - 'null'
        usage:
          $ref: '#/components/schemas/BaseAnthropicMessagesResponseUsage'
      required:
        - id
        - type
        - role
        - content
        - model
        - stop_reason
        - stop_sequence
        - usage

```

## SDK Code Examples

```python
import requests

url = "https://openrouter.ai/api/v1/messages"

payload = {
    "model": "anthropic/claude-4.5-sonnet-20250929",
    "max_tokens": 1024,
    "messages": [
        {
            "role": "user",
            "content": "Hello, how are you?"
        }
    ],
    "temperature": 0.7
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://openrouter.ai/api/v1/messages';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"model":"anthropic/claude-4.5-sonnet-20250929","max_tokens":1024,"messages":[{"role":"user","content":"Hello, how are you?"}],"temperature":0.7}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://openrouter.ai/api/v1/messages"

	payload := strings.NewReader("{\n  \"model\": \"anthropic/claude-4.5-sonnet-20250929\",\n  \"max_tokens\": 1024,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Hello, how are you?\"\n    }\n  ],\n  \"temperature\": 0.7\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://openrouter.ai/api/v1/messages")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"model\": \"anthropic/claude-4.5-sonnet-20250929\",\n  \"max_tokens\": 1024,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Hello, how are you?\"\n    }\n  ],\n  \"temperature\": 0.7\n}"

response = http.request(request)
puts response.read_body
```

```java
HttpResponse<String> response = Unirest.post("https://openrouter.ai/api/v1/messages")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"model\": \"anthropic/claude-4.5-sonnet-20250929\",\n  \"max_tokens\": 1024,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Hello, how are you?\"\n    }\n  ],\n  \"temperature\": 0.7\n}")
  .asString();
```

```php
<?php

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://openrouter.ai/api/v1/messages', [
  'body' => '{
  "model": "anthropic/claude-4.5-sonnet-20250929",
  "max_tokens": 1024,
  "messages": [
    {
      "role": "user",
      "content": "Hello, how are you?"
    }
  ],
  "temperature": 0.7
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
var client = new RestClient("https://openrouter.ai/api/v1/messages");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"model\": \"anthropic/claude-4.5-sonnet-20250929\",\n  \"max_tokens\": 1024,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Hello, how are you?\"\n    }\n  ],\n  \"temperature\": 0.7\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "model": "anthropic/claude-4.5-sonnet-20250929",
  "max_tokens": 1024,
  "messages": [
    [
      "role": "user",
      "content": "Hello, how are you?"
    ]
  ],
  "temperature": 0.7
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://openrouter.ai/api/v1/messages")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```