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

# Kimi K3 - Anthropic-Compatible API

> Call `kimi-k3` through the Anthropic Messages protocol. Supports both non-streaming JSON and Anthropic SSE event streams.

<Note>
  **BaseURL**: The default BaseURL is `https://direct.evolink.ai`, which has better support for text models and long-lived connections. `https://api.evolink.ai` is the primary endpoint for multimodal services and serves as a fallback address for text models.
</Note>


## OpenAPI

````yaml en/api-manual/language-series/kimi-k3/kimi-k3-messages.json POST /v1/messages
openapi: 3.1.0
info:
  title: Kimi K3 Anthropic-Compatible API
  description: >-
    Call Kimi K3 through the Anthropic Messages protocol.


    **Capabilities confirmed for the initial release**:

    - Model ID: `kimi-k3`

    - Endpoint: `POST /v1/messages`

    - Uses an EvoLink API key with Bearer Token authentication

    - Supports system prompts, text-based multi-turn conversations, SSE
    streaming, and tool use

    - Responses may contain `thinking`, `text`, and `tool_use` content blocks


    For multi-turn conversations, return complete assistant content blocks
    unchanged, including thinking, signature, and tool_use blocks.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://direct.evolink.ai
    description: Production (Recommended)
  - url: https://api.evolink.ai
    description: Alternative URL
security:
  - bearerAuth: []
tags:
  - name: Messages
    description: Anthropic Messages-compatible API
