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

# Claude Messages

> Fully compatible with the Claude Messages API format. Supports multimodal content (text & images), tools, streaming, and multi-turn conversations.



## OpenAPI

````yaml post /v1/messages
openapi: 3.1.0
info:
  title: General Chat API
  version: 1.0.0
  description: >-
    Unified chat API interface supporting multiple text-generation models.
    Compatible with OpenAI Chat Completions API format.
servers:
  - url: https://apiif.com
    description: Primary API server
security:
  - bearerAuth: []
paths:
  /v1/messages:
    post:
      summary: Claude Messages
      description: >-
        Fully compatible with the Claude Messages API format. Supports
        multimodal content (text & images), tools, streaming, and multi-turn
        conversations.
      operationId: createClaudeMessage
      parameters:
        - name: anthropic-version
          in: header
          required: true
          schema:
            type: string
          description: Claude API version to use (e.g. 2025-10-01).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                model:
                  type: string
                  description: Model name (e.g. claude-sonnet-4-5-20250929).
                messages:
                  type: array
                  items:
                    type: object
                    properties:
                      role:
                        type: string
                        enum:
                          - user
                          - assistant
                      content:
                        oneOf:
                          - type: string
                          - type: array
                            items:
                              type: object
                              properties:
                                type:
                                  type: string
                                text:
                                  type: string
                                source:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                    url:
                                      type: string
                                      format: uri
                                    media_type:
                                      type: string
                                    data:
                                      type: string
                    required:
                      - role
                      - content
                max_tokens:
                  type: integer
                system:
                  oneOf:
                    - type: string
                    - type: array
                      items:
                        type: object
                        properties:
                          type:
                            type: string
                          text:
                            type: string
                temperature:
                  type: number
                top_p:
                  type: number
                top_k:
                  type: integer
                stream:
                  type: boolean
                stop_sequences:
                  type: array
                  items:
                    type: string
                metadata:
                  type: object
                tools:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                      description:
                        type: string
                      input_schema:
                        type: object
                    required:
                      - name
                tool_choice:
                  type: object
              required:
                - model
                - messages
            examples:
              basic:
                value:
                  model: claude-sonnet-4-5-20250929
                  max_tokens: 1024
                  messages:
                    - role: user
                      content: Hello, world
      responses:
        '200':
          description: Successful Claude message response.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      type:
                        type: string
                        example: message
                      role:
                        type: string
                        example: assistant
                      content:
                        type: array
                        items:
                          type: object
                          properties:
                            type:
                              type: string
                            text:
                              type: string
                            id:
                              type: string
                            name:
                              type: string
                            input:
                              type: object
                      model:
                        type: string
                      stop_reason:
                        type: string
                      stop_sequence:
                        type:
                          - string
                          - 'null'
                      usage:
                        type: object
                        properties:
                          input_tokens:
                            type: integer
                          output_tokens:
                            type: integer
              examples:
                success:
                  value:
                    code: 200
                    data:
                      id: msg_013Zva2CMHLNnXjNJJKqJ2EF
                      type: message
                      role: assistant
                      content:
                        - type: text
                          text: Hello! I'm Claude. Nice to meet you.
                      model: claude-sonnet-4-5-20250929
                      stop_reason: end_turn
                      stop_sequence: null
                      usage:
                        input_tokens: 12
                        output_tokens: 18
        '400':
          description: Invalid request parameters
          content:
            application/json:
              examples:
                bad_request:
                  value:
                    type: error
                    error:
                      type: invalid_request_error
                      message: Invalid request parameters
        '401':
          description: Invalid API key
          content:
            application/json:
              examples:
                unauthorized:
                  value:
                    type: error
                    error:
                      type: authentication_error
                      message: Invalid API key
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              examples:
                rate_limited:
                  value:
                    type: error
                    error:
                      type: rate_limit_error
                      message: Rate limit exceeded
        '500':
          description: Internal server error
          content:
            application/json:
              examples:
                server_error:
                  value:
                    type: error
                    error:
                      type: api_error
                      message: Internal server error
      security:
        - xApiKeyAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'All endpoints require `Authorization: Bearer YOUR_API_KEY`.'
    xApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API Key authentication via `x-api-key` header (used by Claude
        endpoints).

````