Integration Checklist
Before connecting AkaRouter to your product or script, use this checklist to confirm that your setup is complete.
Account and Balance
Section titled “Account and Balance”- You can sign in to the AkaRouter console.
- Your wallet balance is enough for your test or expected usage.
- You created an API key and stored it only in server-side environment variables.
API Base URL
Section titled “API Base URL”Your code should use this Base URL:
https://api.akarouter.com/v1Do not use the console URL, documentation URL, payment URL, or a full endpoint path as the Base URL.
Model Name
Section titled “Model Name”Copy the model name from the Model Status page and store it in an environment variable:
export AKAROUTER_MODEL="MODEL_FROM_CONSOLE"Do not use a model name that is not shown in the console, and do not build provider model names manually.
Minimal Request
Section titled “Minimal Request”Run a minimal request first to confirm that your key, balance, endpoint, and model name are correct:
curl https://api.akarouter.com/v1/chat/completions \ -H "Authorization: Bearer $AKAROUTER_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "'"$AKAROUTER_MODEL"'", "messages": [{ "role": "user", "content": "Return the word ok." }] }'A successful result should include:
- HTTP status 200.
- A
choicesfield in the response. - A related usage record in your wallet balance or balance records.
Error Handling
Section titled “Error Handling”Handle error types differently in your code:
- 401, 402, 403: stop the current request and check your key, balance, or access.
- 429: reduce concurrency and retry with exponential backoff.
- 502, 503, 504: retry briefly and record the endpoint, model name, and error response.
When You Need Support
Section titled “When You Need Support”If requests still fail, prepare:
- Request time.
- Endpoint.
- Model name.
- HTTP status code.
- Error response.
- Related top-up order number or balance screenshot, if relevant.
Then follow Contact Support. Do not send your API key, password, or private payment information.