Docs · Models and keys
  1. Getting started
  2. Building
  3. Iterating
  4. Memory
  5. Models and keys
  6. Gateway
  7. Self-hosted runtime
  8. Usage and billing
  9. Deploy a token
  10. FAQ
Models and keys

Models and keys

You can let Horai choose the model, or pin one. Either way, if you bring your own provider key, your calls run on it and nothing here is debited.

Picking a model

The composer shows the current route as a small chip. Open the model picker and you get a single list grouped by provider, with the price per million tokens next to each model.

Two ways to choose:

  • Auto — the router picks the cheapest model that can actually do the task in front of it. This is the default.
  • Pin one — name a model and the router tries it first.

A model with no published price never appears in the list and never runs. Horai does not spend your balance at a rate it cannot state.

What "cheapest capable" means

Auto is not "cheapest model". It is the cheapest model that has the capability the current task needs, and different steps of one job need different things:

Capability Needed for
chat replying in the thread
parse reading your sentence into a deliverable
vision looking at an image you attached
planner running the build loop, which requires tool calling

A model that cannot call tools is never chosen to run a build, however cheap it is. If nothing available can do the task, you get a stated error naming what is missing rather than a quietly weaker model.

Bringing your own key

Add keys in Settings → Keys for the providers you already pay:

  • Anthropic
  • DeepSeek
  • Groq
  • Mistral
  • OpenAI
  • OpenRouter

With a key stored, every route that provider can serve runs on your key, at your provider's own rate, and nothing is debited here — not for chat, not for builds. The usage is still recorded so your own history stays complete.

Anthropic is available on your own key only. There is no shared Anthropic key, so Claude models appear in your picker once you add an Anthropic key and not before.

What a key unlocks depends on what that provider actually offers. A key for a provider with no vision model does not give you vision — and the answer you get is an error saying so, not a substitute.

How keys are stored

A provider key is encrypted at rest with AES-256-GCM, under a key-encryption key that lives outside the database.

Once saved, a key is never shown again. Settings displays it as a badge — the provider name and the fact that a key is present — and nothing more. There is no reveal button, because there is nothing to reveal: what is stored is ciphertext.

Delete a key and its routes stop being available to you immediately.

The BYOK badge

Where a route runs on your key, the model name carries a small lime dot and the words on your key. That marker is your confirmation that the call was not billed here, and it appears in the composer chip and on the cost lines in a job.

Next

Gateway is the same router with an OpenAI-compatible endpoint in front of it.