> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ironlabs.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Make your first routed call in under 5 minutes.

<Note>
  **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.
</Note>

## 1. Get your IronLabs API key

[Create an account](https://app.ironlabs.ai) or [log in](https://app.ironlabs.ai), then grab your API key from the **Settings → API Keys** page.

![Creating an IronLabs API key](https://80590et6gj.ufs.sh/f/0yZFq4Oo3gtaZm0rpU35i7VOd4auortX9eqkPApNIGfKQ3g0)

<Info>
  Treat your API key like a password. Never commit it to source control or expose it in client-side code.
</Info>

## 2. Install the SDK

<CodeGroup>
  ```bash Python theme={null}
  pip install ironlabs
  ```

  ```bash Node.js theme={null}
  npm install ironlabs
  ```
</CodeGroup>

## 3. Make your first routed call

<CodeGroup>
  ```python Python theme={null}
  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)
  ```

  ```typescript Node.js theme={null}
  import { IronLabs } from 'ironlabs';

  const client = new IronLabs({
    apiKey: process.env.IRONLABS_API_KEY,
  });

  const result = await client.completions.create({
    messages: [{ role: 'user', content: 'What is the golden ratio?' }],
    llmProviders: [
      { provider: 'openai',    model: 'gpt-4o-2024-05-13' },
      { provider: 'anthropic', model: 'claude-3-5-sonnet-20240620' },
      { provider: 'google',    model: 'gemini-1.5-pro-latest' },
    ],
    tradeoff: 'latency',
  });

  console.log('Provider:', result.provider);
  console.log('Model:   ', result.model);
  console.log('Output:  ', result.content);
  ```
</CodeGroup>

### What you should see

```text theme={null}
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:

| Tradeoff    | What it optimizes   | Typical picks                               |
| ----------- | ------------------- | ------------------------------------------- |
| `"latency"` | Time-to-first-token | Smaller, faster models (Haiku, Flash, Mini) |
| `"cost"`    | \$ per 1K tokens    | Cheapest model that satisfies your task     |
| `"quality"` | Benchmark score     | Largest, most capable model                 |

## Next steps

<CardGroup cols={2}>
  <Card title="Routing Lifecycle" icon="diagram-project" href="/refinery/essentials/routing-lifecycle">
    See exactly what happens between request and response.
  </Card>

  <Card title="Custom Router" icon="route" href="/refinery/essentials/custom_router">
    Train a router on your own data instead of using a pre-trained one.
  </Card>

  <Card title="Fallback Models" icon="shield-halved" href="/refinery/essentials/model-select">
    Configure automatic retries across providers.
  </Card>

  <Card title="API Reference" icon="code" href="/refinery/api-reference/endpoint/completions">
    Every endpoint, every field.
  </Card>
</CardGroup>
