Low latency keeps the interface feeling direct, allowing users to stay in flow...
Ship AI products without rebuilding your stack.
Compare frontier models, control spend, and move between providers through one production-minded API.
Write a concise launch announcement for an AI research workspace.
Meet the workspace where your team can compare frontier models, turn stronger prompts into production APIs, and understand every token spent.
/v1/chat/completions200Go from prompt to production without changing tools.
Explore models side by side, promote the winner to your application, and watch usage from the same control plane.
- 01Compare
Test one prompt against multiple models.
- 02Connect
Use one OpenAI-compatible endpoint.
- 03Operate
Track cost, keys, and request health.
Explain why low latency matters for an AI product.
Fast responses reduce friction between a user's intent and the product's result...
The control plane your model layer was missing.
Explore, operate, and meter every request from a focused workspace.
Compare in seconds
Run one prompt across frontier models. Compare quality, latency, tokens, and cost before you commit.
See every dollar
Clear metering without a second billing stack.
Control access instantly
Hashed credentials, instant revocation, and a durable audit trail.
rr_live_••••••K8Q2ActiveStream-ready by default
OpenAI-compatible requests and server-sent events across providers.
Your next model is one field away.
Create a workspace, add prepaid credit, and send your first streamed completion.
Welcome back
Usage, credentials, and workspace status at a glance.
Redeem a reseller coupon to get started.
Your coupon adds prepaid API credits and unlocks keys and Playground access instantly.
Usage overview
Daily spend across the last seven days.
Recent requests
Latest metered completions across your API keys and Playground.
Playground
Run one prompt across up to three models and compare quality, speed, and cost.
Sign in to use Playground
Test and compare frontier models from one workspace.
Build your prompt
Model responses
Select up to three models.
Models
Compare context windows and transparent per-token pricing.
| Model | Context | Input / 1M | Output / 1M | 30-day stability |
|---|
API keys
Create and revoke credentials for your applications.
Keys are shown once when created. Never expose them in client-side code or public repositories.
Your keys
Use a separate key for each environment or application.
Redeem coupon
Add prepaid API credits from an authorized Relay reseller.
Enter your coupon code
Credits are added immediately. A first redemption also activates your workspace.
Purchased from a reseller? Your code can only be redeemed up to its configured limit.API documentation
Everything you need to send your first request and ship with Relay.
Your first request
Relay exposes an OpenAI-compatible Chat Completions API. Create a key, set the base URL, and send a message using any enabled model.
Create an API keyGenerate a key in the console and store it securely.
Choose a modelCopy a model ID from the catalog.
Send a requestCall the chat completions endpoint.
/v1curl /v1/chat/completions \
-H "Authorization: Bearer $RELAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-5.5","messages":[{"role":"user","content":"Hello"}]}'Authentication
Send your Relay API key in the Authorization header on every request. Keys are shown once when created; use a separate key for each environment and never expose one in browser code.
Authorization: Bearer $RELAY_API_KEYRequest format
Requests use JSON. model and messages are required; generation controls are optional.
string · requiredAn enabled model ID from the catalog.
array · requiredConversation messages with a role and content.
number · optionalSampling temperature from 0 to 2.
integer · optionalMaximum tokens to generate.
boolean · optionalReturn server-sent events when true.
Use the JavaScript SDK
Relay is compatible with the OpenAI SDK. Point the client at your Relay base URL and keep the API key on the server.
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.RELAY_API_KEY,
baseURL: "/v1"
});
const response = await client.chat.completions.create({
model: "gpt-5.5",
messages: [{ role: "user", content: "Hello" }]
});
console.log(response.choices[0].message.content);Agent harnesses
Use Relay directly from coding agents. The gateway translates Anthropic Messages and native Gemini GenerateContent requests—including streaming, images, function calls, and tool results—into the same metered Relay model routes.
export ANTHROPIC_BASE_URL=""
export ANTHROPIC_AUTH_TOKEN="$RELAY_API_KEY"
export ANTHROPIC_MODEL="claude-opus-4-6"
export ANTHROPIC_SMALL_FAST_MODEL="claude-opus-4-6"
claudeexport GEMINI_API_KEY="$RELAY_API_KEY"
export GOOGLE_GEMINI_BASE_URL=""
gemini -m gemini-3.5-flashReplace the example model with an exact enabled ID from the Models catalog. Claude Code uses /v1/messages; Gemini CLI uses native /v1beta endpoints.
Streaming responses
Set stream to true to receive server-sent events. Read each data: frame in order and stop when the stream emits [DONE].
curl -N /v1/chat/completions \
-H "Authorization: Bearer $RELAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-5.5","messages":[{"role":"user","content":"Hello"}],"stream":true}'The final usage block records input and output tokens so prepaid credit is charged against actual usage.
Limits and reliability
Limits protect workspace credit and gateway availability. Read the response headers and use exponential backoff with jitter after a 429.
60/minRequests per API key5Concurrent requests per user8,192Maximum output tokens100Messages per requestRelay temporarily reserves the maximum estimated request cost, then refunds the difference after final token usage is known.
Errors
Relay returns standard HTTP status codes and a JSON error object with a human-readable message.
400Invalid request401Missing or invalid key402Insufficient credit429Rate limit reached5xxGateway or provider errorChoose a model
Use the exact model ID shown in the Models catalog. Pricing, context limits, and availability are shown there; the request format remains the same across providers.
Admin console
Manage coupons, users, models, and platform access.