Kimi Code vs Kimi API: base URLs and 401 or 404 errors

Compare Kimi Code and Open Platform keys and regional base URLs, then troubleshoot authentication, endpoint paths and model access.

Kimi Code or Open Platform? Choose your base URL ↓ · Getting a Kimi API 401 or 404? Follow the ordered checks ↓ · 429 after top-up? Check the error type ↓

Access and billing conditions

Kimi API access is separate from the consumer app. On the China site, K3.1 Pro unlocks after a top-up of at least ¥10; the new-user ¥15 voucher does not apply. On the international site, a successful top-up of at least $1 unlocks it. Usage is metered on both; rate limits depend on cumulative top-ups. The two platforms have separate accounts, keys and balances.

Need a free OpenAI-compatible endpoint instead? ChinaGenAI's site route uses the model label free and chooses its upstream automatically; it does not promise Kimi. See the site's connection settings and limits.

Kimi Code vs Kimi API: choose the right base URL

Kimi Code membership and the Kimi Open Platform API are separate products. Use a key issued for the product and region you are connecting; Kimi Code keys and Open Platform keys are not interchangeable. Kimi Code is intended for coding tools and uses membership limits; Open Platform is metered separately.

On narrow screens, scroll the table sideways to see both regions.

Product and client formatChina base URLInternational base URL
Kimi Code · OpenAI compatiblehttps://api.kimi.com/coding/v1https://api.kimi.ai/coding/v1
Kimi Code · Anthropic compatiblehttps://api.kimi.com/coding/https://api.kimi.ai/coding/
Kimi Open Platform · OpenAI compatiblehttps://api.moonshot.cn/v1https://api.moonshot.ai/v1

Choose the format your client actually uses. For example, Kimi documents https://api.kimi.com/coding/v1/messages as the complete China-region Anthropic Messages endpoint. An Anthropic SDK may append /v1/messages to its base; entering a base that already ends in /v1 can create a duplicate path. Check the actual request URL and your client's instructions, because URL joining varies by client.

A 401 Invalid Authentication can mean the key belongs to the wrong product, or that credentials are expired, overridden or malformed. A 404 can also reflect a wrong path, model ID or access permission. Check the full error and selected route before changing settings. Kimi Code model IDs and membership eligibility differ from Open Platform IDs; a listed model does not establish access for your account.

Kimi Code endpoints and platform comparison · Kimi Code 401 and 404 reference · Historical duplicate-path report

Official documentation checked 30 October 2026. No account, provider key or model request was used to test these routes. ChinaGenAI's separate free route does not guarantee Kimi.

Set the connection in your app

Use the current K3.1 Pro OpenAI-compatible Chat Completions request. Thinking is always enabled; reasoning_effort accepts low, high or max, and max_completion_tokens defaults to 131,072 (maximum 1,048,576). This site's generic request builder emits max_tokens, so its output is not a K3.1 Pro request recipe.

API base URL
https://api.moonshot.cn/v1

Match the endpoint to where your API key was created: platform.kimi.com (China) uses https://api.moonshot.cn/v1; platform.kimi.ai (international) uses https://api.moonshot.ai/v1. The platform keys and balances are separate. These are API endpoints, not consumer chat URLs.

Model ID
kimi-k3.1-pro

The current exact model ID is kimi-k3.1-pro. Kimi K3 and the K2 family are separate IDs with different access and retirement conditions.

API key
Your own Kimi provider key

Kimi API 401 or 404? Check the route in order

Kimi API Open Platform keys are separate from Kimi Code keys and Kimi Membership benefits. Use an Open Platform API key for the Open Platform endpoint.

  1. Confirm which product issued the key. A Kimi Code key or membership subscription does not provide API Open Platform access or balance.
  2. Match the platform and base URL. A China-site key from platform.kimi.com goes with https://api.moonshot.cn/v1. An international key from platform.kimi.ai goes with https://api.moonshot.ai/v1.
  3. Check account access. If the product and host match, verify available API balance and whether the account or voucher unlocks K3.1 Pro.
  4. Check model availability. Use the same key and regional host with Kimi's GET /v1/models endpoint. Confirm that the exact model ID kimi-k3.1-pro appears for the account.
  5. Check the client configuration. If a direct API request works but an app does not, inspect the effective model ID, base URL, environment variables and proxy settings. A saved host or key can override the values shown in the visible form.

401 invalid_authentication_error points first to the key product or platform mismatch. 404 model_not_found can indicate an incorrect model ID or base URL; Kimi notes that an OpenAI SDK without a Kimi base_url may send the request to OpenAI instead.

Kimi API 429 after top-up? Read the error type

  • engine_overloaded_error: the service is under load. Respect Retry-After and retry with backoff; adding funds does not resolve provider capacity.
  • rate_limit_reached_error: check the organization's concurrency, RPM, TPM or daily request limit. Reduce frequency or concurrency, or check the account tier.
  • exceeded_current_quota_error: check available balance, overdue billing or an expired voucher.

The OpenAI SDK may retry 429 and server errors automatically. Review the actual request count before treating one client operation as one provider request.

Inspect an existing Kimi response

The inspector runs locally with no account or model call. Use the official Kimi quickstart to make a provider request in your own client first.

Before you use the result

  • Before diagnosing 401 Invalid Authentication, confirm both the API product that issued the key and the platform-specific base URL.
  • Use the current model ID and check top-up eligibility before creating a request.
  • Set reasoning_effort and max_completion_tokens according to the current Kimi reference; do not copy the site's generic max_tokens example unchanged.
  • Kimi lists moonshot-v1 as retired. Its model list suggests kimi-k3.1-pro, but does not promise drop-in compatibility.

Official setup and billing

Connection and access notes checked . This is independent guidance, not an affiliation with Kimi, a provider key or a live model benchmark.