Official global API
Moonshot AI
Endpoint
https://api.moonshot.ai/v1
Key source
Kimi global platform console
OpenAI-compatible API; K3 materials also document an Anthropic-compatible route.
Global API docs ↗Last checked: July 28, 2026
Kimi API guide
Choose an official platform or provider route, create the right API key and verify the K3 request contract before connecting a coding or production workflow.
Current model ID
kimi-k3
Direct API base
api.moonshot.ai/v1
Primary protocol
OpenAI-compatible
Evidence
Official Kimi platform · checked July 28, 2026
Setup sequence
01
Use the global or China platform that matches your account, billing currency and deployment requirements.
02
Create the key in that platform's console. Store it in a secret manager or environment variable, never in client-side code.
03
Use `kimi-k3` for direct API and compatible integrations unless the official integration guide specifies an alias.
04
Test streaming, tool calls, reasoning fields, usage reporting and error handling before migrating a production workflow.
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["MOONSHOT_API_KEY"],
base_url="https://api.moonshot.ai/v1",
)
response = client.chat.completions.create(
model="kimi-k3",
messages=[{"role": "user", "content": "Explain this repository."}],
reasoning_effort="low",
)Example uses a placeholder environment variable. Never commit a real API key.
Official vs third-party access
Official global API
Moonshot AI
Endpoint
https://api.moonshot.ai/v1
Key source
Kimi global platform console
OpenAI-compatible API; K3 materials also document an Anthropic-compatible route.
Global API docs ↗Last checked: July 28, 2026
Official China API
Moonshot AI China platform
Endpoint
https://api.moonshot.cn/v1
Key source
Kimi China platform console
Keep the China account, endpoint and CNY billing route distinct from the global platform.
China API docs ↗Last checked: July 28, 2026
Third-party provider example
Fireworks AI or another selected provider
Endpoint
Provider-specific; Fireworks publishes its own K3 model path
Key source
Provider console
The provider issues the credential and service terms. A provider route is not a Moonshot official API route, even when it serves K3 weights.
Provider declaration ↗Last checked: July 28, 2026
K3 integration notes
Verify request fields, tools, streaming, limits and provider behavior in the exact route you will deploy.
Coding integration boundary
The API product, coding client and credential source are separate choices. Verify all three before assuming a setup is supported.
Use the platform key, the matching regional base URL and `kimi-k3`. This is the clearest baseline for testing the model contract.
Kimi publishes an Anthropic-compatible Claude Code path. Follow the current Kimi tutorial because its base URL, key product and model alias can differ from a direct OpenAI-compatible call.
OpenCode supports custom OpenAI-compatible providers, but a current Kimi K3-specific support contract is not verified here. Test the direct API first, then validate tools, streaming and reasoning fields in OpenCode.
API route
The provider operates inference, rate limits and service delivery. Review platform terms, region, retention and spend controls.
Self-hosted route
Your team takes on runtime, capacity, updates and security. Review the K3 license and serving requirements before planning deployment.
API Radar bridge URL pending confirmation.