Send your first request
You'll need an email address and a credential for the model provider you want to call. These steps use the hosted service. On a self-hosted instance, use your own origin throughout. Self-hosting guide.
1. Create an account
Register with your email, open the sign-in link and choose Continue to DodoRouter. If you arrive at Billing, activate the subscription to access the hosted dashboard. Create an account.
2. Create a router
Choose New Router, give it a name and save. Copy the router API key from the one-time banner. This is the secret your app sends to DodoRouter. You can issue another under API Keys.
In Bash or Zsh, replace my-agent with the slug shown on your router. Run these commands, paste the key at the blank prompt and press Enter. The shell hides the key as you type.
export DODO_ROUTER_URL="https://api.dodorouter.com/r/my-agent"
read -rs DODO_ROUTER_API_KEY && export DODO_ROUTER_API_KEY
Keep this terminal open. DODO_ROUTER_URL ends at the slug. Each example adds the path its client needs.
Check the URL and key
You can verify authentication before configuring a provider. This call uses zero model tokens.
curl -sS -i "$DODO_ROUTER_URL/v1/models" \
-H "Authorization: Bearer $DODO_ROUTER_API_KEY"
Look for HTTP 200 and your slug in data[0].id. If you get 401, check that the key is active under API Keys for the router named in the URL. For 402, the router owner can check Billing.
3. Add a provider API key
From Router setup, choose Add a provider key. Select the provider and enter the credential issued by that provider. Choose Continue setup to return to the router.
4. Add a routing step
Choose Add a routing step, select the provider and model, and save. Under Routing Chain, check that the step has its provider key assigned. One step is enough to start. Add more to try other providers on failure.
5. Send your first request
Send a short message from the same terminal. This call runs inference through the configured provider.
curl -sS -i "$DODO_ROUTER_URL/v1/chat/completions" \
-H "Authorization: Bearer $DODO_ROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "default",
"messages": [{"role": "user", "content": "Reply with the word pong."}]
}'
On success, you'll see HTTP 200, the assistant's answer in choices[0].message.content, and the serving model in model. Your routing step supplies the model for "default". To make this call from your app, use the same key with a client library. Python and Node.js SDK examples.
Inspect this request
Keep the router page open while sending the request. Choose View trace after the first successful response or Inspect failure after a provider error. The trace shows each provider attempt in order.
To open that same request later, copy the x-request-id response header from the terminal. While signed in, open https://api.dodorouter.com/logs/REQUEST_ID?tab=trace with that ID. On a self-hosted instance, use the dashboard origin.
If the response says No routing configured, add a step and retry. If the trace shows a failed provider attempt, inspect its status and response body, then check the key and model on that step. Troubleshoot a request.
You can now use these same environment variables with a coding client. Connect a coding agent.