Skip to main content
Renamed to ironlabs (June 15, 2026). Both Node and Python packages are now ironlabs. Migrating from ironaai / ironlabsai? Update your install + import. Your existing API key keeps working — the SDK accepts IRONLABS_API_KEY (preferred), and falls back to IRONLABS_AI_API_KEY / IRONAAI_API_KEY with a one-time deprecation warning.

1. Get your IronLabs API key

Create an account or log in, then grab your API key from the Settings → API Keys page. Creating an IronLabs API key
Treat your API key like a password. Never commit it to source control or expose it in client-side code.

2. Install the SDK

pip install ironlabs

3. Make your first routed call

from ironlabs import IronLabs

client = IronLabs(api_key="your_ironlabs_api_key")

response = client.completions.create(
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "Explain the golden ratio in two sentences."},
    ],
    models=[
        "openai/gpt-4o",
        "anthropic/claude-3-5-sonnet-20240620",
        "google/gemini-1.5-pro-latest",
    ],
    tradeoff="latency",
)

print("Provider:", response.provider)
print("Model:   ", response.model)
print("Output:  ", response.content)

What you should see

Provider: anthropic
Model:    claude-3-5-sonnet-20240620
Output:   The golden ratio (≈1.618) is...
If provider and model are populated, the router worked — IronLabs picked a candidate from your models list, called it, and returned the response in one round trip.

4. Try a different tradeoff

Change tradeoff and watch the selected model change:
TradeoffWhat it optimizesTypical picks
"latency"Time-to-first-tokenSmaller, faster models (Haiku, Flash, Mini)
"cost"$ per 1K tokensCheapest model that satisfies your task
"quality"Benchmark scoreLargest, most capable model

Next steps

Routing Lifecycle

See exactly what happens between request and response.

Custom Router

Train a router on your own data instead of using a pre-trained one.

Fallback Models

Configure automatic retries across providers.

API Reference

Every endpoint, every field.