Relay

Unified API proxy for multiple AI providers. Use your own API keys.

Supported Providers

ProviderBase URLKey Header
OpenAIhttps://YOUR_DOMAIN/openai/Authorization
Google Geminihttps://YOUR_DOMAIN/gemini/x-goog-api-key
Anthropic Claudehttps://YOUR_DOMAIN/claude/x-api-key
Groqhttps://YOUR_DOMAIN/groq/Authorization
Coherehttps://YOUR_DOMAIN/cohere/Authorization
xAI (Grok)https://YOUR_DOMAIN/xai/Authorization
Mistralhttps://YOUR_DOMAIN/mistral/Authorization
GitHub AIhttps://YOUR_DOMAIN/github/Authorization

Usage

Replace the original API base URL with this service's URL. Pass your API key in the appropriate header.

Example: OpenAI

curl https://YOUR_DOMAIN/openai/v1/chat/completions \
  -H "Authorization: Bearer YOUR_OPENAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "gpt-4", "messages": [{"role": "user", "content": "Hello"}]}'

Example: Claude

curl https://YOUR_DOMAIN/claude/v1/messages \
  -H "x-api-key: YOUR_ANTHROPIC_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{"model": "claude-3-opus-20240229", "max_tokens": 1024, "messages": [{"role": "user", "content": "Hello"}]}'