Skip to main content
POST
Kimi K3 is Moonshot AI’s multimodal flagship model with a 1M-token context window, for long-horizon coding, deep reasoning, knowledge work, and tool-using agents. The playground on this page uses Chat Completions.

Models

  • kimi-k3 — Kimi K3. 2.8T parameters, 1M-token context. Chat Completions only.

Examples

  • Basic chat completion — single user message.
  • System prompt — system message with max_tokens.
  • Streaming output — stream: true, returned as SSE.

Notes

  • kimi-k3 only accepts /v1/chat/completions.
  • See LLM Models for every model and the formats it supports.

Authorizations

Authorization
string
header
required

All API endpoints require Bearer Token authentication.

Get your API Key:

Visit the API Key Management Page to get your API Key

Add it to the request header:

Body

application/json
model
enum<string>
default:kimi-k3
required

Moonshot AI Kimi model id.

Available options:
kimi-k3
messages
object[]
required

List of conversation messages. Each message contains a role and content. Use system to define model behavior, user for user input, and assistant for previous model responses in multi-turn conversations.

temperature
number

Controls output randomness, range 0-2. Lower values such as 0.2 make output more deterministic. Higher values such as 1.8 make output more random. Default: 1.0.

Required range: 0 <= x <= 2
Example:

1

max_tokens
integer

Maximum number of tokens to generate. Different models have different maximum limits.

Required range: x >= 1
Example:

256

stream
boolean

Whether to use streaming output. true returns a streaming response in SSE format. false returns the complete response at once. Default: false.

Example:

false

top_p
number

Nucleus sampling parameter, range 0-1. Controls diversity of generated text. We recommend using either top_p or temperature, not both. Default: 1.0.

Required range: 0 <= x <= 1
Example:

1

frequency_penalty
number

Frequency penalty, range -2.0 to 2.0. Positive values reduce the likelihood of repeating the same words. Default: 0.

Required range: -2 <= x <= 2
Example:

0

presence_penalty
number

Presence penalty, range -2.0 to 2.0. Positive values increase the likelihood of talking about new topics. Default: 0.

Required range: -2 <= x <= 2
Example:

0

stop

Stop sequences. Up to 4 sequences where generation will stop when encountered.

Example:

"\n\nHuman:"

n
integer

Number of completions to generate. Default: 1. Must be a plain number such as 1; do not use quotes.

Required range: x >= 1
Example:

1

Response

Completion created

id
string

Unique identifier for the response.

Example:

"chatcmpl-9876543210"

object
string

Object type.

Example:

"chat.completion"

created
integer

Creation timestamp.

Example:

1677652288

model
string

The actual model name used.

Example:

"kimi-k3"

choices
object[]
usage
object