[Bug] Anthropic API Error: Credential Restricted to Claude Code

Open 💬 30 comments Opened Sep 23, 2025 by lookbusy1344

Bug Description
On my initial request I'm getting: API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"This
credential is only authorized for use with Claude Code and cannot be used for other API
requests."},"request_id":"req_01XXXXXX"}

Environment Info

  • Platform: darwin
  • Terminal: Apple_Terminal
  • Version: 1.0.120
  • Feedback ID:

Errors

[{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"This credential is only authorized for use with Claude Code and cannot be used for other API requests.\"},\"request_id\":\"req_011CTR9KfL6jha6UVBXWVX4Q\"}\n    at new B5 (unknown:1:28)\n    at new OY (/$bunfs/root/claude:842:1962)\n    at new RG0 (unknown:1:28)\n    at generate (/$bunfs/root/claude:842:2419)\n    at makeRequest (/$bunfs/root/claude:859:5359)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-09-23T10:05:16.884Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"This credential is only authorized for use with Claude Code and cannot be used for other API requests.\"},\"request_id\":\"req_011CTR9MF7sQRPojoinMNyGM\"}\n    at new B5 (unknown:1:28)\n    at new OY (/$bunfs/root/claude:842:1962)\n    at new RG0 (unknown:1:28)\n    at generate (/$bunfs/root/claude:842:2419)\n    at makeRequest (/$bunfs/root/claude:859:5359)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-09-23T10:05:38.284Z"},{"error":"Error\n    at nN (/$bunfs/root/claude:536:1083)\n    at B1 (/$bunfs/root/claude:537:9957)\n    at emit (node:events:92:22)\n    at endReadableNT (internal:streams/readable:862:50)\n    at processTicksAndRejections (native:7:39)\n    at request (/$bunfs/root/claude:539:2105)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-09-23T10:06:34.576Z"}]

View original on GitHub ↗

30 Comments

superman1006 · 9 months ago

same problem

TimBroddin · 9 months ago

same

lookbusy1344 · 9 months ago

Logging out and back in fixed it for me.

TimBroddin · 9 months ago

Nevermind, my subscription has expired.

cptfinch · 9 months ago

Same , and my subscription has not expired

lookbusy1344 · 9 months ago

I’ve got a current annual subscription. I need to try another computer to see if it’s common to them all or just on that one machine.

icaca · 9 months ago

same problem

amiavia · 9 months ago

Same ... hope a fix will come soon

jmmirabile · 9 months ago

What is going on here? I can't use Claude Code and get this API error. So, I typed "/status" and it tells me I'm using Opus 4, but Pro plan doesn't have access to Opus 4. So, I typed exit, then relaunched as "claude --model sonnet" and it's fine now. Wacky!!

mg-dev25 · 9 months ago

I notice that its as change the default model to opus. Since pro sub don't have access to opus model with the pro credential, it output error. Use /model to change back the default model to sonnet

lookbusy1344 · 9 months ago

Anyone having problems with GH workflows can fix them as in this commit https://github.com/lookbusy1344/PicoArgs-dotnet/commit/957f6639d0aa92a69845ab5973e12921ade074d8

beavinash · 9 months ago

Same issue for me as well:

API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"This credential is only authorized
for use with Claude Code and cannot be used for other API requests."},"request_id":

mattmar10 · 9 months ago

same issue

haddock-development · 9 months ago

same here...

glennrmilano · 7 months ago

Same problem - my solution was to revert to a previous V of the plugin. Worked immediately.

MikeGitIt · 6 months ago

How is this STILL an issue?! And yes, I am also seeing this.

pivattogui · 6 months ago

Same here XD

engrjcrv · 6 months ago

im facing the same issue just today, same with my brothers and sisters. using opencode too guys.

vimcity · 6 months ago

same here, was using opencode to connect to my pro claude plan, worked fine yesterday, now broken

devaxai · 6 months ago

yes, facing the same issue. was trying with opencode and i got this error.

yanko-belov · 6 months ago

I am also using Opencode an get This credential is only authorized for use with Claude Code and cannot be used for other API requests.

atanasna · 6 months ago

Same, I can no longer use any models inside opencode. Come on Anthropic, you should be better than this, we pay the subscription fee for the model and the tokens not the tool

ramirlm · 6 months ago

Crap it seems a new update. Also getting this now

bechampion · 6 months ago

this was working perfectly yesteday , today is a no go

rmesquita-bit · 6 months ago

Leaving Anthropic in 3,2,1...

vimcity · 6 months ago

Seems like it was intentional change after the update

bechampion · 6 months ago

working again?

kapelan · 5 months ago

This is the second time this month I've been frustrated with Anthropic's decisions. First, Claude Code after the 2.1.9 update completely broke - it lost context between messages and ignored previous prompts. The quality degraded overnight with no warning.
So I migrated to Open Code while still using Claude as the underlying model since I was comfortable with it. Now they're blocking authorization for third-party clients? Last I checked, my subscription is for Claude, not exclusively for Claude Code.
I really dislike these kinds of moves. Anthropic seems aware they have goodwill in the developer community largely due to good PR and a solid model - though Opus 4.1 was bad enough that I cancelled my subscription for the first time.
If they want to play the corporate lock-in game, that's their choice. But I'm not interested. I just want a stable solution that's properly tested before release - not beta-tested on paying customers.
Open Code works fine as a CLI. Claude Code is heading in the wrong direction with these restrictions. And honestly, Claude doesn't differentiate itself enough from competitors anymore to justify not switching to Codex or Gemini.
For now, I'm done with Claude.

glennrmilano · 5 months ago

I’ve been thinking the same and have offloaded much of my agent work to
codex - the frequency with which Claude agrees that codex’s plan is better
is nearing 100% so I’m not sure why I’m still paying anthropic. It seems
the PR is no longer matching the actual strategy and tactics. Not cool.

Glenn

On Wed, Jan 28, 2026 at 3:59 AM Lucjan Sulewski @.***>
wrote:

kapelan left a comment (anthropics/claude-code#8052) <https://github.com/anthropics/claude-code/issues/8052#issuecomment-3809922380> This is the second time this month I've been frustrated with Anthropic's decisions. First, Claude Code after the 2.1.9 update completely broke - it lost context between messages and ignored previous prompts. The quality degraded overnight with no warning. So I migrated to Open Code while still using Claude as the underlying model since I was comfortable with it. Now they're blocking authorization for third-party clients? Last I checked, my subscription is for Claude, not exclusively for Claude Code. I really dislike these kinds of moves. Anthropic seems aware they have goodwill in the developer community largely due to good PR and a solid model - though Opus 4.1 was bad enough that I cancelled my subscription for the first time. If they want to play the corporate lock-in game, that's their choice. But I'm not interested. I just want a stable solution that's properly tested before release - not beta-tested on paying customers. Open Code works fine as a CLI. Claude Code is heading in the wrong direction with these restrictions. And honestly, Claude doesn't differentiate itself enough from competitors anymore to justify not switching to Codex or Gemini. For now, I'm done with Claude. — Reply to this email directly, view it on GitHub <https://github.com/anthropics/claude-code/issues/8052#issuecomment-3809922380>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/BT2P7QYMKP4DRKKU3G7524T4JB3AHAVCNFSM6AAAAACHICAA6KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTQMBZHEZDEMZYGA> . You are receiving this because you commented.Message ID: @.***>
bizzno · 5 months ago

Same issue as of today - never seen it before and got it for the first time now.