Skip to main content

Prerequisites

  • An each::labs API key. Grab one here if you don’t have one yet.

Getting Started

1

Get your API key

Sign up at eachlabs.ai and create an API key from Settings > API Keys.
2

Update your code

Point any OpenAI-compatible SDK to the each::labs base URL:
from openai import OpenAI

client = OpenAI(
    api_key="YOUR_EACHLABS_API_KEY",
    base_url="https://api.eachlabs.ai/v1"
)
3

Make your first request

Use the provider/model-name format to pick any model:
response = client.chat.completions.create(
    model="openai/gpt-4o",
    messages=[
        {"role": "user", "content": "What is the capital of France?"}
    ]
)

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

Switch Models Instantly

Just change the model parameter. That’s literally it. No config changes, no new SDKs, no drama:
# Use Anthropic Claude
response = client.chat.completions.create(
    model="anthropic/claude-sonnet-4-20250514",
    messages=[{"role": "user", "content": "Explain quantum computing"}]
)

# Use Google Gemini
response = client.chat.completions.create(
    model="google/gemini-2.5-pro-preview-06-05",
    messages=[{"role": "user", "content": "Explain quantum computing"}]
)

# Use DeepSeek
response = client.chat.completions.create(
    model="deepseek/deepseek-r1",
    messages=[{"role": "user", "content": "Explain quantum computing"}]
)

Streaming

Set stream: true to receive OpenAI-compatible server-sent events as tokens arrive:
stream = client.chat.completions.create(
    model="openai/gpt-4o",
    messages=[{"role": "user", "content": "Write a haiku about coding"}],
    stream=True
)

for chunk in stream:
    content = chunk.choices[0].delta.content if chunk.choices else None
    if content:
        print(content, end="")
To include streamed token usage when it is available, pass stream_options={"include_usage": True} in Python or stream_options: { include_usage: true } in TypeScript.

Advanced Features

LLM Router comes with some nice tricks out of the box:
  • Smart Routing automatically sends requests to the cheapest or fastest provider
  • Fallbacks so your app doesn’t break when a model is having a bad day
  • Caching to save you money and time on repeated requests
  • Rate Limiting per model or per user, your call
  • Usage Analytics to keep tabs on costs, tokens, and latency

Next Steps

LLM Router Overview

The full rundown on features and supported providers.

Available Models

Browse 300+ models with pricing. Go window shopping.
Last modified on June 5, 2026