Connect Anthropic to Unsloth: Run Claude Models in Local Chat
Connect the Anthropic API to Unsloth to chat with Claude models including Claude Opus 4.7 directly alongside your local models in an open-source UI chat interface. This guide shows you how to create an Anthropic API key, add Anthropic as a provider in Unsloth, load Claude LLMs, and start chatting.
Supported Claude models in Unsloth can also access advanced features such as thinking, web search, Anthropic code execution, and prompt caching to improve cost effiencey.
Setup
Create an Anthropic API key
Create an API key from the Anthropic Console. Copy the key. You will paste it into Unsloth in the next step.
Connect Anthropic to Unsloth

Next, connect Anthropic to Unsloth.
Open Settings → Connections, then click Add Connection.
Select the provider you want to add, then paste the API key you copied earlier.
Click Reload Models to refresh the list with models available to your account.
Choose the models you want to enable, then hit save.
Code Execution
When enabled, supported Claude models can run code in Anthropic’s provider sandbox to solve problems, analyze data, and work with files. Claude uses Anthropic’s Code execution tool. Code execution appears in the response timeline as tool activity, alongside other tool calls.

Prompt Caching
Prompt caching reduces latency and cost when requests reuse the same long prefix. It is supported for compatible providers and servers, including Anthropic models. Use the Prompt caching setting in the side panel to control caching behavior for supported connections.


Web Search & Thinking
Supported Claude models can use provider-side web search. The Think control appears when the selected model supports thinking. Depending on the model, this may expose different thinking levels or availability.

The Think control adapts to the selected model: some models use an on/off toggle, while reasoning-effort models use model specific thinking levels.
Troubleshooting
If Anthropic API fails to connect, check that the API key is valid and belongs to the correct Anthropic account.
If a model does not appear after clicking Load Models, it may not be available for your account. You can enter the model ID manually or choose another model.
Last updated
Was this helpful?


