Agent Router Service quickstart
This 10-minute walkthrough takes you from sign-up to your first routed AI request on the hosted Agent Router Service, with no installation and nothing to deploy. By the end you will have an account, an API key, the OpenAI-compatible base URL, a working request in at least one language, and a verified entry in Request Logs. The Service is Tetrate-hosted: sign up, add a key, and route requests through the gateway, which handles authentication, routing, fallback, and observability transparently. It exposes a single OpenAI-compatible endpoint, so pointing an existing agent or SDK at it is a base-URL and key change rather than a rewrite.
The Agent Router Service is the self-serve, Tetrate-hosted tier for individual developers. Everything in this guide happens at router.tetrate.ai; there is no cluster to install. For the enterprise, dedicated-tenant experience, see the Dev Console quickstart.
Step 1: create an account
- Go to router.tetrate.ai/sign-in.
- Sign up with a GitHub or Google account. Signing up with a business email grants a small starting credit balance for evaluation.
- You land on the dashboard, which shows your credit balance, recent usage, and the entry points for API keys and the Playground.
Step 2: understand pricing and credits
The Service is pay-as-you-go. Each request is charged at the underlying model's cost plus a small service fee, drawn down from a prepaid credit balance that can be set to replenish automatically. No commitment or subscription is required to evaluate.
- Open the billing area from the dashboard to view your current balance.
- Optionally, add credits or enable auto-replenishment so an evaluation is not interrupted when the starting balance runs low.
New accounts created with a business email start with free evaluation credit. Costs are itemized per request in Request Logs (Step 5), so the exact spend for each call is visible as it happens.
Step 3: create an API key
API keys authenticate your application's requests to the gateway. Each key routes through the Service with its own usage tracking and can be pointed at different routing strategies. For this quickstart, create a basic key with default settings.
- In the dashboard, open the API Keys page.
- Click Add API Key and enter a descriptive name (for example,
my-explore-key). Choose a name that identifies the application or workload the key will serve; keys are identified by name in logs and usage reports. - Create the key, then copy the generated value immediately and store it in a secure location (a secrets manager or environment variable). This is the only time the key value is displayed.
API keys grant the bearer the ability to route requests through the gateway and consume credit. Store your key securely; do not commit it to source control or include it in logs or error messages.
Step 4: find your base URL
The Service exposes a single OpenAI-compatible endpoint. Your application calls this base URL instead of calling AI providers directly, and the gateway authenticates the request, applies the routing strategy for the key, translates formats when routing to a different provider, and returns a normalized response.
The base URL for the Service is:
https://api.router.tetrate.ai/v1
Append the appropriate path for the API format you intend to use:
| Format | Path | Description |
|---|---|---|
| OpenAI Chat Completions | /v1/chat/completions | Most widely supported format; compatible with all OpenAI-compatible SDKs and agent frameworks |
| OpenAI Responses | /v1/responses | Newer OpenAI Responses API with a simplified interface |
| Anthropic Messages | /v1/messages | Anthropic native format for Claude models |
For detailed examples of each format including streaming, see Gateway APIs.
Step 5: make your first request
Replace YOUR_API_KEY with the key you created in Step 3. The examples below call gpt-4o, but you can substitute any model available to your account. To discover models programmatically for the same key, call GET /v1/models; see Models API.
The only difference between calling the gateway and calling a provider directly is the base_url (or the curl URL). All other parameters, response formats, and SDK behaviours are identical.
Using curl
curl https://api.router.tetrate.ai/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o",
"messages": [{"role": "user", "content": "Hello, world!"}]
}'
Using Python
from openai import OpenAI
client = OpenAI(
base_url="https://api.router.tetrate.ai/v1",
api_key="YOUR_API_KEY"
)
response = client.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": "Hello, world!"}]
)
print(response.choices[0].message.content)
Streaming with curl
curl https://api.router.tetrate.ai/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o",
"messages": [{"role": "user", "content": "Hello, world!"}],
"stream": true
}'
Streaming with Python
from openai import OpenAI
client = OpenAI(
base_url="https://api.router.tetrate.ai/v1",
api_key="YOUR_API_KEY"
)
stream = client.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": "Hello, world!"}],
stream=True
)
for chunk in stream:
content = chunk.choices[0].delta.content
if content:
print(content, end="", flush=True)
Using the Playground
The Playground lets you test model routing interactively without writing any code, useful for comparing models or verifying routing behaviour before integrating into an application.
- Open the Playground from the dashboard.
- Select a model from the dropdown. The list shows all models available to your account.
- Type a message and send it.
- View the response alongside token usage, latency, and the upstream provider that served the request.
Step 6: check your request logs
Every request the gateway processes is recorded in Request Logs. This is your primary tool for debugging, auditing, and analysing cost.
- Open Request Logs from the dashboard.
- Confirm your request appears with the model name, upstream provider, token counts, estimated cost, and total latency.
- Click any row to view the full request and response payloads, including which provider was selected and whether any fallback attempts were made.
Evaluation checkpoint
- Created an account on the Agent Router Service
- Reviewed the credit balance and pricing
- Created an API key and stored it securely
- Made a successful request via curl, Python, or the Playground
- Confirmed the request appears in Request Logs with provider, latency, and token details
Where to go next