AICredits logo
Integrations

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:

SettingValue
Custom modelopenai/anthropic/claude-sonnet-4.5
Base URLhttps://api.aicredits.in/v1
API keysk-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:

ProfileModel
Fast implementationopenai/openai/gpt-4o-mini
Code reviewopenai/anthropic/claude-sonnet-4.5
Long planningopenai/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.

On this page