Skip to content

Cloud Providers & Accounts

Lattis can route to remote providers alongside your local models. Connect an account and its provider’s models appear in GET /v1/models next to the local ones; pass a model id like claude-opus-4-8 or gpt-5.5 to use it.

Requests are translated between the OpenAI, Anthropic, and Responses formats as needed, so a client speaking either dialect can use any connected model.

Provider Auth Notes
Anthropic Subscription (OAuth) or API key Claude models.
OpenAI / Codex Subscription (OAuth) or API key GPT-5 family and Codex models.
xAI API key or experimental Grok Build subscription Account-scoped Grok text models; Responses and Chat Completions. Subscription plans can include paid additional usage.
OpenRouter API key OpenAI-compatible aggregator; many vendors behind one key.
OpenCode API key OpenCode Go, Go Plus, or Console pay-as-you-go. Model ids start with opencode-go/ or opencode/.
Amazon Bedrock API key (bearer token) Per-account region; served on /v1/chat/completions.

Each provider’s catalog supplies model names, pricing, and context windows where available. Newly listed models may be routable without a Lattis update, provided the provider integration supports them.

Cloud access is organized into accounts, managed under Settings → Accounts. You can add more than one account per provider — for example a personal Claude Pro subscription and a work Console key side by side.

Each account authenticates one of two ways, chosen when you add it (and switchable later with Re-authenticate):

  • Subscription — sign in through the browser with a Claude Pro/Max or ChatGPT Plus/Pro account (OAuth), or use experimental Grok Build device sign-in.
  • API key — paste a Console API key for the provider.

Accounts live in a single ordered list (with an optional per-project order). For each request, Lattis walks the list top-to-bottom and uses the first connected account whose provider can serve the requested model. Drag to reorder in Settings → Accounts; the order persists.

If a chosen account errors, Lattis fails over to the next account that can serve the model — across providers — and, on exhaustion, shows the full chain of what was tried and why each option failed. Pin a project to a specific subset (and order) of accounts from that project’s settings screen; unpinned projects use the global order.

Connect a Claude Pro/Max subscription via OAuth, or paste a Console API key from the Anthropic Console. Once an account is connected, Claude models (for example claude-opus-5-5, claude-opus-4-8, claude-sonnet-4-6, claude-haiku-4-5) are routable. The daemon advertises each model’s real context window in GET /v1/models.

Some newer Claude models reject request shapes that older models accept. The daemon rewrites them before the request leaves your machine, also on Amazon Bedrock and OpenRouter:

  • On Opus 5.5, Fable 5 and 5.1, and Mythos 5 and 5.1, thinking is always on. thinking: {type: "enabled", budget_tokens: N} becomes thinking: {type: "adaptive"}, and thinking: {type: "disabled"} is removed.
  • On Opus 5.5, Fable 5.1, and Mythos 5.1, a forced tool_choice (any, or tool with a name) becomes auto. The model can then answer without a tool call.

A Claude Pro/Max subscription can also be connected without a browser on the Lattis machine, using a long-lived token from claude setup-token. That is the supported route for a remote or headless host — see Headless & Remote Hosts.

Connect a ChatGPT subscription via OAuth — which uses the Codex Responses backend, including the Codex Responses WebSocket transport — or paste a standard OpenAI API key. GPT-6, GPT-5 family, and Codex models become routable (for example gpt-6-astra, gpt-6-sol, gpt-6-luna, gpt-5.5).

Chat Completions accepts tools on GPT-6 Astra never, and on GPT-6 Sol and Luna only when reasoning_effort is "none". On an API key, the daemon sends every other GPT-6 chat request with tools to the Responses API instead. It translates the reply back to the format your client uses. It also changes these parameters, which the GPT-6 models reject:

  • reasoning_effort: "minimal" becomes "low". On Astra, which does not accept "none", "none" also becomes "low".
  • temperature, top_p, logprobs, and top_logprobs are removed, unless the model is Sol or Luna and the effort is "none".

The subscription sign-in needs a browser redirect back to the machine running the daemon, so on a headless host an API key is the practical option; Headless & Remote Hosts covers why and what the alternatives are.

Add an xAI account with an API key from the xAI Console. Lattis checks that account’s key against xAI’s authenticated model catalogs and lists text models and aliases with published context limits. Models without a published context limit are omitted. Discovery updates when the catalog refreshes; there is no fixed model list in Lattis.

Chat Completions and Responses use the selected account’s key. Anthropic Messages requests are translated to Chat Completions. Native Responses preserves reasoning items and tools, requests replayable encrypted reasoning, and sets store: false; clients must carry their conversation history. This setting does not change xAI’s account-level retention or training policy.

Usage estimates include cached input and inclusive long-context pricing tiers. An xAI API key uses metered API billing. The Grok Build CLI can use this account or any other compatible provider connected to Lattis.

