Use APINebula in Claude Code
Generate a Claude Code config from the Anthropic-compatible endpoint in APINebula's docs. The API key in the config is a placeholder; replace it with a key you create at APINebula.
Endpoints
- Pay as you go
https://img-api.apinebula.aiThe token must be in the "Claude Code全球高防" group; Claude Code uses this subdomain.Docs · verified 2026-11-09
Generate the config
Save to ~/.claude/settings.json; merge it in if the file already exists
{
"env": {
"ANTHROPIC_BASE_URL": "https://img-api.apinebula.ai",
"ANTHROPIC_AUTH_TOKEN": "YOUR_API_KEY",
"ANTHROPIC_API_KEY": "",
"ANTHROPIC_MODEL": "claude-fable-5-2",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-fable-5-2",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-fable-5-2",
"ANTHROPIC_DEFAULT_FABLE_MODEL": "claude-fable-5-2",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-fable-5-2"
}
}
Models and prices
$ per 1M tokens. Each model uses the provider's cheapest group; the ratio uses the output price
How to check it works
Restart Claude Code and send a message. If it replies and the request shows up in APINebula's console, it is using this endpoint.
FAQ
settings.json or environment variables?
settings.json applies every time Claude Code starts, for long-term use; the environment variables apply to the current terminal only, for a quick try.
How do I switch back to Anthropic?
Remove these variables from settings.json (or close the terminal where you set them), then restart Claude Code.
Does my key pass through this site?
No. The page only generates config text and never asks for your key; the key only goes into the config file or terminal on your own machine.