# Kimi K3

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /openai/v1/responses:
    post:
      summary: Kimi K3
      deprecated: false
      description: >
        :::warning

        **⚠️ Chat only**


        This model currently supports chat requests only and has not yet been
        adapted for agent use. Connecting it to an agent may cause request
        errors or unexpected results.

        :::


        > Kimi K3 is an OpenAI Responses–compatible endpoint that supports chat,
        function calling, image input, streaming, and reasoning, with a
        **1M-token** context window.


        <CardGroup cols={2}>
          <Card title="Reasoning" icon="brain">
            Reasoning is on by default. `reasoning.effort` can be `low` / `medium` / `high`.
          </Card>
          <Card title="Image input" icon="image">
            Mix text and images in a single message.
          </Card>
          <Card title="Function calling" icon="wand-magic-sparkles">
            Custom function calling, with optional JSON-constrained answers.
          </Card>
          <Card title="Unified endpoint" icon="code">
            Use the unified <code>/openai/v1/responses</code> endpoint with <code>model</code> set to <code>kimi-k3</code>.
          </Card>
        </CardGroup>


        ## Reasoning


        The model **reasons by default**. Higher `reasoning.effort` means more
        thorough reasoning and possibly higher latency.


        - `low`: faster

        - `medium`: balanced

        - `high`: more thorough, better for complex questions


        If omitted, the model chooses. Reasoning summaries are for display only
        and do not need to be sent back as input.


        :::warning

        This model **does not support** web search. Built-in tools such as
        `web_search` are ignored.

        :::


        ## Tools and input


        <AccordionGroup>
          <Accordion title="Basic chat (streaming)">
            ```json
            {
              "model": "kimi-k3",
              "stream": true,
              "input": "Introduce Beijing in one sentence"
            }
            ```
          </Accordion>
          <Accordion title="Multi-turn chat + instructions (non-streaming)">
            ```json
            {
              "model": "kimi-k3",
              "stream": false,
              "instructions": "Answer in English only",
              "input": [
                { "role": "user", "content": "My name is Xiaoming" },
                { "role": "assistant", "content": "Hi Xiaoming." },
                { "role": "user", "content": "What is my name?" }
              ]
            }
            ```
          </Accordion>
          <Accordion title="Set reasoning effort">
            ```json
            {
              "model": "kimi-k3",
              "stream": true,
              "reasoning": { "effort": "high" },
              "input": "Which is larger, 9.11 or 9.9?"
            }
            ```
          </Accordion>
          <Accordion title="Function calling">
            Declare functions the model can call. Only `function` tools are supported. After you pass `tools`, set `tool_choice` to `auto` to let the model decide, or pass an object to pin a specific function. Do not send `tool_choice` if you are not sending `tools`.

            ```json
            {
              "model": "kimi-k3",
              "stream": false,
              "input": "What's the weather like in Shanghai right now?",
              "tool_choice": "auto",
              "tools": [
                {
                  "type": "function",
                  "name": "get_weather",
                  "description": "Get the current weather for a city",
                  "parameters": {
                    "type": "object",
                    "properties": {
                      "city": { "type": "string", "description": "City name" }
                    },
                    "required": ["city"],
                    "additionalProperties": false
                  }
                }
              ]
            }
            ```
          </Accordion>
          <Accordion title="Return function results">
            The model returns a `function_call`. After you run the function, append both that item and your `function_call_output` to `input`, paired by `call_id`:

            ```json
            {
              "model": "kimi-k3",
              "stream": false,
              "tools": [
                {
                  "type": "function",
                  "name": "get_weather",
                  "description": "Get the current weather for a city",
                  "parameters": {
                    "type": "object",
                    "properties": {
                      "city": { "type": "string", "description": "City name" }
                    },
                    "required": ["city"],
                    "additionalProperties": false
                  }
                }
              ],
              "input": [
                { "role": "user", "content": "What's the weather like in Beijing right now?" },
                {
                  "type": "function_call",
                  "call_id": "call_6102a526bdda4ebf8e982aa3",
                  "name": "get_weather",
                  "arguments": "{\"city\":\"Beijing\"}"
                },
                {
                  "type": "function_call_output",
                  "call_id": "call_6102a526bdda4ebf8e982aa3",
                  "output": "{\"temp_c\":21,\"condition\":\"sunny\"}"
                }
              ]
            }
            ```
          </Accordion>
          <Accordion title="JSON output">
            Set `text.format` to constrain the answer to JSON:

            ```json
            { "text": { "format": { "type": "json_object" } } }
            ```

            Use `json_schema` to validate the answer against your own schema.

            ```json
            {
              "model": "kimi-k3",
              "stream": false,
              "input": "Give information about Tokyo",
              "text": {
                "format": {
                  "type": "json_schema",
                  "name": "city_info",
                  "strict": true,
                  "schema": {
                    "type": "object",
                    "properties": {
                      "city": { "type": "string" },
                      "country": { "type": "string" }
                    },
                    "required": ["city", "country"],
                    "additionalProperties": false
                  }
                }
              }
            }
            ```
          </Accordion>
          <Accordion title="Image input">
            Mix `input_image` and `input_text` parts in the same message. `image_url` can be a publicly reachable image URL or `data:image/{format};base64,{data}`:

            ```json
            {
              "model": "kimi-k3",
              "stream": false,
              "input": [
                {
                  "role": "user",
                  "content": [
                    { "type": "input_text", "text": "What's in this image?" },
                    { "type": "input_image", "image_url": "https://example.com/cat.png" }
                  ]
                }
              ]
            }
            ```
          </Accordion>
        </AccordionGroup>


        ## Error handling


        Check the response body, not only the HTTP status. Errors are returned
        either as `{"code": ..., "msg": "..."}` (for example 401 invalid API
        key, 402 insufficient credits, 429 rate limited; the HTTP status may
        still be 200) or as `{"error": {"type": "...", "message": "..."}}`.
      operationId: create-kimi-k3
      tags:
        - docs/en/Market/Chat  Models/Kimi
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              description: Request parameters.
              required:
                - model
                - input
              properties:
                model:
                  type: string
                  enum:
                    - kimi-k3
                  description: 'Target model name. Allowed value: `kimi-k3`.'
                  x-apidog-enum:
                    - value: kimi-k3
                      name: ''
                      description: ''
                input:
                  description: >-
                    Input can be a string or an array. Each array item is a
                    message, a function call, or a function result.
                  oneOf:
                    - type: string
                      title: Plain text
                      examples:
                        - Introduce Beijing in one sentence
                    - type: array
                      title: Input item array
                      minItems: 1
                      items:
                        oneOf:
                          - type: object
                            title: message
                            description: >-
                              A message object with role and content. `type` is
                              optional and defaults to `message`.
                            required:
                              - role
                              - content
                            properties:
                              type:
                                type: string
                                const: message
                                description: >-
                                  Message type. Optional; defaults to `message`
                                  if omitted.
                              role:
                                type: string
                                enum:
                                  - user
                                  - assistant
                                  - system
                                  - developer
                                description: >-
                                  Role of the message author. `system` and
                                  `developer` instructions take priority over
                                  `user`. `assistant` is a previous reply.
                                x-apidog-enum:
                                  - value: user
                                    name: ''
                                    description: ''
                                  - value: assistant
                                    name: ''
                                    description: ''
                                  - value: system
                                    name: ''
                                    description: ''
                                  - value: developer
                                    name: ''
                                    description: ''
                              content:
                                description: >-
                                  Message content. A string, or an array of text
                                  and image parts. Images are only allowed on
                                  `user` messages.
                                oneOf:
                                  - type: string
                                    title: Plain text
                                    examples:
                                      - Introduce Beijing in one sentence
                                  - type: array
                                    title: Text and image parts
                                    minItems: 1
                                    items:
                                      oneOf:
                                        - type: object
                                          title: input_text
                                          description: Text part.
                                          required:
                                            - type
                                            - text
                                          properties:
                                            type:
                                              type: string
                                              const: input_text
                                              description: Part type. Always `input_text`.
                                            text:
                                              type: string
                                              description: Text content.
                                              examples:
                                                - What's in this image?
                                          x-apidog-orders:
                                            - type
                                            - text
                                        - type: object
                                          title: input_image
                                          description: >-
                                            Image part. Only allowed on `user`
                                            messages. Common formats such as PNG and
                                            JPEG are supported.
                                          required:
                                            - type
                                            - image_url
                                          properties:
                                            type:
                                              type: string
                                              const: input_image
                                              description: Part type. Always `input_image`.
                                            image_url:
                                              type: string
                                              description: >-
                                                Image URL. A publicly reachable URL, or
                                                a `data:image/{format};base64,{data}`
                                                string. The link must be directly
                                                downloadable, otherwise the request
                                                returns 400.
                                              examples:
                                                - https://example.com/cat.png
                                          x-apidog-orders:
                                            - type
                                            - image_url
                            x-apidog-orders:
                              - type
                              - role
                              - content
                          - type: object
                            title: function_call
                            description: >-
                              A function call the model made in the previous
                              turn. Pair it with `function_call_output` by
                              `call_id`.
                            required:
                              - type
                              - call_id
                              - name
                              - arguments
                            properties:
                              type:
                                type: string
                                const: function_call
                                description: Type. Always `function_call`.
                              call_id:
                                type: string
                                description: >-
                                  Call ID. Send back the `call_id` from the
                                  previous output as-is.
                                examples:
                                  - call_6102a526bdda4ebf8e982aa3
                              name:
                                type: string
                                description: Name of the function the model called.
                                examples:
                                  - get_weather
                              arguments:
                                type: string
                                description: Function arguments as a JSON string.
                                examples:
                                  - '{"city":"Beijing"}'
                            x-apidog-orders:
                              - type
                              - call_id
                              - name
                              - arguments
                          - type: object
                            title: function_call_output
                            description: Function result to send back to the model.
                            required:
                              - type
                              - call_id
                              - output
                            properties:
                              type:
                                type: string
                                const: function_call_output
                                description: Type. Always `function_call_output`.
                              call_id:
                                type: string
                                description: >-
                                  Call ID. Must match the corresponding
                                  `function_call`.
                                examples:
                                  - call_6102a526bdda4ebf8e982aa3
                              output:
                                type: string
                                description: >-
                                  Function result as text. Serialize structured
                                  results to a JSON string first.
                                examples:
                                  - '{"temp_c":21,"condition":"sunny"}'
                            x-apidog-orders:
                              - type
                              - call_id
                              - output
                instructions:
                  type: string
                  description: >-
                    System instructions for the model, inserted as a system
                    message before `input`.
                  examples:
                    - Answer in Chinese only
                stream:
                  type: boolean
                  default: true
                  description: >-
                    When true, the response is streamed as server-sent events.
                    When false, the full response is returned after completion.
                    Defaults to true.
                reasoning:
                  type: object
                  description: Reasoning settings. Reasoning is on by default.
                  properties:
                    effort:
                      type: string
                      enum:
                        - low
                        - medium
                        - high
                      description: >-
                        Reasoning effort. Higher values reason more thoroughly
                        and may add latency. Allowed: `low`, `medium`, `high`.
                        If omitted, the model chooses.
                      x-apidog-enum:
                        - value: low
                          name: ''
                          description: ''
                        - value: medium
                          name: ''
                          description: ''
                        - value: high
                          name: ''
                          description: ''
                  x-apidog-orders:
                    - effort
                tools:
                  type: array
                  items:
                    type: object
                    title: function
                    description: >-
                      A function the model can call. After the model requests a
                      call, you run it and send the result back as
                      `function_call_output`.
                    required:
                      - type
                      - name
                      - parameters
                    properties:
                      type:
                        type: string
                        const: function
                        description: Tool type. Always `function`.
                      name:
                        type: string
                        description: Function name. Returned as-is when the model calls it.
                        examples:
                          - get_weather
                      description:
                        type: string
                        description: >-
                          What the function does. Helps the model decide when to
                          call it.
                        examples:
                          - Get the current weather for a city
                      parameters:
                        type: object
                        description: Function parameter definition as a JSON Schema object.
                        additionalProperties: true
                        examples:
                          - type: object
                            properties:
                              city:
                                type: string
                                description: City name
                            required:
                              - city
                            additionalProperties: false
                        x-apidog-orders: []
                        properties: {}
                      strict:
                        type: boolean
                        description: >-
                          Whether to generate arguments strictly from
                          `parameters`.
                    x-apidog-orders:
                      - type
                      - name
                      - description
                      - parameters
                      - strict
                  description: >-
                    Optional list of tools the model can call. Only `function`
                    is supported. Built-in tools such as `web_search` are
                    ignored.
                tool_choice:
                  description: >-
                    Tool choice. When `tools` is set, use `auto` to let the
                    model decide, or pass an object to pin a function. Do not
                    send this field if `tools` is not set.
                  oneOf:
                    - type: string
                      enum:
                        - auto
                      title: Auto
                      description: >-
                        Preset strategy. `auto` lets the model decide whether to
                        call a function.
                      x-apidog-enum:
                        - value: auto
                          name: ''
                          description: ''
                    - type: object
                      title: Force a specific function
                      description: Pin a specific function.
                      required:
                        - type
                        - name
                      properties:
                        type:
                          type: string
                          const: function
                          description: Tool type. Always `function`.
                        name:
                          type: string
                          description: >-
                            Function name. Returned as-is when the model calls
                            it.
                          examples:
                            - get_weather
                      x-apidog-orders:
                        - type
                        - name
                text:
                  type: object
                  description: Output format settings.
                  properties:
                    format:
                      title: text.format
                      description: Format the answer should follow. Plain text if omitted.
                      oneOf:
                        - type: object
                          title: text
                          description: Plain text output.
                          required:
                            - type
                          properties:
                            type:
                              type: string
                              const: text
                              description: Format type. Always `text`.
                          x-apidog-orders:
                            - type
                        - type: object
                          title: json_object
                          description: >-
                            JSON mode. The model outputs a valid JSON object.
                            Describe the expected structure in the prompt.
                          required:
                            - type
                          properties:
                            type:
                              type: string
                              const: json_object
                              description: Format type. Always `json_object`.
                          x-apidog-orders:
                            - type
                        - type: object
                          title: json_schema
                          description: >-
                            Structured output. The model emits JSON that follows
                            your schema.
                          required:
                            - type
                            - name
                            - schema
                          properties:
                            type:
                              type: string
                              const: json_schema
                              description: Format type. Always `json_schema`.
                            name:
                              type: string
                              description: >-
                                Schema name. Required when `type` is
                                `json_schema`.
                              examples:
                                - city_info
                            strict:
                              type: boolean
                              default: false
                              description: >-
                                Whether to validate the answer strictly against
                                the schema. Only applies to `json_schema`. When
                                `true`, set `additionalProperties: false` and
                                list every field in `required`.
                            schema:
                              type: object
                              additionalProperties: true
                              description: >-
                                JSON Schema the answer must follow. Required
                                when `type` is `json_schema`.
                              examples:
                                - type: object
                                  properties:
                                    city:
                                      type: string
                                    country:
                                      type: string
                                  required:
                                    - city
                                    - country
                                  additionalProperties: false
                              x-apidog-orders: []
                          x-apidog-orders:
                            - type
                            - name
                            - strict
                            - schema
                  x-apidog-orders:
                    - format
              x-apidog-orders:
                - model
                - input
                - instructions
                - stream
                - reasoning
                - tools
                - tool_choice
                - text
            example:
              model: kimi-k3
              stream: true
              input: Introduce Beijing in one sentence
      responses:
        '200':
          description: >-
            Success. `stream=true` (default) returns `text/event-stream`;
            `stream=false` returns `application/json`. Pre-check failures also
            return HTTP 200 — use `code` to tell them apart.
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    required:
                      - id
                      - object
                      - status
                      - output
                    description: >-
                      Final response object. Returned directly when
                      `stream=false`; carried on the `response.completed` event
                      when streaming.
                    properties:
                      id:
                        type: string
                        description: Response ID.
                        examples:
                          - resp_f678153e-2a41-4aac-aab8-62ccdd4afded
                      object:
                        type: string
                        const: response
                        description: Object type. Always `response`.
                      created_at:
                        type: integer
                        description: Creation time as a Unix timestamp in seconds.
                      status:
                        type: string
                        enum:
                          - completed
                          - incomplete
                          - in_progress
                        description: >-
                          Response status. `completed` on success. `in_progress`
                          only appears on the `response.created` event.
                        x-apidog-enum:
                          - value: completed
                            name: ''
                            description: ''
                          - value: incomplete
                            name: ''
                            description: ''
                          - value: in_progress
                            name: ''
                            description: ''
                      model:
                        type: string
                        description: Identifier of the model that served the request.
                        examples:
                          - moonshotai/kimi-k3
                      output:
                        type: array
                        description: >-
                          Output items in order. Usually a reasoning summary,
                          then a reply and/or function calls.
                        items:
                          oneOf:
                            - type: object
                              title: reasoning
                              description: >-
                                Reasoning summary for this turn. For display
                                only; do not send it back as input.
                              properties:
                                type:
                                  type: string
                                  const: reasoning
                                  description: Type. Always `reasoning`.
                                id:
                                  type: string
                                  description: Reasoning item ID.
                                  examples:
                                    - rs_077b313a7b7a4534bec46b17673bfe77
                                status:
                                  type: string
                                  enum:
                                    - in_progress
                                    - completed
                                  description: Item status.
                                  x-apidog-enum:
                                    - value: in_progress
                                      name: ''
                                      description: ''
                                    - value: completed
                                      name: ''
                                      description: ''
                                summary:
                                  type: array
                                  description: List of reasoning summary parts.
                                  items:
                                    type: object
                                    properties:
                                      type:
                                        type: string
                                        const: summary_text
                                        description: Type. Always `summary_text`.
                                      text:
                                        type: string
                                        description: Reasoning summary text.
                                    x-apidog-orders:
                                      - type
                                      - text
                              x-apidog-orders:
                                - type
                                - id
                                - status
                                - summary
                            - type: object
                              title: message
                              description: The model's reply.
                              properties:
                                type:
                                  type: string
                                  const: message
                                  description: Type. Always `message`.
                                id:
                                  type: string
                                  description: Message item ID.
                                  examples:
                                    - msg_5f4d42bdc63e4b659386b7a016e0d4d4
                                status:
                                  type: string
                                  enum:
                                    - in_progress
                                    - completed
                                  description: Item status.
                                  x-apidog-enum:
                                    - value: in_progress
                                      name: ''
                                      description: ''
                                    - value: completed
                                      name: ''
                                      description: ''
                                role:
                                  type: string
                                  const: assistant
                                  description: Role. Always `assistant`.
                                content:
                                  type: array
                                  items:
                                    type: object
                                    description: Reply text part.
                                    properties:
                                      type:
                                        type: string
                                        const: output_text
                                        description: Type. Always `output_text`.
                                      text:
                                        type: string
                                        description: >-
                                          Generated text. If JSON output is
                                          enabled, this is a JSON string.
                                      annotations:
                                        type: array
                                        items:
                                          type: object
                                          x-apidog-orders: []
                                        description: >-
                                          Citations. Always an empty array for
                                          this model.
                                    x-apidog-orders:
                                      - type
                                      - text
                                      - annotations
                                  description: List of reply content parts.
                              x-apidog-orders:
                                - type
                                - id
                                - status
                                - role
                                - content
                            - type: object
                              title: function_call
                              description: >-
                                A function the model wants to call. After you
                                run it, send back a `function_call_output` with
                                the same `call_id`.
                              properties:
                                type:
                                  type: string
                                  const: function_call
                                  description: Type. Always `function_call`.
                                id:
                                  type: string
                                  description: Function-call item ID.
                                  examples:
                                    - fc_ce486f4cebab4ae2b4b8d200ce34086a
                                status:
                                  type: string
                                  enum:
                                    - in_progress
                                    - completed
                                  description: Item status.
                                  x-apidog-enum:
                                    - value: in_progress
                                      name: ''
                                      description: ''
                                    - value: completed
                                      name: ''
                                      description: ''
                                name:
                                  type: string
                                  description: Function name.
                                  examples:
                                    - get_weather
                                arguments:
                                  type: string
                                  description: Call arguments as a JSON string.
                                  examples:
                                    - '{"city": "Shanghai"}'
                                call_id:
                                  type: string
                                  description: >-
                                    Call ID. Use this when sending a
                                    `function_call_output`.
                                  examples:
                                    - call_6102a526bdda4ebf8e982aa3
                              x-apidog-orders:
                                - type
                                - id
                                - status
                                - name
                                - arguments
                                - call_id
                      usage:
                        anyOf:
                          - type: object
                            description: Token usage for this request.
                            properties:
                              input_tokens:
                                type: integer
                                description: >-
                                  Input token count, including the prompt,
                                  instructions, history, images, and function
                                  definitions.
                              output_tokens:
                                type: integer
                                description: >-
                                  Output token count, including tokens used for
                                  reasoning.
                              total_tokens:
                                type: integer
                                description: >-
                                  Total tokens, equal to `input_tokens +
                                  output_tokens`.
                              output_tokens_details:
                                type: object
                                description: Output token breakdown.
                                properties:
                                  reasoning_tokens:
                                    type: integer
                                    description: Tokens used for reasoning.
                                x-apidog-orders:
                                  - reasoning_tokens
                              input_tokens_details:
                                type: object
                                description: >-
                                  Input token breakdown. Returned when a cache
                                  hit occurs.
                                properties:
                                  cached_tokens:
                                    type: integer
                                    description: Number of cached input tokens.
                                x-apidog-orders:
                                  - cached_tokens
                            x-apidog-orders:
                              - input_tokens
                              - output_tokens
                              - total_tokens
                              - output_tokens_details
                              - input_tokens_details
                          - type: 'null'
                        description: Token usage. `null` on the `response.created` event.
                      credits_consumed:
                        type: number
                        description: >-
                          Non-streaming: credits_consumed is a top-level field.
                          Streaming: it is on the response.completed event, next
                          to type.
                    x-apidog-orders:
                      - id
                      - object
                      - created_at
                      - status
                      - model
                      - output
                      - usage
                      - credits_consumed
                    title: Success response
                  - type: object
                    required:
                      - code
                      - msg
                    description: >-
                      Pre-check failed (auth, balance, rate limit, or parameter
                      format). HTTP status is still 200 — use `code` to tell.
                    properties:
                      code:
                        type: integer
                        description: >-
                          Business error code: `401` missing or invalid API key;
                          `402` insufficient balance; `429` too many requests;
                          `400` / `422` invalid parameters; `500` internal
                          error.
                        examples:
                          - 402
                      msg:
                        type: string
                        description: Error message.
                        examples:
                          - >-
                            Credits insufficient : Your current balance isn’t
                            enough to run this request. Please top up to
                            continue.
                      data:
                        type: 'null'
                        description: Always `null` on failure.
                    x-apidog-orders:
                      - code
                      - msg
                      - data
                    title: Pre-check failed
                description: >-
                  A full response on success. Pre-check failures (parameters,
                  auth, and similar) also return HTTP 200 — use `code` to tell
                  them apart.
              examples:
                '1':
                  summary: Text reply (stream=false)
                  value:
                    id: resp_551f7700-da28-4b8d-b831-9a675b85e73a
                    object: response
                    created_at: 1790128550
                    status: completed
                    model: moonshotai/kimi-k3
                    output:
                      - type: reasoning
                        id: rs_b1beab9c6ba54a7598441ed82d771f89
                        status: completed
                        summary:
                          - type: summary_text
                            text: >-
                              The user wants a one-sentence introduction to
                              Beijing…
                      - type: message
                        id: msg_347976f56b104ab291ebcc068164502c
                        status: completed
                        role: assistant
                        content:
                          - type: output_text
                            annotations: []
                            text: >-
                              Beijing is China's capital, a historic city with
                              more than three thousand years of urban history,
                              home to landmarks such as the Forbidden City and
                              the Great Wall, and a modern international
                              metropolis.
                    usage:
                      input_tokens: 92
                      output_tokens: 341
                      total_tokens: 433
                      output_tokens_details:
                        reasoning_tokens: 291
                    credits_consumed: 1.08
                '2':
                  summary: Function call (stream=false)
                  value:
                    id: resp_4b5fff52-b406-4b34-9ca5-144960efa291
                    object: response
                    created_at: 1790142133
                    status: completed
                    model: moonshotai/kimi-k3
                    output:
                      - type: reasoning
                        id: rs_f7190261f68f4640bda70ff51778d3a1
                        status: completed
                        summary:
                          - type: summary_text
                            text: >-
                              The user asked about the weather in Shanghai, so
                              call get_weather.
                      - type: function_call
                        id: fc_ce486f4cebab4ae2b4b8d200ce34086a
                        status: completed
                        name: get_weather
                        arguments: '{"city": "Shanghai"}'
                        call_id: call_6102a526bdda4ebf8e982aa3
                    usage:
                      input_tokens: 174
                      output_tokens: 61
                      total_tokens: 235
                      output_tokens_details:
                        reasoning_tokens: 11
                    credits_consumed: 0.29
                '3':
                  summary: 'Pre-check failed: insufficient credits'
                  value:
                    code: 402
                    msg: >-
                      Credits insufficient : Your current balance isn’t enough
                      to run this request. Please top up to continue.
                    data: null
                '4':
                  summary: 'Pre-check failed: invalid API key'
                  value:
                    code: 401
                    msg: The api key does not exist.
                    data: null
                '5':
                  summary: 'Pre-check failed: too many requests'
                  value:
                    code: 429
                    msg: Your call frequency is too high. Please try again later.
                    data: null
                '6':
                  summary: Cannot download image
                  value:
                    error:
                      type: server_error
                      message: Cannot download image [image-url] ...
                      param: null
                      code: null
                '7':
                  summary: Generation failed
                  value:
                    error:
                      type: server_error
                      message: Server exception, please try again later
                      param: null
                      code: null
                '8':
                  summary: Service under maintenance
                  value:
                    error:
                      type: server_error
                      message: >-
                        The server is currently being maintained, please try
                        again later~
                      param: null
                      code: null
          headers: {}
          x-apidog-name: ''
        '400':
          description: >-
            The model rejected the request, for example because an image URL
            could not be downloaded.
          content:
            application/json:
              schema:
                type: object
                description: >-
                  Returned when generation fails before any content is produced.
                  HTTP status is non-2xx.
                properties:
                  error:
                    type: object
                    description: Error details.
                    properties:
                      type:
                        type: string
                        description: Error type.
                        examples:
                          - server_error
                      message:
                        type: string
                        description: Error message.
                      param:
                        type: string
                        description: The parameter that failed. Usually `null`.
                        nullable: true
                      code:
                        type: string
                        description: Error code. Usually `null`.
                        nullable: true
                    x-apidog-orders:
                      - type
                      - message
                      - param
                      - code
                x-apidog-orders:
                  - error
          headers: {}
          x-apidog-name: ''
        '429':
          description: Service is at capacity. Try again later.
          content:
            application/json:
              schema:
                type: object
                description: >-
                  Returned when generation fails before any content is produced.
                  HTTP status is non-2xx.
                properties:
                  error:
                    type: object
                    description: Error details.
                    properties:
                      type:
                        type: string
                        description: Error type.
                        examples:
                          - server_error
                      message:
                        type: string
                        description: Error message.
                      param:
                        type: string
                        description: The parameter that failed. Usually `null`.
                        nullable: true
                      code:
                        type: string
                        description: Error code. Usually `null`.
                        nullable: true
                    x-apidog-orders:
                      - type
                      - message
                      - param
                      - code
                x-apidog-orders:
                  - error
          headers: {}
          x-apidog-name: ''
        '500':
          description: Generation failed.
          content:
            application/json:
              schema:
                type: object
                description: >-
                  Returned when generation fails before any content is produced.
                  HTTP status is non-2xx.
                properties:
                  error:
                    type: object
                    description: Error details.
                    properties:
                      type:
                        type: string
                        description: Error type.
                        examples:
                          - server_error
                      message:
                        type: string
                        description: Error message.
                      param:
                        type: string
                        description: The parameter that failed. Usually `null`.
                        nullable: true
                      code:
                        type: string
                        description: Error code. Usually `null`.
                        nullable: true
                    x-apidog-orders:
                      - type
                      - message
                      - param
                      - code
                x-apidog-orders:
                  - error
          headers: {}
          x-apidog-name: ''
        '502':
          description: Service is temporarily unavailable. Try again later.
          content:
            application/json:
              schema:
                type: object
                description: >-
                  Returned when generation fails before any content is produced.
                  HTTP status is non-2xx.
                properties:
                  error:
                    type: object
                    description: Error details.
                    properties:
                      type:
                        type: string
                        description: Error type.
                        examples:
                          - server_error
                      message:
                        type: string
                        description: Error message.
                      param:
                        type: string
                        description: The parameter that failed. Usually `null`.
                        nullable: true
                      code:
                        type: string
                        description: Error code. Usually `null`.
                        nullable: true
                    x-apidog-orders:
                      - type
                      - message
                      - param
                      - code
                x-apidog-orders:
                  - error
          headers: {}
          x-apidog-name: ''
      security:
        - BearerAuth: []
          x-apidog:
            schemeGroups:
              - id: kn8M4YUlc5i0A0179ezwx
                schemeIds:
                  - BearerAuth
            required: true
            use:
              id: kn8M4YUlc5i0A0179ezwx
            scopes:
              kn8M4YUlc5i0A0179ezwx:
                BearerAuth: []
      x-apidog-folder: docs/en/Market/Chat  Models/Kimi
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/1184766/apis/api-44088373-run
components:
  schemas: {}
  securitySchemes:
    BearerAuth:
      type: bearer
      scheme: bearer
      bearerFormat: API Key
      description: >-
        All API requests require a Bearer Token. Add the header `Authorization:
        Bearer YOUR_API_KEY` to authenticate requests.
    BearerAuth1:
      type: bearer
      scheme: bearer
      bearerFormat: API Key
      description: >-
        所有 API 请求都需要 Bearer Token。请在请求头中添加 `Authorization: Bearer YOUR_API_KEY`
        进行身份验证。
servers:
  - url: https://api.kie.ai
    description: 正式环境
security:
  - BearerAuth: []
    x-apidog:
      schemeGroups:
        - id: kn8M4YUlc5i0A0179ezwx
          schemeIds:
            - BearerAuth
      required: true
      use:
        id: kn8M4YUlc5i0A0179ezwx
      scopes:
        kn8M4YUlc5i0A0179ezwx:
          BearerAuth: []

```
