Aider
Route Aider coding-agent requests through AICredits with OpenAI-compatible environment variables and INR billing.
Use this page with an AI assistant
Opens a new chat with this docs URL and the correct AICredits base URLs.
Aider can use OpenAI-compatible endpoints. Point it at AICredits to run coding-agent sessions with one prepaid INR wallet and model switching by ID.
Environment Setup
export OPENAI_API_KEY="sk-your-aicredits-key"
export OPENAI_BASE_URL="https://api.aicredits.in/v1"Then run Aider with a supported model:
aider --model openai/gpt-4o-miniFor stronger coding:
aider --model anthropic/claude-sonnet-4.5If your Aider version expects OpenAI model names only, keep the OpenAI-compatible provider setting and pass the AICredits model ID exactly as shown on Models.
.env Example
OPENAI_API_KEY=sk-your-aicredits-key
OPENAI_BASE_URL=https://api.aicredits.in/v1Keep .env out of git.
Suggested Models
| Task | Model |
|---|---|
| Cheap small edits | openai/gpt-4o-mini |
| Production refactors | anthropic/claude-sonnet-4.5 |
| Long-context repository reads | google/gemini-2.5-flash |
| Cost-sensitive experiments | deepseek/deepseek-v4-flash |
Tips
- Start with a cheaper model for exploration, then switch to a stronger model for final edits.
- Use AICredits API-key budgets when running Aider on large repositories.
- Check Dashboard → Usage after a session to see model, tokens, cost, and latency.
Troubleshooting
Aider says the model is unknown — Confirm your Aider version supports custom OpenAI-compatible model IDs. If needed, configure the OpenAI-compatible endpoint explicitly.
Requests go to OpenAI directly — Check OPENAI_BASE_URL in the same shell where you run Aider.
Insufficient credits — Top up your wallet from Dashboard → Billing.