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

# kimi-k2.6

> Creates a model response for the given chat conversation. Supports text, image, and video input, thinking mode, and tool use.

Kimi-K2.6 supports text, image, and video input, thinking / non-thinking modes, and Tool Use (function calling).


## OpenAPI

````yaml api-reference/model-api/moonshot/openapi/kimi-k2-6/openapi.yaml POST /v1/chat/completions
openapi: 3.1.0
info:
  title: Kimi-K2.6
  description: Kimi-K2.6 chat model by MoonShot via Anyfast OpenAI-compatible API
  version: 1.0.0
servers:
  - url: https://www.anyfast.ai
security:
  - bearerAuth: []
paths:
  /v1/chat/completions:
    post:
      summary: Chat Completion
      description: >-
        Creates a model response for the given chat conversation. Supports text,
        image, and video input, thinking mode, and tool use.
      operationId: createChatCompletionKimiK26
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
                - messages
              properties:
                model:
                  type: string
                  enum:
                    - kimi-k2.6
                  description: Model ID
                  example: kimi-k2.6
                messages:
                  type: array
                  minItems: 1
                  description: A list of messages comprising the conversation so far.
                  items:
                    type: object
                    required:
                      - role
                      - content
                    properties:
                      role:
                        type: string
                        enum:
                          - system
                          - user
                          - assistant
                      content:
                        oneOf:
                          - type: string
                          - type: array
                            description: >-
                              Multimodal input. Each element is typed via the
                              `type` field.
                            items:
                              type: object
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - text
                                    - image_url
                                    - video_url
                                text:
                                  type: string
                                  description: Required when type is text.
                                image_url:
                                  type: object
                                  properties:
                                    url:
                                      type: string
                                      description: >-
                                        base64-encoded data URI
                                        (data:image/png;base64,...) or file
                                        reference (ms://<file_id>).
                                video_url:
                                  type: object
                                  properties:
                                    url:
                                      type: string
                                      description: >-
                                        base64-encoded data URI
                                        (data:video/mp4;base64,...) or file
                                        reference (ms://<file_id>).
                        description: >-
                          Message content. Either a plain string or a multimodal
                          array of objects.
                  example:
                    - role: user
                      content: Hello!
                thinking:
                  type: object
                  description: >-
                    Controls thinking mode and whether reasoning_content from
                    previous turns is preserved. Default {"type": "enabled"}.
                  properties:
                    type:
                      type: string
                      enum:
                        - enabled
                        - disabled
                      description: Enable or disable thinking.
                    keep:
                      type:
                        - string
                        - 'null'
                      enum:
                        - all
                        - null
                      description: >-
                        Set to "all" to preserve reasoning_content from previous
                        turns (Preserved Thinking). Default null.
                max_completion_tokens:
                  type: integer
                  minimum: 1
                  description: >-
                    The maximum number of tokens to generate. (max_tokens is
                    deprecated and not honored.)
                temperature:
                  type: number
                  minimum: 0
                  maximum: 2
                  default: 1
                  description: Sampling temperature. Higher values make output more random.
                  example: 1
                top_p:
                  type: number
                  minimum: 0
                  maximum: 1
                  description: Nucleus sampling threshold.
                frequency_penalty:
                  type: number
                  minimum: -2
                  maximum: 2
                  default: 0
                  description: >-
                    Penalizes repeated tokens based on their frequency in the
                    text so far.
                presence_penalty:
                  type: number
                  minimum: -2
                  maximum: 2
                  default: 0
                  description: Penalizes tokens that have already appeared in the text.
                response_format:
                  type: object
                  description: Specifies the output format, e.g. JSON Mode.
                  properties:
                    type:
                      type: string
                      enum:
                        - text
                        - json_object
                        - json_schema
                tools:
                  type: array
                  description: A list of tools the model may call (function calling).
                  items:
                    type: object
                stream:
                  type: boolean
                  default: false
                  description: If true, stream partial message deltas using SSE.
                stop:
                  oneOf:
                    - type: string
                    - type: array
                      items:
                        type: string
                  description: >-
                    Sequences where the model will stop generating further
                    tokens.
      responses:
        '200':
          description: Completion generated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatCompletion'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    ChatCompletion:
      type: object
      required:
        - id
        - object
        - created
        - model
        - choices
      properties:
        id:
          type: string
          example: chatcmpl-abc123
        object:
          type: string
          example: chat.completion
        created:
          type: integer
          description: Unix timestamp
        model:
          type: string
          example: kimi-k2.6
        choices:
          type: array
          items:
            type: object
            properties:
              index:
                type: integer
              message:
                type: object
                properties:
                  role:
                    type: string
                    example: assistant
                  content:
                    type: string
                    example: Hello! How can I help you today?
                  reasoning_content:
                    type: string
                    description: The reasoning process returned in thinking mode.
              finish_reason:
                type: string
                enum:
                  - stop
                  - length
                  - content_filter
                  - tool_calls
                  - null
        usage:
          type: object
          properties:
            prompt_tokens:
              type: integer
            completion_tokens:
              type: integer
            total_tokens:
              type: integer
            prompt_tokens_details:
              type: object
              properties:
                cached_tokens:
                  type: integer
                  description: Number of tokens served from the context cache.
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````