Kimi Custom API Key Causes "Unauthorized User API Key"

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

I use a tested Kimi API Key starting with sk- and 51 characters long. It works via web API tests. When i try using it from Cursor using overridden “https://api.moonshot.ai/v1” URL and my Kimi API Key, it gives “Unauthorized User API Key” but it doesn’t even try to reach moonshot URL.

I tried adding “kimi-k2.6” since it was not already in the list like “Kimi K2.7 Code” or “Kimi K3” but it fails with all of them.

Steps to Reproduce

  • Generate a Kimi API Key
  • Use this key to “Cursor Settings > Models > API Keys > OpenAI API Key” section by pressing enter.
  • Select “Override OpenAI Base URL” and enter “https://api.moonshot.ai/v1” as new base URL
  • Use “+ Add Custom Model” above to add “kimi-k2.6”
  • Select “kimi-k2.6” from Agent window and send a simple prompt like “say hello”.

Screenshots / Screen Recordings

Operating System

Windows 10/11

Version Information

Version: 3.16.17 (user setup)
VS Code Extension API: 1.128.0
Commit: 6b2afae0257df2bb5e1835f15165dc2f0de056b0
Date: 2026-08-14T01:41:12.803Z
Layout: IDE
Build Type: Stable
Release Track: Default
Electron: 40.10.3
Chromium: 144.0.7559.236
Node.js: 24.15.0
V8: 14.4.258.32-electron.0
xterm.js: 6.1.0-beta.291
OS: Windows_NT x64 10.0.26100

For AI issues: which model did you use?

Kimi K2.6

Does this stop you from using Cursor

No - Cursor works, but with this issue

i just tried “kimi-k2.7-code-highspeed” and it worked. so, please let me know which Kimi models are usable with Cursor and how can we use already listed models like “Kimi K3” or “Kimi K2.7 Code”?

Hey, thanks for the detailed report and for figuring out to try a different name. That’s the key part.

What’s happening: the custom model name kimi-k2.6 (same for kimi-k2.7-code, kimi-k3, kimi-latest, kimi-k2.5) matches a reserved identifier for a built-in model in Cursor. Because of that, Cursor treats it as a managed model and doesn’t send the request to your Override OpenAI Base URL. So Moonshot never gets called, and your key gets rejected. We’re tracking this issue, but I can’t share an ETA yet.

Workaround (you’re already on the right track with kimi-k2.7-code-highspeed): name your custom model using a real Moonshot model ID that does NOT collide with reserved names. These work:

  • kimi-k2-thinking
  • kimi-k2-turbo-preview
  • kimi-k2-0905-preview

Those names get sent as-is to https://api.moonshot.ai/v1 and work with your key.

About the built-in picker options Kimi K3 and Kimi K2.7 Code: right now those are Cursor-managed models, so they don’t route through your personal Moonshot key and Override URL. You can’t select them with a personal key yet. For BYOK via Moonshot, use a custom model with a non-colliding name like above.

Let me know if it works with the new name.