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

# Prentis One

> Let the platform pick the model for each call: across every model, or across open-weight models only.

> [!NOTE]
>
> Prentis One is rolling out gradually. Where a mode is not yet available, its model name
> answers `MODEL_NOT_FOUND` like any unknown model, and `GET /v1/models` does not list it.

Prentis One is a model name that is not one model. Send it instead of a model slug and the
platform looks at what each call is about and how hard it is, then hands it to the model best
suited to it. Nothing else about your integration changes: same base URL, same key, same
request and response shapes.

## Two modes

> [card] Prentis One
>
> `"model": "auto"` — chooses among every model your key may call, open-weight or not.
> One model answers each call, and the answer streams as usual.

> [card] Prentis One Open
>
> `"model": "auto-open"` — chooses among **open-weight models only**. On hard reasoning,
> science, visual and knowledge questions, three models answer in parallel and the platform
> keeps the best answer.

| | Prentis One (`auto`) | Prentis One Open (`auto-open`) |
| - | - | - |
| Candidates | Every model your key may call | Open-weight models your key may call |
| How a call is answered | One model; if it fails before sending anything, the next choice | Most calls: one model, as on the left. Hard questions without `tools`: three models answer, the best answer is returned |
| Streaming | Streams token by token | Streams token by token, except when three models answer: then the whole answer arrives at once (see below) |
| Reasoning effort | Yours, as you send it | Set by the platform per model; `reasoning_effort`, `reasoning` and `thinking` are ignored |
| Typical latency | That of the model chosen | Hard questions take longer: three answers plus a comparison |

Prefer a fixed model? Write its slug, as you always could. Switching Prentis One off is
changing the model name back.

## Connect

Anything that speaks the OpenAI API works: point it at `https://compute.prentis.ai/v1` and set the
model to `auto` or `auto-open`.

> [tab] Python
>
> ```python theme={null}
> import os
> from openai import OpenAI
>
> client = OpenAI(base_url="https://compute.prentis.ai/v1", api_key=os.environ["PRENTIS_API_KEY"])
> reply = client.chat.completions.create(
>     model="auto-open",
>     messages=[{"role": "user", "content": "Prove that there are infinitely many primes."}],
> )
> print(reply.choices[0].message.content)
> ```

> [tab] TypeScript
>
> ```typescript theme={null}
> import OpenAI from "openai";
>
> const client = new OpenAI({ baseURL: "https://compute.prentis.ai/v1", apiKey: process.env.PRENTIS_API_KEY });
> const reply = await client.chat.completions.create({
>   model: "auto",
>   messages: [{ role: "user", content: "Summarise this changelog in three bullets." }],
> });
> console.log(reply.choices[0].message.content);
> ```

> [tab] cURL
>
> ```bash theme={null}
> curl https://compute.prentis.ai/v1/chat/completions \
>   -H "Authorization: Bearer $PRENTIS_API_KEY" \
>   -H "Content-Type: application/json" \
>   -d '{"model": "auto", "messages": [{"role": "user", "content": "Hello"}]}'
> ```

> [tab] Coding tools
>
> Claude Code, Codex, Cursor and other coding tools that let you set a base URL and a model
> name work the same way. For tools on the Anthropic API, use the origin without `/v1`:
>
> ```bash theme={null}
> export ANTHROPIC_BASE_URL="https://compute.prentis.ai"
> export ANTHROPIC_API_KEY="$PRENTIS_API_KEY"
> export ANTHROPIC_MODEL="auto"
> ```
>
> For tools on the OpenAI API, set the base URL to `https://compute.prentis.ai/v1` and the
> model to `auto` or `auto-open`. These tools send reasoning settings on their own;
> `auto-open` ignores them rather than rejecting the call.

Your key needs the mode's name (`auto` or `auto-open`) among its allowed models.

## Choosing among models you name

| You write | What it means |
| - | - |
| `auto` / `auto-open` | Choose among every model the mode allows |
| `auto:<model>,<model>,…` / `auto-open:<model>,<model>,…` | Choose among these only |
| `auto:<model>` | Use this model, without classifying the call |

