VS Code with AICredits
Use AICredits to power AI features in VS Code — Continue.dev, Cline, Aider, and other OpenAI-compatible extensions — by pointing them at your AICredits base URL.
Use this page with an AI assistant
Opens a new chat with this docs URL and the correct AICredits base URLs.
AICredits is fully OpenAI-compatible. Any VS Code extension that accepts a custom base URL — Continue.dev, Cline, Aider, and more — works out of the box. Point the extension at https://api.aicredits.in/v1 and use your AICredits API key to route all AI completions through your prepaid INR wallet.
Once connected, you can switch between GPT-4o, Claude, Gemini, and dozens of other models just by changing the model name in your extension settings — no separate API keys needed for each provider.
Overview
The AICredits API endpoint is a drop-in replacement for the OpenAI API. Every extension that supports a custom baseURL works without any code changes — you only set two values:
| Setting | Value |
|---|---|
| Base URL | https://api.aicredits.in/v1 |
| API Key | sk-… (your AICredits key from the dashboard) |
Continue.dev
Continue is the most popular open-source AI coding assistant for VS Code. It natively supports OpenAI-compatible providers.
1. Install Continue
Install the Continue extension from the VS Code marketplace (Continue.continue), then open its config file:
# macOS / Linux
~/.continue/config.yaml
# Windows
%USERPROFILE%\.continue\config.yaml2. Configure config.yaml
Add AICredits as an OpenAI-compatible provider. You can list multiple models and switch between them in the Continue sidebar.
models:
- name: AICredits – GPT-4o
provider: openai
model: openai/gpt-4o
apiBase: https://api.aicredits.in/v1
apiKey: sk-your-key-here
- name: AICredits – Claude Sonnet
provider: openai
model: anthropic/claude-sonnet-4.5
apiBase: https://api.aicredits.in/v1
apiKey: sk-your-key-here
- name: AICredits – Gemini 2.5 Flash
provider: openai
model: gemini/gemini-2.5-flash-preview-05-20
apiBase: https://api.aicredits.in/v1
apiKey: sk-your-key-hereReplace sk-your-key-here with ${AICREDITS_API_KEY} and export the variable in your shell profile so the key is never stored in plain text.
3. Verify
Open the Continue panel (⌘ I / Ctrl I), select one of the AICredits models from the dropdown, and type a message. You should see a response within a few seconds and a balance deduction in your dashboard.
Cline (formerly Claude Dev)
Cline is an autonomous coding agent extension for VS Code. It supports any OpenAI-compatible endpoint.
Open Cline settings and set:
| Field | Value |
|---|---|
| API Provider | OpenAI Compatible |
| Base URL | https://api.aicredits.in/v1 |
| API Key | sk-your-key-here |
| Model ID | openai/gpt-4o (or any model from the Models page) |
AICredits uses the provider/model-name format. You can find all available model IDs on the Models page.
Aider in the VS Code Terminal
Aider is a terminal-based AI pair programmer. Open the integrated terminal in VS Code and run:
pip install aider-chat
export OPENAI_API_KEY=sk-your-key-here
export OPENAI_API_BASE=https://api.aicredits.in/v1
aider --model openai/gpt-4o
aider --model anthropic/claude-sonnet-4.5Aider will use your AICredits wallet for all requests. Pass --no-auto-commits if you want to review changes before Aider commits them.
Other OpenAI-Compatible Extensions
Any extension that exposes an OpenAI base URL or API endpoint setting will work:
| Extension | Setting name |
|---|---|
| CodeGPT | codegpt.apiBaseUrl |
| Wingman AI | Custom OpenAI-compatible provider → Base URL |
| Privy | privy.openAiBaseUrl |
| Any extension with "OpenAI base URL" | https://api.aicredits.in/v1 |
Terminal / Environment Variable Approach
For tools that respect the standard OPENAI_* environment variables, configure once in your shell profile:
export OPENAI_API_KEY=sk-your-key-here
export OPENAI_BASE_URL=https://api.aicredits.in/v1Reload your shell (source ~/.zshrc) or open a new terminal tab. Any tool that reads OPENAI_API_KEY and OPENAI_BASE_URL will now route through AICredits automatically.
Which Models to Use
The full list is on the Models page. Recommended starting points:
| Use case | Recommended model |
|---|---|
| Fast completions / chat | openai/gpt-4o-mini |
| Complex refactors / architecture | openai/gpt-4o |
| Long context (large codebases) | anthropic/claude-sonnet-4.5 |
| Cost-efficient coding | gemini/gemini-2.5-flash-preview-05-20 |
Troubleshooting
Extension shows "Invalid API key" or 401 — Ensure you are using your AICredits key (starts with sk-), not an OpenAI key. Generate a key in the API Keys section of your dashboard.
Model not found / 404 — Use the full provider/model-name format (e.g. openai/gpt-4o, not just gpt-4o). Check the Models page for the exact ID.
Requests succeed but balance isn't deducting — Balance updates are batched and may appear in your dashboard within a few seconds. If the issue persists, check the Usage page for a detailed request log.
429 Too Many Requests — You have hit the rate limit for your plan. See the Rate Limits page for per-plan limits and retry guidance.
If you are still stuck, check the Error Reference or reach out via the community channels linked in the sidebar.