[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"}]
30 Comments
same problem
same
Logging out and back in fixed it for me.
Nevermind, my subscription has expired.
Same , and my subscription has not expired
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.
same problem
Same ... hope a fix will come soon
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!!
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
Anyone having problems with GH workflows can fix them as in this commit https://github.com/lookbusy1344/PicoArgs-dotnet/commit/957f6639d0aa92a69845ab5973e12921ade074d8
Same issue for me as well:
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"This credential is only authorizedfor use with Claude Code and cannot be used for other API requests."},"request_id":
same issue
same here...
Same problem - my solution was to revert to a previous V of the plugin. Worked immediately.
How is this STILL an issue?! And yes, I am also seeing this.
Same here XD
im facing the same issue just today, same with my brothers and sisters. using opencode too guys.
same here, was using opencode to connect to my pro claude plan, worked fine yesterday, now broken
yes, facing the same issue. was trying with opencode and i got this error.
I am also using
Opencodean getThis credential is only authorized for use with Claude Code and cannot be used for other API requests.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
Crap it seems a new update. Also getting this now
this was working perfectly yesteday , today is a no go
Leaving Anthropic in 3,2,1...
Seems like it was intentional change after the update
working again?
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.
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:
Same issue as of today - never seen it before and got it for the first time now.