# Kimi Custom API Key Causes "Unauthorized User API Key"

**URL:** <https://forum.cursor.com/t/kimi-custom-api-key-causes-unauthorized-user-api-key/168562>\
**Category:** Help\
**Tags:** byok\
**Created:** [August 16, 2026, 4:39pm UTC](https://forum.cursor.com/t/kimi-custom-api-key-causes-unauthorized-user-api-key/168562 "2026-08-16T16:39:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![c64skate](https://avatars.discourse-cdn.com/v4/letter/c/82dd89/32.png) [@c64skate](https://forum.cursor.com/u/c64skate)\
**Post date:** [August 16, 2026, 4:39pm UTC](https://forum.cursor.com/t/kimi-custom-api-key-causes-unauthorized-user-api-key/168562/1 "2026-08-16T16:39:04Z")

</div>

### 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](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](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

 ![cursor-error.png](https://us1.discourse-cdn.com/cursor1/original/3X/9/8/98c8cd64fc9bb2f89d0e0fba0366bd44cca7ad61.png)

### 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

---

<div class="post-metadata">

**Author:** ![c64skate](https://avatars.discourse-cdn.com/v4/letter/c/82dd89/32.png) [@c64skate](https://forum.cursor.com/u/c64skate)\
**Post date:** [August 16, 2026, 7:53pm UTC](https://forum.cursor.com/t/kimi-custom-api-key-causes-unauthorized-user-api-key/168562/4 "2026-08-16T19:53:35Z")

</div>

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”?

---

<div class="post-metadata">

**Author:** ![deanrie](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/deanrie/32/1263_2.png) [@deanrie](https://forum.cursor.com/u/deanrie)\
**Post date:** [August 19, 2026, 8:35am UTC](https://forum.cursor.com/t/kimi-custom-api-key-causes-unauthorized-user-api-key/168562/6 "2026-08-19T08:35:48Z")

</div>

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](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.

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/system/32/99069_2.png) [@system](https://forum.cursor.com/u/system)\
**Post date:** [September 18, 2026, 8:36am UTC](https://forum.cursor.com/t/kimi-custom-api-key-causes-unauthorized-user-api-key/168562/7 "2026-09-18T08:36:46Z")

</div>

Closed on September 18, 2026, 8:36am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
