Zed
Use AICredits in Zed by configuring an OpenAI-compatible custom provider with the AICredits base URL and API key.
Use this page with an AI assistant
Opens a new chat with this docs URL and the correct AICredits base URLs.
Zed can use OpenAI-compatible providers from settings.json. Point a custom provider at AICredits to route coding chat and assistant requests through your INR wallet.
Configuration
Open Zed → Settings → Open Settings JSON and add an OpenAI-compatible provider:
{
"language_models": {
"openai": {
"api_url": "https://api.aicredits.in/v1",
"available_models": [
{
"name": "openai/gpt-4o-mini",
"display_name": "AICredits GPT-4o mini",
"max_tokens": 128000
},
{
"name": "anthropic/claude-sonnet-4.5",
"display_name": "AICredits Claude Sonnet",
"max_tokens": 200000
},
{
"name": "deepseek/deepseek-v4-flash",
"display_name": "AICredits DeepSeek Flash",
"max_tokens": 64000
}
]
}
}
}Then set the API key through Zed's provider UI if prompted, or export it before launching Zed:
export OPENAI_API_KEY="sk-your-aicredits-key"Zed settings change over time. If your build has separate fields for provider name, API URL, and key, use https://api.aicredits.in/v1 as the API URL and an AICredits key from Dashboard → API Keys.
Model Choices
| Zed workflow | Recommended model |
|---|---|
| Quick code explanations | openai/gpt-4o-mini |
| Larger edits and refactors | anthropic/claude-sonnet-4.5 |
| Cost-sensitive chat | deepseek/deepseek-v4-flash |
| Long file or workspace context | google/gemini-2.5-flash |
Verify
Open Zed Assistant and ask:
Reply with "AICredits via Zed" and nothing else.Then check Dashboard → Usage for the request, model, token count, and INR cost.
Troubleshooting
401 Unauthorized — Make sure Zed is using an AICredits key that starts with sk-.
Model is missing — Add the exact model ID to available_models, or pick a model listed on Models.
Requests use another provider — Select the custom OpenAI-compatible provider/model in Zed Assistant before sending the prompt.