Service Address
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:base_url at initialization.
OpenAI-compatible endpoints:
Error Handling
Failed requests return a JSON error response witherror.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