RelayRouterRelayRouter
HomeModelsPricingDocsGet API Key

Docs / API Keys

API Keys

API keys authenticate your requests to the RelayRouter API. Every call requires a valid key in the Authorization header.

#Create an API key

  • Open the RelayRouter console
  • Go to the API keys section and create a new key
  • Copy your new key and store it securely
Treat keys like passwords. If a key may have leaked, delete it in the console and create a new one.

#Authenticate requests

Include your API key as a bearer token in every request:

Authorization: Bearer YOUR_API_KEY

For example, with the chat completions endpoint:

terminalbash
curl https://relayrouter.io/v1/chat/completions \
  -H "Authorization: Bearer $RELAYROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-v4-flash",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

The same key works across every endpoint. Any OpenAI-compatible tool also accepts it: set the base URL to https://relayrouter.io/v1 (keep the /v1 suffix) and paste your key.

#Security best practices

  • Never share your API key or commit it to version control
  • Store it in an environment variable: export RELAYROUTER_API_KEY="..."
  • Add any .env files containing keys to .gitignore
  • Rotate keys periodically: delete old keys and create new ones
  • Use separate keys for development and production
  • Monitor usage in the console to detect unexpected activity

#Key management

Manage keys from the console:

ActionDescription
CreateGenerate new API keys as needed
DeleteRevoke keys that are no longer needed or may be compromised
View usageMonitor consumption and spend per key

#Rate limits

Standard rate limits apply per key. If you receive 429 Too Many Requests:

  • Add a short delay between requests
  • Use exponential back-off for retries
  • Contact [email protected] if you need higher limits