agent sdk/Working with Coding AgentsHot

Using Claude Code with Unlocked AI

Power Anthropic's flagship CLI agent with your Unlocked AI key and pay-as-you-go credits.


Why Use Claude Code with Unlocked AI?

Anthropic's official `claude` command-line tool is a premier coding agent that reads files, edits repositories, runs bash tests, and executes multi-step refactors. By routing Claude Code through Unlocked AI, you avoid monthly API bill surprises and tap into non-expiring pay-as-you-go credits.
Base URL Environment Variable
Set `ANTHROPIC_BASE_URL="https://unlockedai.net"` and `ANTHROPIC_API_KEY="unl_live_..."` in your terminal shell.

Terminal Configuration

# 1. Export your Unlocked AI key as ANTHROPIC_AUTH_TOKEN
export ANTHROPIC_AUTH_TOKEN="sk-unlocked-your_key_here"

# 2. Point Base URL to Unlocked AI Gateway
export ANTHROPIC_BASE_URL="https://unlockedai.net"

# 3. Explicitly empty ANTHROPIC_API_KEY to prevent direct login prompts
export ANTHROPIC_API_KEY=""

# 4. Launch Claude Code
claude

Need an Unlocked AI Key or Credits?

Generate secret API keys backed by non-expiring pay-as-you-go credits starting at $5. No monthly minimums.