Princeps Sator documentation
Princeps Sator is a pay-as-you-go inference API for open models. You buy prepaid credits, point any OpenAI- or Anthropic-compatible client at one of two base URLs, and spend by the token at the rates on the price page.
The two base URLs#
Which one you set depends on the wire your tool speaks, and the only difference is the /v1:
| If your tool speaks | Base URL |
|---|---|
| OpenAI Chat Completions | https://sator-api.princep.org/v1 |
| Anthropic Messages | https://sator-api.princep.org (no /v1 — the SDK appends it) |
Every model works on both wires. A key made in the dashboard works on both too, sent as Authorization: Bearer <key> or as x-api-key: <key>.
Start here#
- Quickstart — signup to a working call in a few minutes, on either wire, in curl, Python or TypeScript.
- Set up your tool — Claude Code, OpenCode, Cursor, Cline, Roo Code, Continue, Aider, Zed: the exact file and the exact keys for each.
- API reference — request fields, response shapes, streaming frames and every error code, for both endpoints.
Pointing an AI coding agent at Sator? Give it /docs/agent-setup: a deterministic procedure it can follow without guessing. Every docs page is also served as markdown at its own address plus .md, and /llms.txt lists them all.
Getting started
- Quickstart — From signup to a working call on either wire, in curl, Python or TypeScript.
- Authentication — The key format, the two headers that carry it, and how keys are created, shown and revoked.
- Models — Every model id, with its context window and max output. Rates are on the price page.
API reference
- Chat Completions — POST /v1/chat/completions — the OpenAI wire: request fields, response shape, streaming frames.
- Responses — POST /v1/responses — the OpenAI Responses wire, served stateless: send the whole conversation every turn.
- Messages — POST /v1/messages — the Anthropic wire: required max_tokens, top-level system, named SSE events.
- List models — GET /v1/models — the catalog as a four-field OpenAI list, no key needed.
- Errors — Both error envelopes side by side, every status and code, and what to retry.
- Streaming — Server-sent events on both wires, what is filtered, and what happens on disconnect.
Guides
- Prompt caching — Cache reads are billed at the cache-read rate automatically; how conversations stay warm and how to key them yourself.
- Rate limits — 300 requests per minute per account, a 5 MB body cap, and what a 429 carries.
- Billing — Prepaid credits in USD, debited per token; the $10 minimum, the zero-balance cutoff and the low-balance email.
- Tool calling, JSON mode and vision — Tools, tool_choice, structured output and images on both wires — what translates and what is refused.
- Privacy and logging — What Sator records about a request and what it never records: no prompt or completion is ever logged.
- Limitations and known issues — What is not served, what is different from the model's own documentation, and the open issues we know about.
Set up your tool
- Set up your tool — One page per coding tool, with the exact file, the exact keys and the base URL with or without /v1.
- OpenCode — Add Sator as a custom provider in opencode.json with @ai-sdk/openai-compatible.
- Claude Code — Point Claude Code at Sator's Anthropic wire with ANTHROPIC_BASE_URL and pick a model explicitly — the picker will not list Sator's.
- Cursor — Override Cursor's OpenAI base URL with Sator's /v1 endpoint — reported to work, not verified by us.
- Cline — Use Cline's OpenAI Compatible provider with Sator's /v1 base URL and set the context and output limits by hand.
- Roo Code — Roo Code's OpenAI Compatible provider with Sator's /v1 base URL; Roo requires native tool calling, which Sator provides.
- Continue — Add Sator models to ~/.continue/config.yaml with provider openai and Sator's /v1 apiBase.
- Aider — Point Aider at Sator with OPENAI_API_BASE and a prefixed model name, openai/<id>.
- Zed — Add Sator to Zed's language_models settings as an openai_compatible provider (or anthropic_compatible, without /v1).
- Codex CLI — A model_providers entry with wire_api = "responses" in config.toml. Verified.
SDKs
- OpenAI SDK — The official openai packages for Python and TypeScript against Sator's /v1 base URL.
- Anthropic SDK — The official anthropic packages for Python and TypeScript against Sator's bare host, with auth_token for the key.
- Vercel AI SDK — createOpenAICompatible for the OpenAI wire; createAnthropic for the Anthropic wire — the one client that wants /v1 on both.
- LangChain — ChatOpenAI with base_url; ChatAnthropic with the bare host. Python and JavaScript.
For agents
- Agent setup — A deterministic procedure for an AI coding agent to configure any harness against Sator without guessing.