On this page
Getting started
Quickstart
Create an account, mint a key, and make your first request in a few minutes.
New accounts start at $0.00. Inference requires a positive balance, so top up before sending a paid request.
1. Create an account
curl -X POST https://api.relayrouter.org/auth/signup \ -H 'content-type: application/json' \ -d '{ "email":"[email protected]", "password":"at-least-8-chars", "turnstile":"<captcha token>", "fingerprint":"<device hash>" }'The response is {"token":"eyJ…","user_id":"uuid"}. Store the JWT for dashboard calls. A verification email is sent when email is configured; verification does not block API calls.
Signup is gated
400. Captcha is required when configured, and one account per person (canonical email) plus one per IP and device per day are enforced. See the signup gate.2. Mint an API key
curl -X POST https://api.relayrouter.org/keys \ -H "Authorization: Bearer $JWT" \ -H 'content-type: application/json' \ -d '{"name":"default"}'The full secret is returned once as sk-or-v1-…. Only a 12-character prefix and a SHA-256 digest are stored. Save it in your secret manager; it cannot be fetched again.
3. List models
The catalog is public and needs no authentication. Private models are excluded.
curl https://api.relayrouter.org/v1/models4. Make a request
curl -X POST https://api.relayrouter.org/v1/chat/completions \ -H "Authorization: Bearer $RELAY_API_KEY" \ -H 'content-type: application/json' \ -d '{ "model": "deepseek-v4.1-flash-1017", "messages": [{ "role": "user", "content": "hi" }] }'5. Top up
Create an OxaPay invoice and open the returned payment_url. Credit is applied by the webhook, or by calling /deposits/{id}/sync if the callback is slow.
curl -X POST https://api.relayrouter.org/deposits \ -H "Authorization: Bearer $JWT" \ -H 'content-type: application/json' \ -d '{"amount_usd":10}'Balance gates
402 means the balance is zero or cannot cover the reservation. A 403 with "account token quota exhausted" means the account token cap was reached. Both are resolved from the billing page.