TD RouterDocumentation

Documentation

Everything you need to integrate TD Router into your application.

Quick Start

Get your first API call running in under 5 minutes.

1

Create an Account

Sign up for a free account and get $5 in credits to start.

2

Generate API Key

Go to your dashboard and create an API key.

3

Make Your First Call

Use the OpenAI-compatible endpoint with your preferred SDK.

Get API Key

SDK Examples

TD Router is fully compatible with the OpenAI SDK. Switch providers by changing the model name.

from openai import OpenAI

client = OpenAI(
    base_url="https://api.tdrouter.com/v1",
    api_key="sk-td-your-api-key",
)

response = client.chat.completions.create(
    model="anthropic/claude-opus-4",
    messages=[
        {"role": "user", "content": "Hello!"}
    ]
)

print(response.choices[0].message.content)

TD Router is 100% compatible with the OpenAI SDK. No code changes required — just update your base URL and API key.

API Reference

Complete reference for all endpoints and parameters.

POST/v1/chat/completionsCreate a chat completion
GET/v1/modelsList available models
POST/v1/completionsCreate a text completion
POST/v1/embeddingsCreate embeddings

Guides

Authentication

How to authenticate your API requests securely.

Model Selection

Choose the right model for your use case and budget.

Streaming

Implement real-time streaming responses in your app.

Error Handling

Best practices for handling errors and retries.