Skip to main content
Watch: I Built an AI App Without Leaving Databricks

API compatibility - 0 documented limits

Moonshot AI (Kimi) API compatibility

Moonshot AI documents an OpenAI-compatible API at https://api.moonshot.ai/v1 (chat/completions, responses, models, files and batches). Its Anthropic-compatible base URL, the value for ANTHROPIC_BASE_URL, is https://api.moonshot.ai/anthropic. The docs read list no specific limitations for either layer.

Verified against Moonshot AI's own documentation. Not documented means the docs read that day do not say; it never means No.

Compare every provider in the API compatibility matrix.

OpenAI-compatible API

Supported
Base URL
https://api.moonshot.ai/v1
Endpoints
  • chat/completions
  • responses
  • models
  • files
  • batches
Auth
Authorization: Bearer $MOONSHOT_API_KEY
Notes
Docs live at platform.kimi.ai; API host is api.moonshot.ai. Kimi-specific extensions: thinking must go through the SDK's extra_body; partial is a field on assistant messages, not a top-level parameter. Also exposes non-OpenAI endpoints (tokenizers/estimate-token-count, users/me/balance).

From the docs

OpenAI Chat Completions | https://api.moonshot.ai/v1 | [/chat/completions](/docs/api/chat) | Official OpenAI SDKs (Python / Node.js) ... OpenAI Responses | https://api.moonshot.ai/v1 | [/responses](/docs/api/responses)
platform.kimi.ai/docs/api/overview.md

Anthropic-compatible API

Supported
ANTHROPIC_BASE_URL
https://api.moonshot.ai/anthropic
Auth
ANTHROPIC_AUTH_TOKEN (Claude Code guide); the Messages API reference says the Authorization header expects a Bearer token
Notes
Endpoint is POST /anthropic/v1/messages. Claude Code guide maps tiers to kimi-k3[1m] and kimi-k2.7-code; kimi-k2.7-code rejects requests with thinking off (400).

From the docs

"ANTHROPIC_BASE_URL": "https://api.moonshot.ai/anthropic", "ANTHROPIC_AUTH_TOKEN": "YOUR_MOONSHOT_API_KEY",
platform.kimi.ai/docs/guide/claude-code-kimi.md

Documented limitations

Parameters, content types and features Moonshot AI (Kimi)'s docs say its compatibility layers ignore, reject or change, each with the line it comes from. A layer with nothing listed may still differ in ways the docs do not spell out.

OpenAI-compatible layer0

No limitations listed in the docs read.

Anthropic-compatible layer0

No limitations listed in the docs read.

Example from Moonshot AI (Kimi)'s docs

Copied verbatim from the provider's documentation, placeholders included.

Provider example
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["MOONSHOT_API_KEY"],
    base_url="https://api.moonshot.ai/v1",
)

More on Moonshot AI (Kimi)

Newsletter

Know when a provider changes its API

One email per week. New models, new endpoints and the compatibility changes that break a base URL, and what they mean for your stack.