> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://onepin.ai/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://onepin.ai/docs/_mcp/server.

# Auto-route

> How Onepin auto-routing works — leave a language's voice_map empty and continuous benchmarks pick the model; tune the balance between performance and cost per workspace.

Onepin benchmarks TTS models continuously, per language. Auto-route uses those measurements to pick the model for each line — so you don't have to keep up with a model catalog that changes monthly.

## Turn it on

Leave a language's `voice_map` list **empty** in the [Generator](/docs/workflow/generator):

```python
node["config"] = {"voice_map": {
    "en-us": [{"voice_id": "...", "provider": "...", "model": "..."}],  # your pick
    "ko-kr": [],   # auto-route picks
}}
```

That's the whole mechanism — an empty list per language you want routed. Mix freely: pin the languages you have opinions about, route the rest.

## How the pick works

For each routed language, Onepin ranks the candidate models by a blend of two measurements:

* **Quality** — the model's measured naturalness score for that language, from continuous benchmarks.
* **Price** — the model's per-character rate, normalized against the cheapest candidate.

Your workspace's **routing preference** (dashboard → workspace settings) sets the blend:

| Preference             | What wins                                                                  |
| ---------------------- | -------------------------------------------------------------------------- |
| **Performance pick**   | Quality only — the best-sounding model for the language, whatever it costs |
| **Balanced** (default) | Quality and price weighted equally                                         |
| **Cost-efficiency**    | Price-tilted — but a quality floor keeps low-scoring models out entirely   |

The preference applies workspace-wide, to every routed line in every run. Runs started with an API key use it too — the setting itself lives in the dashboard.

## What you get at run time

Auto-route resolves a short ranked list, not just one winner — if the top model fails on a line, the next candidate steps in instead of failing the run. The run's per-line detail shows which model actually voiced each line.

## Related

* [Translate into other languages](/docs/guides/translate) — auto-route per target language
* [Voices & Models](/docs/get-started/voices-models) — what's in the catalog
* [Generator](/docs/workflow/generator) — `voice_map` in full