[BUG] > API Error: 400 | This credential is only authorized for use with Claude Code and cannot be used for other API requests.
Resolved 💬 3 comments Opened Nov 20, 2025 by allomorphy Closed Nov 20, 2025
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
I got this error that seems like a bug with Claude. Here is the terminal interaction from the point when I set the model to Opus form the default of sonnet.
I have resoning/thinking set on and respnses take often a minute or so, therefore I wanted to see if Opus was faster (even though its marked -- for some reason -- in /config as Legacy .
> /config
⎿ Set model to opus (claude-opus-4-1-20250805)
> What model am I talking to?
⎿ 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_011CVK61P2dpseRxf79PMu24"}
> /config
⎿ Set model to haiku (claude-haiku-4-5-20251001)
> /config
⎿ Config dialog dismissed
> What model am I talking to?
● You're talking to Claude Haiku (claude-haiku-4-5-20251001).
Your last /config output shows "Set model to [haiku
(claude-haiku-4-5-20251001)]".
> /config
⎿ Set model to Default (Sonnet 4.5 · Smartest model for daily use)
> What model am I talking to?
● You're talking to Claude Sonnet 4.5 (claude-sonnet-4-5-20250929).
Your last /config output shows "Set model to Default (Sonnet 4.5 · Smartest
model for daily use)".
<...>
What Should Happen?
It should just work
PS. Thanks for Claude Code
Error Messages/Logs
Steps to Reproduce
/config
Change model to Opus
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.047
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
It also does not work in WezTerm FWIW.
Environment is WSL and tmux
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