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

# Functions

> Decouple what your application asks for from which model serves it, so you can swap models without changing code.

A function is the gateway's term for a *task alias* — a stable name that stands in for "whatever model currently serves this task." It exists to break a coupling: normally the `model` field in a request does double duty, naming both what the caller wants ("summarize this") and which model answers ("OpenAI's `gpt-4o`"). Tie those together and changing the model behind a task means changing application code.

A task alias separates the two. Your application calls a stable name; the model behind it is configuration. Swapping `gpt-4o` for `claude-sonnet-4-6` becomes a dashboard change, not a deploy.

## How you get this today

In the to11 dashboard, you express task aliases through **named routes**. When you create a routing rule in **AI Gateway → Routing**, you give it a routing identifier and your application calls it as `route::<name>`:

```json theme={null}
{
  "model": "route::summarize",
  "messages": [
    { "role": "user", "content": "Summarize this document..." }
  ]
}
```

Behind that name you choose the routing strategy — a single model, a [weighted split](/docs/deploy/routing/weighted), a [fallback chain](/docs/deploy/routing/fallback), or an [A/B experiment](/docs/deploy/routing/experiment). Change the model or strategy behind the route and every caller using `route::summarize` follows along, with no code change on your side. See [Route by a stable name](/docs/deploy/routing/functions).

<Note>
  The gateway's lower-level functions — task aliases with advanced per-endpoint variant configurations — are managed by to11 and don't have a self-serve dashboard surface yet. For the routing customers configure themselves, use named routes and the strategies above.
</Note>

## Next steps

<CardGroup cols={2}>
  <Card title="Route by a stable name" icon="route" href="/docs/deploy/routing/functions">
    Create a named route and swap models without redeploying.
  </Card>

  <Card title="Routes" icon="shuffle" href="/docs/deploy/concepts/routes">
    How routes map a name to a strategy across targets.
  </Card>
</CardGroup>
