Docs / API Reference
API Reference
All RelayRouter endpoints share the same base URL and authentication scheme. Click an endpoint for full parameter documentation and examples.
#Base URL
https://relayrouter.io/v1
#Authentication
Pass your API key as a bearer token in every request:
| Header | Value |
|---|---|
Authorization | Bearer YOUR_API_KEY |
Content-Type | application/json |
Get your API key from the API Keys page.
#Endpoints
POSTPOSTGET
Chat Completions
/v1/chat/completions
OpenAI-compatible LLM chat
Generate Image
/v1/images/generations
OpenAI-compatible image generation
List Models
/v1/models
Models available to your key
POST
Messages (Anthropic protocol)
/v1/messages
Anthropic-compatible chat, works with the official Anthropic SDK (base_url = site root)
POST
Generate Content (Gemini protocol)
/v1beta/models/{model}:generateContent
Gemini-compatible chat in Google API style
#Error codes
| Status | Meaning |
|---|---|
400 Bad Request | Missing or invalid parameters |
401 Unauthorized | Missing or invalid API key |
403 Forbidden | Quota or permission issue |
404 Not Found | Unknown model ID or task ID |
429 Too Many Requests | Rate limit exceeded |
5xx Server Error | Upstream or gateway error, retry with back-off |
See Error Codes for details and retry recipes.