OpenHands
Configure OpenHands with AICredits as a custom LLM endpoint for self-hosted coding agents and automations.
Use this page with an AI assistant
Opens a new chat with this docs URL and the correct AICredits base URLs.
OpenHands is a self-hosted developer control center for coding agents and automations. Use AICredits as a custom OpenAI-compatible LLM endpoint to run agent sessions with one INR-billed API key.
LLM Settings
In OpenHands, open Settings -> LLM and enable advanced settings. Configure:
| Setting | Value |
|---|---|
| Custom model | openai/anthropic/claude-sonnet-4.5 |
| Base URL | https://api.aicredits.in/v1 |
| API key | sk-your-aicredits-key |
OpenHands uses LiteLLM model naming for custom providers. The openai/ prefix tells OpenHands to use an OpenAI-compatible transport; the model ID after it is the AICredits model ID.
Suggested Profiles
Create separate LLM profiles for different agent phases:
| Profile | Model |
|---|---|
| Fast implementation | openai/openai/gpt-4o-mini |
| Code review | openai/anthropic/claude-sonnet-4.5 |
| Long planning | openai/google/gemini-2.5-flash |
Use an AICredits API key with a monthly cap for OpenHands. Coding agents can make many tool-backed model calls in one task.
Verify
Start a new OpenHands conversation and ask:
Say "AICredits via OpenHands" and nothing else.Then check Dashboard -> Usage for the request.
Troubleshooting
Model is rejected - Try the LiteLLM-style custom model format openai/<aicredits-model-id>.
401 Unauthorized - Replace the key with a current AICredits API key.
Unexpected spend - Use a low-cost default profile and switch to a larger model only for review or planning.