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

# ShuttleAI Auto

> Our intelligent request router that automatically picks the best model for every task.

## What is ShuttleAI Auto?

**ShuttleAI Auto** (`shuttleai`) is our proprietary smart routing model. Instead of you choosing which model to use for each request, ShuttleAI Auto analyzes your prompt and dynamically routes it to the best model for the task.

Whether it's a quick question, a complex coding task, or a long-form creative piece — ShuttleAI Auto picks the right model automatically.

```python theme={null}
response = client.chat.completions.create(
    model="shuttleai/auto",  # Let Auto handle it
    messages=[{"role": "user", "content": "Write a Python function to merge two sorted lists."}]
)
```

## Why use ShuttleAI Auto?

<CardGroup cols={2}>
  <Card title="Most cost-efficient" icon="piggy-bank">
    Auto optimizes for the best balance of quality and cost. You get great results without overpaying for a frontier model when a lighter one would do.
  </Card>

  <Card title="No model selection needed" icon="brain">
    Stop wondering whether to use GPT-5.2 or Claude — Auto makes that decision for you based on the actual task.
  </Card>

  <Card title="Always up to date" icon="arrows-rotate">
    As we add new models and improve routing logic, Auto gets better automatically. No code changes needed on your end.
  </Card>

  <Card title="400K context" icon="text-width">
    Supports up to 400K tokens of context, so it can handle even the longest documents and conversations.
  </Card>
</CardGroup>

## How it works

ShuttleAI Auto analyzes the characteristics of your request — including complexity, length, domain, and required capabilities — then routes it to the most appropriate model available for your plan tier.

<Note>
  ShuttleAI Auto requires the **Basic** plan (\$10/mo) or higher.
</Note>

## Capabilities

| Feature                 | Supported   |
| ----------------------- | ----------- |
| Text generation         | ✅           |
| Tool / function calling | ✅           |
| Streaming               | ✅           |
| System messages         | ✅           |
| Context window          | 400K tokens |

## When to use Auto vs. a specific model

| Use case                             | Recommendation                                    |
| ------------------------------------ | ------------------------------------------------- |
| General-purpose tasks                | **ShuttleAI Auto** — best cost-efficiency         |
| You need a specific model's behavior | Use that model directly (e.g., `claude-opus-4.6`) |
| Maximum quality, cost doesn't matter | Pick a frontier model like `claude-opus-4.6`      |
| Free tier usage                      | Use `gpt-oss-20b` or `gpt-oss-120b` directly      |

## Example

<CodeGroup>
  ```python Python theme={null}
  from openai import OpenAI

  client = OpenAI(
      api_key="shuttle-xxx",
      base_url="https://api.shuttleai.com/v1"
  )

  # ShuttleAI Auto handles model selection
  response = client.chat.completions.create(
      model="shuttleai/auto",
      messages=[
          {"role": "system", "content": "You are a senior software engineer."},
          {"role": "user", "content": "Review this code and suggest improvements:\n\ndef fib(n):\n  if n <= 1: return n\n  return fib(n-1) + fib(n-2)"}
      ]
  )

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

  ```javascript Node.js theme={null}
  import OpenAI from "openai";

  const client = new OpenAI({
    apiKey: "shuttle-xxx",
    baseURL: "https://api.shuttleai.com/v1",
  });

  const response = await client.chat.completions.create({
    model: "shuttleai/auto",
    messages: [
      { role: "system", content: "You are a senior software engineer." },
      { role: "user", content: "Review this code and suggest improvements:\n\ndef fib(n):\n  if n <= 1: return n\n  return fib(n-1) + fib(n-2)" },
    ],
  });

  console.log(response.choices[0].message.content);
  ```
</CodeGroup>

<Tip>
  **Getting started?** Just use `"shuttleai/auto"` as your model everywhere. You'll get great results at the lowest cost, and you can always switch to a specific model later if needed.
</Tip>
