Grok Code broken

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Request failed with status code 400: {“code”:“Client specified an invalid argument”,“error”:“Incorrect API key provided: sk***kA. You can obtain an API key from https://console.x.ai.”}

Steps to Reproduce

use grok code

Expected Behavior

request id 17aacba2-09e4-4df2-8ac6-a758a2722514

Operating System

Linux

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.0.77
VSCode Version: 1.99.3
Commit: ba90f2f88e4911312761abab9492c42442117cf0
Date: 2025-11-13T23:10:43.113Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Linux x64 6.14.0-35-generic

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the report. The error indicates that your API key is invalid.

Please check and share:

  • Are you trying to use your own xAI/Grok API key?
  • Do you have a custom OpenAI API key or an overridden OpenAI base URL enabled in Cursor Settings > Models > API Keys?
  • What is your current Cursor plan (Free/Pro/Business)?

Let me know what you have enabled and whether adjusting these settings helps.

  1. no
  2. actually yes, but grok was working one minute and then not the next, without me changing this key.
  3. pro

Grok is not from openai though right? i thought its xai.
so disabling openai keys has got this model working …

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