Quickstart
Fastest way to start using Routedly in any language or framework.
Routedly is a single drop-in endpoint that lets you call today’s best large-language models while keeping your existing code and development workflow intact. Point your HTTP requests at https://api.routedly.ai/v1/….
1 · Get an API key
- Sign in to the dashboard.
- Create a new Key → Copy the key. It is shown once, so store it before you close the dialog.
2 · Pick your language
Routedly speaks the OpenAI protocol, so every official OpenAI SDK works unchanged once its base URL points here.
curl -X POST https://api.routedly.ai/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ROUTEDLY_API_KEY" \
-d '{
"model": "openai-gpt-4o",
"messages": [
{"role": "user", "content": "Hello, how are you?"}
]
}'3 · Going further
- Streaming: pass
stream: trueon any request and Routedly proxies the event stream through unchanged. Streamed calls are billed on the tokens actually used, the same as any other call. - Monitoring: every call appears in the dashboard with its model, token counts and cost.
4 · FAQ
- Is Routedly compatible with the OpenAI SDK?
- Yes. Routedly speaks the OpenAI protocol. Set base_url to https://api.routedly.ai/v1 and keep the SDK you already use.
- How do I authenticate with Routedly?
- Every request takes a Bearer token in the Authorization header. Generate keys from your client dashboard.
- How is usage billed?
- Per token, against a single balance. Each model has a published per-million-token rate for input, output and cache reads.
- Which models can I call?
- Models from OpenAI, Anthropic, Google, xAI, Alibaba, DeepSeek and others through one endpoint. GET /v1/models lists everything available to your key.
Authentication
All requests require a Bearer token in the Authorization header. Generate keys from your client dashboard.
curl https://api.routedly.ai/v1/models \
-H "Authorization: Bearer sk-sr-cli-..."Keys follow the format sk-sr-cli-<id>. Keys can be scoped with spend limits and disabled at any time from the dashboard.
Chat Completions
Identical schema to OpenAI's /v1/chat/completions — works as a drop-in replacement.
curl https://api.routedly.ai/v1/chat/completions \
-H "Authorization: Bearer sk-sr-cli-..." \
-H "Content-Type: application/json" \
-d '{
"model": "anthropic-claude-sonnet-4-6",
"messages": [
{"role": "user", "content": "What is the capital of France?"}
],
"stream": false
}'import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.routedly.ai/v1",
apiKey: process.env.ROUTEDLY_API_KEY,
});
const stream = await client.chat.completions.create({
model: "openai-gpt-4o",
messages: [{ role: "user", content: "Hi" }],
stream: true,
});
for await (const chunk of stream) {
process.stdout.write(chunk.choices[0]?.delta?.content || "");
}Models endpoint
Returns the full list of models available to your key. Use the id field directly as the model parameter in requests — e.g. anthropic-claude-sonnet-4-6, openai-gpt-4o, zhipu-glm-4-6. A model ID that is not in that list is refused with a 403 — the gateway bills against its own catalog, so an upstream provider’s native name is not a valid model value.
curl https://api.routedly.ai/v1/models \
-H "Authorization: Bearer sk-sr-cli-..."