Claude Code
Quick Start
This guide will get you running Claude Code powered by Poe in just a few minutes.
Step 1: Install Claude Code
macOS, Linux, WSL:
curl -fsSL https://claude.ai/install.sh | bashWindows PowerShell:
irm https://claude.ai/install.ps1 | iexRequires Node.js 18 or newer.
npm install -g @anthropic-ai/claude-codeStep 2: Connect Claude Code to Poe
Instead of logging in with Anthropic directly, connect Claude Code to Poe. This requires setting a few environment variables.
Requirements:
- Use
https://api.poe.comfor the base URL - Provide your Poe API key as the Anthropic API key
- Important: This replaces the need for an Anthropic API key
# Set these in your shell (e.g., ~/.bashrc, ~/.zshrc)
export ANTHROPIC_BASE_URL="https://api.poe.com"
export ANTHROPIC_AUTH_TOKEN="$POE_API_KEY"
export ANTHROPIC_API_KEY="" # Important: Must be explicitly emptyPersistence: We recommend adding these lines to your shell profile (~/.bashrc, ~/.zshrc, or ~/.config/fish/config.fish).
Note: The native Claude Code installer does not read standard .env files, so environment variables must be set in your shell profile.
Step 3: Get Your Poe API Key
Navigate to poe.com/api_key to get your API key.
Step 4: Start Your Session
Navigate to your project directory and start Claude Code:
cd /path/to/your/project
claudeYou are now connected! Any prompt you send will be routed through Poe.
Step 5: Verify
You can confirm your connection by running the /status command inside Claude Code.
> /status
Anthropic base URL: https://api.poe.comSupported Models
You can use any Claude model available on Poe. Claude Code uses specific model aliases (like "Sonnet", "Opus", "Haiku") that automatically map to the correct Claude models.
| Alias | Model |
|---|---|
| Sonnet | Claude Sonnet 4.5 |
| Opus | Claude Opus 4 |
| Haiku | Claude Haiku 3.5 |
For a full list of available Claude models, see the Anthropic Compatible API documentation.
How It Works
Poe exposes an endpoint that is compatible with the Anthropic Messages API.
- Direct Connection: When you set
ANTHROPIC_BASE_URLtohttps://api.poe.com, Claude Code speaks its native protocol directly to Poe. No local proxy server is required. - API Compatibility: Poe's Anthropic-compatible endpoint behaves like the Anthropic API. It handles model mapping and supports advanced features like extended thinking and native tool use.
- Billing: You are billed using your Poe subscription points. Usage appears in your Poe account.
Troubleshooting
- Auth Errors: Ensure your
POE_API_KEYenvironment variable is set correctly. You can verify by runningecho $POE_API_KEYin your terminal. - Model Not Found: Make sure you're using a supported Claude model. See the supported models section.
- Rate Limits: The API is rate-limited to 500 requests per minute. If you're hitting rate limits, consider adding delays between requests.
- Setup Issues: Use
/logoutfirst and then set your credentials.
Pricing & Availability
All Poe subscribers can use their existing subscription points with the API at no additional cost.
This means you can seamlessly transition between the web interface and API without worrying about separate billing structures or additional fees. Your regular monthly point allocation works exactly the same way whether you're chatting directly on Poe or accessing Claude programmatically through Claude Code.
If your Poe subscription is not enough, you can purchase add-on points to get as much access as your application requires.
Support
Feel free to reach out to support if you come across unexpected behavior or have suggestions for improvements.