# Aider > Run the terminal pair-programmer against the gateway in either wire format. _Source: https://aiprimetech.io/docs/guides/aider/ · Home > Docs > Integration guides_ Aider routes model calls through LiteLLM, so it accepts either format depending on how you name the model. ## OpenAI-compatible route ```bash export OPENAI_API_BASE="https://aiprimetech.io/v1" export OPENAI_API_KEY="sk-your-key" aider --model openai/claude-sonnet-4-6 ``` ## Anthropic route ```bash export ANTHROPIC_API_BASE="https://aiprimetech.io" export ANTHROPIC_API_KEY="sk-your-key" aider --model anthropic/claude-sonnet-4-6 ``` > The `openai/` or `anthropic/` prefix tells LiteLLM which format to speak. Get it wrong and you will see a 404 as the request goes to the endpoint that does not match the body. ## Recommended flags ```bash # a cheaper model for commit messages and summaries aider --model anthropic/claude-sonnet-4-6 \ --weak-model anthropic/claude-haiku-4-5 ``` Aider makes frequent small auxiliary calls. Sending those to Haiku instead of the main model is a meaningful saving on a long session at no quality cost. - [Models](https://aiprimetech.io/docs/getting-started/models/) — Ids and prices - [Cost control](https://aiprimetech.io/docs/guides/cost-control/) — Route by task --- _ClaudeAPIKey.dev is an independently operated, Anthropic-compatible API gateway. Not affiliated with Anthropic._