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

# Create message (Anthropic)

> Sends a structured list of input messages and generates the next message in the conversation. This is the Anthropic Messages API.
Reasoning behavior mirrors the Chat Completions API: `corti-s1` and `corti-s1-mini` generate chain-of-thought reasoning, while `-instant` variants do not. However, the Anthropic Messages API response does not expose reasoning as a separate field — content is returned as text blocks only.




## OpenAPI

````yaml /api-reference/corti-models/corti-models-openapi.yml post /messages
openapi: 3.0.3
info:
  title: Corti S1 API
  description: >
    OpenAI-compatible and Anthropic-compatible API for Corti's LLM models.

    ## Available Models

    | Model | Description | |------|-------------| | `corti-s1` |
    Full-capability model | | `corti-s1-instant` | Fast variant of corti-s1 | |
    `corti-s1-mini` | Smaller model | | `corti-s1-mini-instant` | Fast variant
    of corti-s1-mini |

    `-instant` variants are optimized for speed and lower token usage.

    ## Reasoning

    Some models return chain-of-thought reasoning in a `reasoning` field (chat
    completions) or as structured output items with `type: "reasoning"`
    (responses API). The `-instant` variants do not produce reasoning.

    | Model | Chat Completions | Anthropic Messages | |-------|:---:|:---:| |
    `corti-s1` | `reasoning` field present | Text content only | |
    `corti-s1-instant` | `reasoning: null` | Text content only | |
    `corti-s1-mini` | `reasoning` field present | Text content only | |
    `corti-s1-mini-instant` | `reasoning: null` | Text content only |

    ## Authentication

    All endpoints require a bearer token issued by Corti. Pass it in the
    `Authorization` header as `Bearer <token>`.
  version: 1.0.0
  contact:
    name: Corti AI
    url: https://corti.app
servers:
  - url: https://ai.eu.corti.app/v1
    description: Production (EU)
security:
  - bearerAuth: []
paths:
  /messages:
    servers:
      - url: https://ai.eu.corti.app/anthropic/v1
        description: Anthropic-compatible API (EU)
    post:
      tags:
        - Anthropic
      summary: Create message (Anthropic)
      description: >
        Sends a structured list of input messages and generates the next message
        in the conversation. This is the Anthropic Messages API.

        Reasoning behavior mirrors the Chat Completions API: `corti-s1` and
        `corti-s1-mini` generate chain-of-thought reasoning, while `-instant`
        variants do not. However, the Anthropic Messages API response does not
        expose reasoning as a separate field — content is returned as text
        blocks only.
      operationId: createMessage
      parameters:
        - name: anthropic-version
          in: header
          required: true
          schema:
            type: string
            default: '2023-06-01'
          description: Anthropic API version header.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AnthropicMessageRequest'
            examples:
              Basic:
                summary: Basic message
                value:
                  model: corti-s1
                  max_tokens: 500
                  messages:
                    - role: user
                      content: Count from 1 to 5
              With System:
                summary: With system prompt
                value:
                  model: corti-s1
                  max_tokens: 500
                  system: You are a helpful assistant named TestBot.
                  messages:
                    - role: user
                      content: What is your name?
              Streaming:
                summary: Streaming message
                value:
                  model: corti-s1
                  max_tokens: 500
                  stream: true
                  messages:
                    - role: user
                      content: Count from 1 to 5
      responses:
        '200':
          description: >
            Successful response. For non-streaming requests, returns a complete
            message object. For streaming requests, returns Server-Sent Events
            (SSE) with typed events: `message_start`, `content_block_start`,
            `content_block_delta`, `content_block_stop`, `message_delta`,
            `message_stop`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnthropicMessageResponse'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/AnthropicStreamEvent'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    AnthropicMessageRequest:
      type: object
      required:
        - model
        - max_tokens
        - messages
      properties:
        model:
          type: string
          enum:
            - corti-s1
            - corti-s1-instant
            - corti-s1-mini
            - corti-s1-mini-instant
          default: corti-s1
        max_tokens:
          type: integer
          minimum: 1
          description: Maximum tokens to generate. Required by the Anthropic API.
        messages:
          type: array
          minItems: 1
          description: |
            Conversation messages. Supported roles: `user`, `assistant`.
          items:
            type: object
            required:
              - role
              - content
            properties:
              role:
                type: string
                enum:
                  - user
                  - assistant
              content:
                type: string
                description: Message content as plain text.
        system:
          type: string
          nullable: true
          description: |
            System prompt. Equivalent to a system message in chat completions.
        stream:
          type: boolean
          default: false
          description: >
            If true, returns SSE with typed events: `message_start`,
            `content_block_start`, `content_block_delta`, `content_block_stop`,
            `message_delta`, `message_stop`.
        temperature:
          type: number
          format: float
          minimum: 0
          maximum: 1
          default: 1
        top_p:
          type: number
          format: float
          default: 0.95
    AnthropicMessageResponse:
      type: object
      properties:
        id:
          type: string
          description: Unique message ID (e.g. `chatcmpl-3e537413-...`).
        type:
          type: string
          enum:
            - message
        role:
          type: string
          enum:
            - assistant
        content:
          type: array
          description: |
            Array of content blocks.
          items:
            type: object
            properties:
              type:
                type: string
                enum:
                  - text
              text:
                type: string
                description: The model's text response.
        model:
          type: string
          description: The model name used for this response.
        stop_reason:
          type: string
          enum:
            - end_turn
          description: Why generation stopped.
        usage:
          type: object
          properties:
            input_tokens:
              type: integer
            output_tokens:
              type: integer
            cache_creation_input_tokens:
              type: integer
            cache_read_input_tokens:
              type: integer
    AnthropicStreamEvent:
      type: object
      description: >
        SSE events from the Anthropic Messages API. Each event has a type. Event
        types: `message_start`, `content_block_start`, `content_block_delta`,
        `content_block_stop`, `message_delta`, `message_stop`.
      properties:
        type:
          type: string
          enum:
            - message_start
            - content_block_start
            - content_block_delta
            - content_block_stop
            - message_delta
            - message_stop
        message:
          type: object
          description: The message object (for `message_start`).
        content_block:
          type: object
          description: The content block (for `content_block_start`).
          properties:
            type:
              type: string
              enum:
                - text
            text:
              type: string
        delta:
          type: object
          description: The delta (for `content_block_delta` and `message_delta`).
          properties:
            type:
              type: string
              enum:
                - text_delta
            text:
              type: string
              description: Incremental text (for `content_block_delta`).
            stop_reason:
              type: string
              nullable: true
              description: Stop reason (for `message_delta`).
            stop_sequence:
              type: string
              nullable: true
        index:
          type: integer
          description: Content block index.
        usage:
          type: object
          nullable: true
          description: Token usage (for `message_delta`).
          properties:
            output_tokens:
              type: integer
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Error message or object with message.
        detail:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: |
        Use a Corti-issued bearer token.

````