You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] Unsloth Studio: Claude Code fails with 401 despite following docs and having a valid key #8663
Claude Code (Anthropic's official CLI) sends its API key via the x-api-key header, following the standard Anthropic API convention. Unsloth's API endpoint appears to only accept Authorization: Bearer sk-unsloth-…, causing every request to fail with 401 Not authenticated.
Note: the docs do mention Copy your key from Unsloth Studio → Settings → API (or from the console when you start it with) unsloth run, where it is printed as sk-unsloth-...), then set it up. but never actually describe what "set it up" means. Is there a missing step ?
Also, we have a automatic command to launch Claude Code with local models. You can try it. See docs
Afaik this will only work if unsloth studio is running on the same machine as claude code. It will not work in my case, where it's on machine A but is being used by machine B over the network.
You should set your API key with ANTHROPIC_AUTH_TOKEN
Thank you, I can confirm this works fine. Keeping the issue open since the docs are still incomplete.
Activity
Lyxot commentedon Aug 13, 2026
Sorry this is a mistake in our docs. You should set your API key with
ANTHROPIC_AUTH_TOKEN, and leaveANTHROPIC_API_KEYempty.Also, we have a automatic command to launch Claude Code with local models. You can try it. See docs
hippalectryon-0 commentedon Aug 13, 2026
Afaik this will only work if unsloth studio is running on the same machine as claude code. It will not work in my case, where it's on machine A but is being used by machine B over the network.
Thank you, I can confirm this works fine. Keeping the issue open since the docs are still incomplete.
Lyxot commentedon Aug 13, 2026
Actually you can. See docs
Lyxot commentedon Aug 13, 2026
Docs are updated
Studio: accept sk-unsloth API keys in the x-api-key header (unslothai…