AI coding tools · BYOK ·

Cursor Kimi K3 404 with your own key: fix the model ID

You added your Moonshot key to Cursor, turned on "Override OpenAI Base URL", picked Kimi K3, and every message fails straight away:

Provider Error — "We're having trouble finding the resource you requested."
providerStatusCode: 404, isRetryable: false

If you want the next step, read Claude Code or Codex limit hit? Use an API key instead.

Moonshot's logs show nothing because, per Cursor staff, the request never gets there. This guide shows why, and the model-ID change that gets your key working.

Quick fix

  • Don't use a model ID that matches a Cursor built-in. As of October 2026, per Cursor staff, kimi-k3, kimi-k3-low, kimi-k3-high, kimi-k3-max and kimi-k2.7-code currently ignore your base URL.
  • Add a custom model whose ID doesn't collide, using the exact ID Moonshot's /v1/models returns for your key (for example a provider-specific ID like kimi-k3.1-pro), or a prefixed alias on your gateway.
  • Or turn off "OpenAI API Key" in Cursor Settings > Models and use Cursor's hosted Kimi K3 on your plan's limits instead.

Why it happens

In forum thread #175557 (21 Oct 2026), a user with Override OpenAI Base URL set to Moonshot got the 404 above on the built-in "Kimi K3" and "K2.7 Code", while "K2.7 Code Highspeed" worked with the same key. Cursor staff replied that the built-in Kimi K3 and K2.7 Code entries "are models hosted by Cursor, so Override OpenAI Base URL doesn't apply to them right now", so the request "never reaches Moonshot at all". kimi-k2.7-code-highspeed worked "because that name doesn't match any built-in model".

A later reply in the same thread confirms the list: if the model ID exactly matches kimi-k3, kimi-k3-low, kimi-k3-high, kimi-k3-max or kimi-k2.7-code, the override "currently won't apply to it, no matter where the URL points". Another user saw the same 404 with the override pointed at a company AI gateway, not Moonshot. Cursor says it's tracking the issue, so this may change in a later release.

Fix 1: use an ID that doesn’t collide

First, ask Moonshot which model IDs your key can use. The endpoint is OpenAI-compatible, at the base URL from Moonshot's docs:

export MOONSHOT_API_KEY="sk-..."   # from platform.kimi.ai
curl -s https://api.moonshot.ai/v1/models \
  -H "Authorization: Bearer $MOONSHOT_API_KEY" | grep -o '"id": *"[^"]*"'

Then in Cursor:

  1. Open Cursor Settings > Models.
  2. Paste your Moonshot key in the OpenAI API Key field and turn it on.
  3. Turn on Override OpenAI Base URL and set it to https://api.moonshot.ai/v1.
  4. Add a custom model with an ID from the list above that isn't one of the five built-in names, for example kimi-k3.1-pro.
  5. Pick that custom model in chat, not the built-in "Kimi K3" entry.

Cursor staff suggested exactly this: if /v1/models returns a K3 ID other than the built-in names, "try adding it as a custom model". If you go through a gateway (LiteLLM, TrueFoundry, your own proxy), create an alias there with a provider prefix and use that alias as the Cursor model ID.

Checks if it still fails:

  • Key and URL on different platforms. Moonshot's troubleshooting notes that keys created on platform.kimi.ai "only work with https://api.moonshot.ai/v1".
  • Missing /v1. Moonshot's docs give the base URL as https://api.moonshot.ai/v1, so keep the /v1 on the end.
  • Gateway on localhost. Cursor's API key docs say "all requests are routed through Cursor's servers for final prompt building", so a URL only your laptop can reach won't work.
  • Toggles got switched off. Staff advise checking that OpenAI API Key and Override OpenAI Base URL are still on and the URL is still there, then sending 1 to 2 Request IDs (chat menu "..." > Copy Request ID) if it keeps failing.

Fix 2: use Cursor’s hosted Kimi K3 instead

If you just want K3 working now, staff suggest turning off OpenAI API Key in Cursor Settings > Models. K3 then runs as a Cursor model and "use[s] your plan limits instead of your Moonshot key". This toggle affects all your custom models, so turn it back on when you want them. If your plan limits are the reason you wanted your own key, see how Cursor’s usage limits and weekly pool work.

Cost and billing

As of October 2026, Cursor's API key docs say your provider bills you directly for the model cost. On individual plans those requests don't draw from your included usage. On Teams and Enterprise plans the Cursor Token Rate still applies to eligible models. Cursor's Zero Data Retention policy doesn't apply to requests made with your own key.

FAQ

Does this affect Claude Code or Codex with Kimi? This bug is in Cursor's model routing. Claude Code and Codex use their own settings for Kimi, covered in using an API key instead of a Claude Code or Codex subscription.

Why did it work before mid-October? One user in the thread reports a custom Kimi ID that reached their gateway until about mid-October, then broke once the name collided with a built-in. Cursor hasn't published a cause beyond the staff replies above.

Get the tested profiles

Disclosure: this is our own paid product. The BYOK Profiles Kit has Cursor steps for Kimi, OpenRouter, Vercel AI Gateway and Azure OpenAI, including the Kimi model-ID collision (ERROR_PROVIDER_ERROR with providerStatusCode 404) and the Azure Unknown parameter: 'reasoning' error, plus copy-paste profiles for Codex and Claude Code and a table of 29 error strings and symptoms with their cause and fix. It's designed to save the trial and error of base URL paths, auth headers and model IDs that collide with built-in names. The Cursor steps are checked against docs and Cursor staff replies only, because Cursor has no headless mode; the Codex and Claude Code snippets were run against a local mock server, not the live provider APIs. No API keys are included, and providers bill you directly. It costs $9 (plus VAT where applicable).

Sources

As of October 2026 (sources checked 24 Oct 2026):

  • Cursor forum, "BYOK + custom base URL: built-in Kimi K3 and K2.7-Code return 404, but K2.7-Code-Highspeed works": https://forum.cursor.com/t/175557
  • Cursor docs, Bring your own API key: https://cursor.com/docs/settings/api-keys
  • Moonshot Kimi docs, Codex guide (base URL https://api.moonshot.ai/v1, troubleshooting): https://platform.kimi.ai/docs/guide/codex-kimi

Cursor is a trademark of Anysphere. Kimi and Moonshot belong to Moonshot AI. Claude Code and Anthropic, Codex and OpenAI, OpenRouter, Vercel, Azure and Microsoft, TrueFoundry, LiteLLM and other names belong to their owners. Names are used only to identify products and compatibility. Stack & Ship is not affiliated with or endorsed by any of them.