Claude Code
Last updated
Was this helpful?
This guide explains how to configure Claude Code to work with Claude models available through AIML API.
Claude Code is a powerful coding agent by Anthropic that can analyze codebases, generate code, and assist with development workflows. By pointing it to AIML API, you can use Claude models available on our platform without connecting directly to Anthropic.
Node.js 18+
npm
Claude Code requires a model name. Use any Claude model available on AIML API:
export ANTHROPIC_MODEL=claude-haiku-4-5claude "Explain the architecture of this project"Claude Code communicates using the Anthropic API format. AIML API provides a compatible interface, so no changes to request structure are required.
All requests are routed through:
Notes
Only Claude models available on AIML API can be used
Performance and pricing depend on the selected model
No additional SDK setup is required
CLAUDE.md is a markdown file placed in your project root that Claude Code automatically reads at the beginning of each session. It can be used to define coding conventions, architectural guidelines, preferred libraries, workflows, and review requirements.
If you need to monitor usage and costs separately, you can create a dedicated API key for Claude Code usage in your Account. After that, you can view token usage details and corresponding USD costs in the dashboard under the Usage section.
For details, see the API keys and Usage sections in the Starter Guide.
Ensure that you:
Selected an Anthropic model
Chose one available on AIML API
Specified the correct model ID
By configuring Claude Code to use AIML API, you can:
Run Claude models via a unified API
Integrate coding agents into your workflow
Avoid direct dependency on Anthropic infrastructure
Last updated
Was this helpful?
Was this helpful?
claude "Refactor this code to use async/await"claude "Add JWT authentication to this API"https://api.aimlapi.comnpm list -g @anthropic-ai/claude-codeecho $ANTHROPIC_API_KEYecho $ANTHROPIC_BASE_URLhttps://api.aimlapi.com