Skip to main content

Service Address

The base_url differs by compatible protocol; see “Protocol Compatibility” below.

Protocol Compatibility

The Kimi API is compatible with three API formats, so you can reuse the corresponding official SDKs and tools: If your project already uses the official OpenAI or Anthropic APIs, simply replace base_url and the API Key with your Kimi configuration to migrate — no other code changes are needed.
When using the OpenAI-compatible endpoints, some parameters are Kimi-specific extensions: the thinking parameter needs to be passed via the SDK’s extra_body; partial is a field on assistant messages within the messages array ("partial": true), not a top-level request parameter. See Tool Use and Partial Mode for details.

Authentication

All API requests require an API Key in the HTTP header:
API Keys can be created and managed in the Kimi Open Platform Console.
Your API Key is sensitive. Do not expose it in client-side code, public repositories, or logs. Use environment variables to manage it.
When using an official SDK, pass your API Key and the protocol-specific base_url at initialization. OpenAI-compatible endpoints:
Anthropic-compatible endpoints:

Error Handling

Failed requests return a JSON error response with error.type and error.message fields. For the full list of error types, messages, and troubleshooting tips, see Errors.

API Endpoints

Next Steps

Quickstart

Send your first API request

Responses API

OpenAI Responses-compatible endpoint

Messages API

Anthropic Messages-compatible endpoint

List Models

See the currently available models