Grok Build subscriptions are experimental. Choose Subscription when adding an xAI account. The daemon needs the official grok 1.0.70 executable. Lattis starts its device sign-in in a private temporary home, returns a verification URL, and checks the authenticated identity and Build access before connecting. The URL can be opened on another machine; the official CLI may also open the daemon host’s browser. Cancellation terminates that account’s helper. Existing ~/.grok credentials are not imported or modified.

Subscription models come from that account’s Grok proxy catalog. Responses and Chat Completions backends are supported; other backends are omitted. Requests on the three Lattis API surfaces are translated to the selected model’s wire. Identity, team policy, entitlement and consent gates are respected. Complete any required notice in the official Grok app before reconnecting. Managed enterprise authentication requires administrator review before Lattis can isolate it.

Included allowances may be shared with other products. Additional usage can be charged to a prepaid balance or another vendor-managed billing arrangement. Lattis shows allowance and spend fields only when supplied by xAI, with an observation time; unavailable fields remain unknown. OAuth does not establish zero cost. Lattis never purchases or tops up credits. A routing order that also includes metered accounts can fall back to those accounts under the existing routing policy; scope a session to the accounts you intend to use.

Lattis owns refresh credentials centrally and does not distribute them to agents or history bundles. A lost refresh reply or failed credential save can require reconnection, since Lattis will not replay a possibly consumed grant. Live subscription sign-in, entitlement and billing have not been verified with a paid account; this path is intended for dev-channel subscriber testing.

Paste an OpenRouter API key. OpenRouter is an OpenAI-compatible aggregator, so its catalog spans many vendors behind one credential; the models it serves appear in GET /v1/models and route via chat-completions translation.

Paste an OpenCode Console API key and choose the plan:

  • OpenCode Go ($10 a month) or OpenCode Go Plus ($40 a month) — a flat-rate plan. Model ids start with opencode-go/, for example opencode-go/kimi-k3.
  • Console pay-as-you-go — metered credits. Model ids start with opencode/, for example opencode/kimi-k3.

If your own OpenCode already has the key, click Import from OpenCode. Lattis reads the key only on that click, from opencode auth export (OpenCode V2) or from ~/.local/share/opencode/auth.json (OpenCode V1), and names the source under the button. Only an API key is imported, never an OpenCode sign-in. The key is saved when you add the account.

The catalog comes from models.dev, which lists the wire of each model. Lattis sends each model on its own wire: OpenAI chat completions, OpenAI Responses, or Anthropic Messages. A client that speaks another wire gets a translation. Models on the Google wire are not listed yet.

When you save the key, Lattis sends one request of one output token to the lowest-cost model to check it. If OpenCode rejects the key, the account card shows the error.

Go limits the dollar use of each model over three rolling windows: 20% of the monthly allowance in 5 hours, 50% in a week, and 100% in a month. OpenCode does not report this use, so Lattis estimates it from the cost of each Go request it routes. Spend made with the same key outside Lattis is not in the estimate. The quota strip shows the model nearest its limit in each window.

When a Go model reaches its limit, or Go answers with a 429, the next turn goes to the next account that serves the model: Console credits for the same model, or another account in your priority order. Go stays the last resort for that model until the window resets. Other Go models keep their place.

With automatic subscription ordering on, a Go account comes before a Console account, so a model that both plans offer uses the flat-rate plan first.

Lattis is a proxy here, not an agent. Each request keeps the calling agent’s own identity: its User-Agent and its native session header (x-claude-code-session-id for Claude Code, session_id and originator for Codex, x-opencode-session for OpenCode). Lattis does not add an identity of its own, and it does not fill in a missing header. Sawyer, Lattis chat, and Lattis Agents send their own User-Agent and a stable x-opencode-session on every request.

Paste a Bedrock API key (bearer token) and set the account’s region (defaults to us-east-1). Lattis speaks the Bedrock Converse API and translates to and from the internal format, so clients use Bedrock models with no changes. Served on /v1/chat/completions (streaming and non-streaming); model listing comes from Bedrock’s inference profiles with a curated fallback.

A provider’s models can be listed in GET /v1/models even when no account is connected, allowing apps that provide their own credential to use passthrough. A connected Lattis account, when present, takes precedence over an app-supplied credential for that provider. xAI requires a connected Lattis account; client credentials are never used as an xAI fallback.

The GUI wraps these, but they’re scriptable via the Control API. <account_id> is a Lattis account id: the GUI assigns one per account, and for raw API use any stable string works — the daemon creates the account entry on first use.

Terminal window
# Store a Console API key on a specific account
curl -X POST http://127.0.0.1:5288/control/remote/anthropic/account/<account_id>/key \
-H 'Content-Type: application/json' -d '{"key":"sk-ant-..."}'
# Begin an OAuth connection for an account (open the returned URL in a browser)
curl -X POST http://127.0.0.1:5288/control/remote/openai/account/<account_id>/connect
# Disconnect an account
curl -X POST http://127.0.0.1:5288/control/remote/anthropic/account/<account_id>/disconnect

Cloud credentials are stored in remote_auth.json in the data directory, written with 0600 permissions on Unix. See Configuration & Storage.

Continue to Usage & Cost to see how spend on paid cloud models is tracked.