Connect Aider
Configure provider, URL, key and model ID.
Prepare your API key
Sign in at /login, then create or copy a HanRouter API key at /keys. Your password and browser session token are not API keys. Check key validity, model group permissions and Dashboard balance.
Store the complete key in the server environment variable HANROUTER_API_KEY. Keep it out of browser code, public repositories and URL parameters.
Client configuration
Configure the OpenAI-compatible URL and key using environment variables, then use --model openai/model-id; see the command below.
Base URL: https://api.hanrouter.ai/v1. API key: your complete key from /keys. Model: an ID from GET /v1/models. Send Hello to verify.
export OPENAI_API_BASE="https://api.hanrouter.ai/v1"
export OPENAI_API_KEY="$HANROUTER_API_KEY"
aider --model "openai/$HANROUTER_MODEL"Verify available models
List models available to your key first, then copy data[].id exactly into requests. Names, case and aliases come from this response. The public plaza hides unpriced models; backend availability is unchanged.
curl "https://api.hanrouter.ai/v1/models" \
-H "Authorization: Bearer $HANROUTER_API_KEY"