> ## 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 response

> Creates a model response for the given input. This is the OpenAI Responses API. Supports `instructions` (system message equivalent), streaming, tool calling, JSON mode, and multi-turn conversations.
When present, reasoning is returned as a structured output item with `type: "reasoning"`, separate from the message output.




## OpenAPI

````yaml /api-reference/corti-models/corti-models-openapi.yml post /responses
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 | | `corti-s1-embedding` | Embedding model |

    `-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:
  /responses:
    post:
      tags:
        - Responses
      summary: Create response
      description: >
        Creates a model response for the given input. This is the OpenAI
        Responses API. Supports `instructions` (system message equivalent),
        streaming, tool calling, JSON mode, and multi-turn conversations.

        When present, reasoning is returned as a structured output item with
        `type: "reasoning"`, separate from the message output.
      operationId: createResponse
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResponseRequest'
            examples:
              Basic:
                summary: Basic response
                value:
                  model: corti-s1
                  input:
                    - role: user
                      content:
                        - type: input_text
                          text: Count from 1 to 5
              With Instructions:
                summary: With system instructions
                value:
                  model: corti-s1
                  input:
                    - role: user
                      content:
                        - type: input_text
                          text: Count from 1 to 5
                  instructions: You are a helpful assistant.
              Streaming:
                summary: Streaming response
                value:
                  model: corti-s1
                  input:
                    - role: user
                      content:
                        - type: input_text
                          text: Count from 1 to 5
                  stream: true
              JSON Mode:
                summary: Structured JSON output
                value:
                  model: corti-s1
                  input:
                    - role: user
                      content:
                        - type: input_text
                          text: >-
                            Return a JSON object with fields name and age for
                            John who is 30.
                  response_format:
                    type: json_object
              Tool Calling:
                summary: Function calling
                value:
                  model: corti-s1
                  input:
                    - role: user
                      content:
                        - type: input_text
                          text: What is the weather in Copenhagen?
                  tools:
                    - type: function
                      name: get_weather
                      description: Get weather for a city
                      parameters:
                        type: object
                        properties:
                          city:
                            type: string
                        required:
                          - city
              Multi-turn:
                summary: Multi-turn via input array
                value:
                  model: corti-s1
                  input:
                    - role: user
                      content:
                        - type: input_text
                          text: Count from 1 to 5
                    - role: assistant
                      content:
                        - type: output_text
                          text: 1, 2, 3, 4, 5
                    - role: user
                      content:
                        - type: input_text
                          text: Now count from 10 to 15
      responses:
        '200':
          description: >
            Successful response. For non-streaming requests, returns a complete
            response object. For streaming requests, returns Server-Sent Events
            (SSE) with typed events.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseObject'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/ResponseStreamEvent'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Response ID not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    ResponseRequest:
      type: object
      required:
        - model
        - input
      properties:
        model:
          type: string
          enum:
            - corti-s1
            - corti-s1-instant
            - corti-s1-mini
            - corti-s1-mini-instant
          default: corti-s1
        input:
          type: array
          description: >
            Input messages as an array of message objects. Each message has a
            `role` and a `content` array of typed parts.
          items:
            type: object
            required:
              - role
              - content
            properties:
              role:
                type: string
                enum:
                  - user
                  - assistant
              content:
                type: array
                items:
                  type: object
                  required:
                    - type
                    - text
                  properties:
                    type:
                      type: string
                      enum:
                        - input_text
                        - output_text
                      description: >
                        `input_text` for user messages, `output_text` for
                        assistant messages in multi-turn conversations.
                    text:
                      type: string
                      description: The text content.
        instructions:
          type: string
          nullable: true
          description: >
            System-level instructions. Equivalent to a system message in chat
            completions.
        stream:
          type: boolean
          default: false
          description: >
            If true, returns Server-Sent Events (SSE) with typed events
            (`response.created`, `response.in_progress`,
            `response.output_item.added`, `response.output_text.delta`,
            `response.completed`).
        temperature:
          type: number
          format: float
          minimum: 0
          maximum: 1
          default: 1
        top_p:
          type: number
          format: float
          default: 0.95
        max_output_tokens:
          type: integer
          minimum: 1
          description: >
            Maximum output tokens. If exceeded, the response status is
            `incomplete` with `incomplete_details.reason: "max_output_tokens"`.
        response_format:
          type: object
          properties:
            type:
              type: string
              enum:
                - json_object
          required:
            - type
        tools:
          type: array
          description: Tools the model may call.
          items:
            $ref: '#/components/schemas/ResponseFunctionTool'
        tool_choice:
          type: string
          enum:
            - auto
            - none
          default: auto
        presence_penalty:
          type: number
          format: float
          default: 0
        frequency_penalty:
          type: number
          format: float
          default: 0
    ResponseObject:
      type: object
      properties:
        id:
          type: string
          description: Unique response ID (e.g. `resp_88d5b93fd2e7b7b1`).
        object:
          type: string
          enum:
            - response
        created_at:
          type: integer
          description: Unix timestamp (seconds).
        model:
          type: string
          description: The model name used for this response.
        status:
          type: string
          enum:
            - completed
            - incomplete
          description: >
            `incomplete` when max_output_tokens is hit before generation
            finishes.
        incomplete_details:
          type: object
          nullable: true
          properties:
            reason:
              type: string
              enum:
                - max_output_tokens
        instructions:
          type: string
          nullable: true
        output:
          type: array
          description: >
            Array of output items. May include reasoning items with `type:
            "reasoning"`, message items with `type: "message"`, and function
            call items with `type: "function_call"`.
          items:
            $ref: '#/components/schemas/ResponseOutputItem'
        temperature:
          type: number
        top_p:
          type: number
        tool_choice:
          type: string
        tools:
          type: array
        max_output_tokens:
          type: integer
        previous_response_id:
          type: string
          nullable: true
        usage:
          $ref: '#/components/schemas/ResponseUsage'
        service_tier:
          type: string
          nullable: true
        truncation:
          type: string
        background:
          type: boolean
        parallel_tool_calls:
          type: boolean
        max_tool_calls:
          type: integer
          nullable: true
        text:
          type: string
          nullable: true
        top_logprobs:
          type: integer
          nullable: true
        reasoning:
          type: string
          nullable: true
          description: Reasoning is returned in `output[]` items.
        prompt:
          type: string
          nullable: true
        metadata:
          type: object
          nullable: true
        user:
          type: string
          nullable: true
        presence_penalty:
          type: number
        frequency_penalty:
          type: number
        kv_transfer_params:
          type: object
          nullable: true
        input_messages:
          type: array
          nullable: true
        output_messages:
          type: array
          nullable: true
    ResponseStreamEvent:
      type: object
      description: >
        SSE events from the Responses API. Each event has a type and sequence
        number. Event types include: `response.created`, `response.in_progress`,
        `response.output_item.added`, `response.output_text.delta`,
        `response.output_item.done`, `response.completed`.
      properties:
        type:
          type: string
          enum:
            - response.created
            - response.in_progress
            - response.output_item.added
            - response.output_text.delta
            - response.output_item.done
            - response.completed
        sequence_number:
          type: integer
        response:
          type: object
          description: The current state of the response object.
        item:
          type: object
          description: The output item (for item events).
        part:
          type: object
          description: The content part (for part events).
        delta:
          type: string
          description: Incremental text (for delta events).
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Error message or object with message.
        detail:
          type: string
    ResponseFunctionTool:
      type: object
      required:
        - type
        - name
        - parameters
      properties:
        type:
          type: string
          enum:
            - function
        name:
          type: string
          pattern: ^[a-zA-Z0-9_-]+$
          maxLength: 64
        description:
          type: string
        parameters:
          type: object
          description: JSON Schema object defining accepted parameters.
    ResponseOutputItem:
      oneOf:
        - title: Message
          type: object
          properties:
            id:
              type: string
            type:
              type: string
              enum:
                - message
            role:
              type: string
              enum:
                - assistant
            status:
              type: string
              enum:
                - completed
            phase:
              type: string
              nullable: true
            content:
              type: array
              items:
                type: object
                properties:
                  text:
                    type: string
                    description: The model's text response.
                  type:
                    type: string
                    enum:
                      - output_text
                  annotations:
                    type: array
                    items: {}
                  logprobs:
                    type: object
                    nullable: true
        - title: Function Call
          type: object
          properties:
            id:
              type: string
            type:
              type: string
              enum:
                - function_call
            name:
              type: string
              description: Function name to call.
            arguments:
              type: string
              description: JSON-encoded function arguments.
            call_id:
              type: string
              description: ID to reference when providing the tool result.
            namespace:
              type: string
              nullable: true
            status:
              type: string
              enum:
                - completed
    ResponseUsage:
      type: object
      properties:
        input_tokens:
          type: integer
        output_tokens:
          type: integer
        total_tokens:
          type: integer
        input_tokens_details:
          type: object
          properties:
            cached_tokens:
              type: integer
            input_tokens_per_turn:
              type: array
              items: {}
            cached_tokens_per_turn:
              type: array
              items: {}
        output_tokens_details:
          type: object
          properties:
            reasoning_tokens:
              type: integer
            tool_output_tokens:
              type: integer
            output_tokens_per_turn:
              type: array
              items: {}
            tool_output_tokens_per_turn:
              type: array
              items: {}
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: |
        Use a Corti-issued bearer token.

````