Tool Integration
Claude Code
Claude Code uses ~/.claude/settings.json with the Anthropic-compatible Ling.AI route, not the OpenAI-compatible /v1 route.
Base
https://api.lingapi.ai/v1
Quick checklist
- Install Claude Code from the official Anthropic distribution.
- Edit ~/.claude/settings.json and set ANTHROPIC_AUTH_TOKEN to your Ling.AI API key.
- Set ANTHROPIC_BASE_URL to https://api.lingapi.ai/anthropic.
- Restart Claude Code, run /status, and choose a Claude-family model that is enabled in /v1/models.
Protocol boundary
Claude Code expects Anthropic Messages semantics. Use the Ling.AI Anthropic-compatible route for this tool and do not append /v1 or /v1/messages yourself.
Settings file
Keep the API key in the user-level ~/.claude/settings.json env block. If the CLI cannot read it, temporarily export ANTHROPIC_AUTH_TOKEN and ANTHROPIC_BASE_URL to isolate the issue.
CC Switch
Claude Code can also be configured from the Claude Code tool page in CC Switch. Use an API-key provider, base URL https://api.lingapi.ai/anthropic, and a model id from /v1/models.
Validation
Run a short Claude Code prompt, then confirm request status and wallet deduction in the Ling.AI console.
Example
Example
{
"env": {
"ANTHROPIC_AUTH_TOKEN": "<YOUR_API_KEY>",
"ANTHROPIC_BASE_URL": "https://api.lingapi.ai/anthropic",
"ENABLE_TOOL_SEARCH": "true",
"CLAUDE_CODE_EFFORT_LEVEL": "max"
},
"effortLevel": "max",
"alwaysThinkingEnabled": true
}
# File: ~/.claude/settings.json
claude
/status