Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
Request ID: c7b5bfdc-1055-4e1d-a748-cc3699f65594
{“error”:“ERROR_BAD_USER_API_KEY”,“details”:{“title”:“Invalid API key.”,“detail”:“Unauthorized User API key”,“isRetryable”:false,“additionalInfo”:{},“buttons”:,“planChoices”:,“analyticsMetadata”:{“actionRequired”:“config”}},“isExpected”:true}
Invalid API key. Unauthorized User API key
ActionRequiredError: Invalid API key. Unauthorized User API key
at NVg (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:6983:82625)
at C$s (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:6983:81539)
at nGg (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:6984:12878)
at Object.classify (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:6984:17456)
at YVg (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:6984:5856)
at async B$s.run (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:6984:16808)
at async Jae.runAgentLoop (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:7115:34599)
at async fSo.streamFromAgentBackend (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:15029:14663)
at async fSo.getAgentStreamResponse (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:15029:32134)
at async nIe._submitChatMaybeAbortCurrent (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:7094:2524)
Steps to Reproduce
this is a brand new api key with $5 of credit added on the openai side. it says “Invalid API key” when I try to use that api key taken from the openai side
Expected Behavior
should be able to run a prompt in cursor IDE
Screenshots / Screen Recordings
Operating System
Linux
Version Information
Version: 3.16.17
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: Darwin arm64 25.5.0
For AI issues: which model did you use?
GPT-5.6 Luna
For AI issues: add Request ID with privacy disabled
n/a - do not want to disable privacy
Additional Information
i have added the api key via Preference → Cursor Settings → Models → API Keys → OpenAI API Key
It says “Secret saved.” and the toggle is enabled
also this command on the terminal cli works fine and i receive a Pong response so I definitely think there’s something wrong with the cursor side:
curl https://api.openai.com/v1/chat/completions -H
"Content-Type: application/json" -H "Authorization: Bearer <TOKEN>" -d '{
"model": "gpt-5.6-luna",
"messages": [{"role": "user", "content": "Ping"}]
}'
{
"id": "chatcmpl-<id>",
"object": "chat.completion",
"created": <created_date>,
"model": "gpt-5.6-luna",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Pong!",
"refusal": null,
"annotations": []
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 7,
"completion_tokens": 6,
"total_tokens": 13,
"prompt_tokens_details": {
"cached_tokens": 0,
"cache_write_tokens": 0,
"audio_tokens": 0
},
"completion_tokens_details": {
"reasoning_tokens": 0,
"audio_tokens": 0,
"accepted_prediction_tokens": 0,
"rejected_prediction_tokens": 0
}
},
"service_tier": "default",
"system_fingerprint": null
}
Does this stop you from using Cursor
Yes - Cursor is unusable

