/v1/messages. Use the Claude Code settings shown in the dashboard.
Prerequisites
- You have completed Create an account.
- You have completed Get an API Key.
- Claude Code is installed and
claudecan start. - You have copied the Claude Code configuration from the dashboard.
Install
If Claude Code is not installed, follow the official Claude Code setup documentation. macOS, Linux, or WSL:Copy config from the dashboard
Find the target key
Create a dedicated key for Claude Code, such as
claude-code-work or claude-code-mac.Open Use key
Click Use key in that key row. If the dashboard offers client options, choose Claude Code.

YOUR_4096BYTES_API_KEY as a placeholder.
Temporary environment variables
Use this method for a quick test. The variables disappear when you close the terminal.macOS or Linux
ANTHROPIC_API_KEY, use this instead:
ANTHROPIC_AUTH_TOKEN and ANTHROPIC_API_KEY. Prefer the variable name shown in the dashboard.
Windows PowerShell
ANTHROPIC_API_KEY, replace the second line with:
Windows CMD
ANTHROPIC_API_KEY, replace the second line with:
Persist in Claude Code settings
For long-term use, write the environment variables into the Claude Code settings file.~/.claude/settings.json. Save the file and restart Claude Code.
Persist in shell config
You can also write the variables into~/.zshrc or ~/.bashrc.
Specify a model
If Claude Code needs an explicit model, use the model name shown for Claude Code or Claude compatible access in the dashboard.Notes
- Use the root Base URL shown in the dashboard, for example
https://api.4096bytes.com. Do not append/v1/messages. - After switching Providers, reopen the terminal or confirm the environment variables are updated.
- If you use CC Switch, confirm the active profile is 4096bytes.
- If you run Claude Code inside VS Code Terminal, reopen VS Code after changing environment variables.
Troubleshooting
| Issue | What to do |
|---|---|
| Authentication failed | Confirm the API Key is complete and only one of ANTHROPIC_AUTH_TOKEN or ANTHROPIC_API_KEY is enabled. |
| Wrong address | Use the root address shown in the dashboard. Do not append the full request path. |
| Still using official service | Reopen the terminal and check whether old Claude environment variables still exist. |
| Model unavailable | Use a Claude Code or Claude compatible model name shown in the dashboard. |
| Not working in VS Code | Close and reopen VS Code so the terminal reads the updated environment. |