Every model you list has to be allowed for your key too. With `auto-open`, list open-weight
models only. Model slugs are on the console's **Models** page. The candidate list itself is
not published: it follows the catalogue, and a model that is listed or withdrawn enters or
leaves Prentis One without any change on your side.

## What you see in the response

The response, every stream chunk and every error name what you wrote — `auto`, `auto-open`,
or your `…:a,b` string — never the model that answered. Your usage and billing pages show
**Prentis One** or **Prentis One Open**. The one extra header is `x-router-trace-id`, the id of
the choice; quote it with `x-request-id` when you ask us why a call went where it did. See
[Routing and providers](https://docs.compute.prentis.ai/routing-and-providers.md) for why the answering model is not named.

**Conversations stay on one model** in both modes, recognised by the `x-session-affinity`
header, then `prompt_cache_key`, then the system prompt and first user message. The two modes
keep separate records: a conversation that moves from `auto` to `auto-open` starts fresh there,
so an open-weight-only conversation never inherits a closed model. When three models answered a
turn, the one whose answer was kept is the model the conversation continues on.

## When three models answer

`auto-open` sends a question to three models at once when the question is a hard reasoning,
science, visual or knowledge question and the call carries no `tools`. Each answers in full;
if they agree, the strongest model's answer is returned, and otherwise one more call compares
the answers and picks one. Only the chosen answer comes back to you.

* **Streaming arrives in one piece.** The best answer is only known once all three have
  finished, so a streamed call receives keep-alive comments (`: keepalive`) while it waits and
  then the whole answer, its usage and `[DONE]` at once. Clients that read SSE correctly need no
  change; just do not time out on the first byte.
* **If one or two of the three fail,** the answer comes from those that succeeded. Only if all
  three fail does the call fail, with `UPSTREAM_UNAVAILABLE` or `UPSTREAM_TIMEOUT`.

## Limits

* **120 seconds per upstream call.** Each attempt — and each of the three answers, and the
  comparison — gets at most 120 seconds. A model that has not finished by then counts as failed.
  Very long reasoning on the hardest questions can hit this; the overall request deadline still
  applies on top.
* **At most five upstream calls per request**, in both modes: a first choice and up to three
  standbys, or three answers and one comparison. The classification that decides the route is
  not counted. The same five-call ceiling applies to every request on the platform.

## Billing

* **Tokens** are billed at the price of each model that ran, exactly as if you had called it
  directly. When three models answer, all three answers and the comparison are billed — usually
  three to four times the cost of a single call. A call still counts as **one request**. The `usage`
  in the response counts the answer you received; the other calls appear only on your usage and
  billing pages.
* **Routing fee.** A call Prentis One had to classify carries a small fee: the classifier's
  input tokens, currently **\$0.042 per million** (a reference price that may change; you are billed at the fee in effect when each request is made). It shows as its own line under Prentis One. There is no
  fee when you name a single model with `auto:<model>`, on a tool-result turn that continues a
  conversation, or when the classifier could not answer.

For example, a 2,000-token question that `auto-open` answers with three models, each writing
1,500 tokens, and a comparison reading 6,500 tokens and writing 10 is billed as four model calls
at those models' own prices, plus 2,000 × $0.042 / 1,000,000 ≈ $0.00008 routing fee at the current reference price.

## Known limits

* Prentis One chooses for capability, not for cost or speed.
* Switching models mid-conversation can still lose prompt-cache hits and reasoning continuity.
* On `auto-open`, a question that needs `tools` is never answered by three models: it goes to
  one model, which can call your tools.

## Next

> [card] [Routing and providers](https://docs.compute.prentis.ai/routing-and-providers.md)
>
> What the platform tells you about who served a call, and what it does not.

> [card] [Usage and billing](https://docs.compute.prentis.ai/usage-and-billing.md)
>
> Where the Prentis One lines show up.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.