Unable to use custom Anthropic API Key

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

I’m unable to use my custom Anthropic API key.

We encountered an issue when using your API key: Provider was unable to process your request.
API Error: "Request failed with status code 422: Failed to deserialize the JSON body into the target type: tools[0]: missing field `type` at line 1 column 12829"

Note: I’ve also looked in my Anthropic backend usage stats, and they are not showing any for the provided API Key, which means Cursor is not using the API Key that I provided, or something is not allowing the request.

Steps to Reproduce

Include your custom Anthropic API Key into Cursor, then attempt to prompt using ‘agent’ and a claude model (e.g. claude sonnet 4.5).

I initially used this model (claude sonnet 4.5) without including a custom api key and it ran until it hit an API rate limit. After I included my custom API Key, it still shows errors from above. And yes, I have an Anthropic prop paid plan with an organization.

Expected Behavior

Expected behavior is for Cursor to use the selected Claude model to execute my prompts.

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.7.44 (Universal)
VSCode Version: 1.99.3
Commit: 9d178a4■■■89981b62546448bb32920a8219a5d0
Date: 2025-10-10T15:43:37.500Z
Electron: 34.5.8
Chromium: 132.0.6834.210
Node.js: 20.19.1
V8: 13.2.152.41-electron.0
OS: Darwin arm64 24.6.0

For AI issues: which model did you use?

Claude

For AI issues: add Request ID with privacy disabled

Request ID: 13e6721f-dc81-4292-9245-47da40eea6cc

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the report. I just checked and everything works as expected on my side.

A couple of quick checks:

  1. Have you tested your API key in other apps to see if it works there?
  2. For testing, try adding this model: claude-sonnet-4-5-20250929, does it trigger the error?

Confirm these two points and I’ll escalate it for deeper investigation.

It calls Claude using your custom api key?

For additional context, I have my OpenAI Base URL set to Grok endpoint vs the OpenAI default (via ‘Override OpenAI Base URL’ setting). This seems to be the only way to integrate Grok api keys (I don’t see why this would make a difference, but I figure any additional context may be helpful).

Claude still seeing errors. API keys are correct.

1 Like

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