paths:
  /v1/messages:
    post:
      tags:
        - Messages
      summary: Kimi K3 Messages API (Anthropic-Compatible)
      description: >-
        Call `kimi-k3` through the Anthropic Messages protocol. Supports both
        non-streaming JSON and Anthropic SSE event streams.
      operationId: createMessageKimiK3
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateMessageRequest'
            examples:
              simple:
                summary: Minimal request
                value:
                  model: kimi-k3
                  max_tokens: 1024
                  messages:
                    - role: user
                      content: Introduce Kimi K3 in three sentences.
              system_prompt:
                summary: System prompt
                value:
                  model: kimi-k3
                  max_tokens: 2048
                  system: You are a precise technical editor.
                  messages:
                    - role: user
                      content: Explain context caching.
              streaming:
                summary: SSE streaming output
                value:
                  model: kimi-k3
                  max_tokens: 1024
                  stream: true
                  messages:
                    - role: user
                      content: Write a short poem about a summer night.
              tool_use:
                summary: Tool use
                value:
                  model: kimi-k3
                  max_tokens: 2048
                  messages:
                    - role: user
                      content: Check today's weather in Beijing.
                  tools:
                    - name: get_weather
                      description: Get the weather for a specified city
                      input_schema:
                        type: object
                        properties:
                          city:
                            type: string
                            description: City name
                        required:
                          - city
                  tool_choice:
                    type: auto
      responses:
        '200':
          description: >-
            Message response; streaming requests return an Anthropic SSE event
            stream
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
            text/event-stream:
              schema:
                type: string
                description: >-
                  The event sequence typically includes message_start,
                  content_block_*, message_delta, and message_stop.
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    CreateMessageRequest:
      type: object
      required:
        - model
        - max_tokens
        - messages
      properties:
        model:
          type: string
          enum:
            - kimi-k3
          description: Model ID.
        max_tokens:
          type: integer
          minimum: 1
          description: >-
            Maximum number of tokens allowed for this generation, including
            thinking and final text.
        messages:
          type: array
          minItems: 1
          description: >-
            Anthropic Messages message list. For multi-turn conversations,
            return complete assistant content blocks unchanged.
          items:
            $ref: '#/components/schemas/Message'
        system:
          type: string
          description: >-
            System prompt. The Messages protocol uses a top-level system field
            instead of a system role.
        stream:
          type: boolean
          default: false
          description: Whether to return an Anthropic SSE event stream.
        tools:
          type: array
          description: Tools that the model may call.
          items:
            $ref: '#/components/schemas/Tool'
        tool_choice:
          $ref: '#/components/schemas/ToolChoice'
    MessageResponse:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum:
            - message
        role:
          type: string
          enum:
            - assistant
        model:
          type: string
          example: kimi-k3
        content:
          type: array
          items:
            $ref: '#/components/schemas/ContentBlock'
        stop_reason:
          type: string
          enum:
            - end_turn
            - max_tokens
            - tool_use
        stop_sequence:
          type:
            - string
            - 'null'
        usage:
          $ref: '#/components/schemas/MessageUsage'
    Message:
      type: object
      required:
        - role
        - content
      properties:
        role:
          type: string
          description: Message role. Only user and assistant are supported.
          enum:
            - user
            - assistant
        content:
          description: >-
            Message content as either a plain text string or an array of
            Anthropic content blocks.
          oneOf:
            - type: string
            - type: array
              items:
                $ref: '#/components/schemas/ContentBlock'
    Tool:
      type: object
      required:
        - name
        - input_schema
      properties:
        name:
          type: string
          description: Tool name.
        description:
          type: string
          description: Description that helps the model decide when to use the tool.
        input_schema:
          type: object
          additionalProperties: true
          description: Tool parameter definition in JSON Schema format.
    ToolChoice:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          description: >-
            Tool selection strategy: auto lets the model decide, any requires
            one tool, and tool requires the named tool.
          enum:
            - auto
            - any
            - tool
        name:
          type: string
          description: Name of the tool to call when type=tool.
    ContentBlock:
      description: Anthropic content block for text, reasoning, tool use, or a tool result.
      oneOf:
        - $ref: '#/components/schemas/TextBlock'
        - $ref: '#/components/schemas/ThinkingBlock'
        - $ref: '#/components/schemas/ToolUseBlock'
        - $ref: '#/components/schemas/ToolResultBlock'
    MessageUsage:
      type: object
      properties:
        input_tokens:
          type: integer
          description: Input tokens not served from cache.
        cache_creation_input_tokens:
          type: integer
          description: Input tokens written to cache.
        cache_read_input_tokens:
          type: integer
          description: Input tokens served from cache.
        output_tokens:
          type: integer
          description: Output tokens, including thinking tokens.
        output_tokens_details:
          type: object
          properties:
            thinking_tokens:
              type: integer
    ErrorResponse:
      type: object
      properties:
        type:
          type: string
          enum:
            - error
        error:
          type: object
          properties:
            type:
              type: string
            message:
              type: string
        request_id:
          type: string
    TextBlock:
      type: object
      required:
        - type
        - text
      properties:
        type:
          type: string
          description: Content block type. Fixed to text.
          enum:
            - text
        text:
          type: string
          description: Text content.
    ThinkingBlock:
      type: object
      required:
        - type
        - thinking
      properties:
        type:
          type: string
          description: Content block type. Fixed to thinking.
          enum:
            - thinking
        thinking:
          type: string
          description: >-
            Model reasoning content. Return it unchanged together with the
            signature in multi-turn conversations.
        signature:
          type: string
          description: >-
            In multi-turn conversations, return this unchanged together with the
            thinking block.
    ToolUseBlock:
      type: object
      required:
        - type
        - id
        - name
        - input
      properties:
        type:
          type: string
          description: Content block type. Fixed to tool_use.
          enum:
            - tool_use
        id:
          type: string
          description: Tool use ID referenced by tool_use_id when returning the result.
        name:
          type: string
          description: Name of the tool requested by the model.
        input:
          type: object
          additionalProperties: true
          description: Tool input object generated by the model.
    ToolResultBlock:
      type: object
      required:
        - type
        - tool_use_id
        - content
      properties:
        type:
          type: string
          description: Content block type. Fixed to tool_result.
          enum:
            - tool_result
        tool_use_id:
          type: string
          description: ID of the corresponding tool_use content block.
        content:
          type: string
          description: Tool execution result.
        is_error:
          type: boolean
          default: false
          description: Whether the tool execution failed.
  responses:
    BadRequest:
      description: Invalid request parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: API key is missing or invalid
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    RateLimited:
      description: Rate limit exceeded or insufficient quota
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalError:
      description: Internal service error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        ##All APIs require Bearer Token authentication##


        **Get API Key:**


        Visit [API Key Management Page](https://evolink.ai/dashboard/keys) to
        get your API Key


        **Add to request header:**

        ```

        Authorization: Bearer YOUR_API_KEY

        ```

````