Docs menu

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 speaksBase URL
OpenAI Chat Completionshttps://sator-api.princep.org/v1
Anthropic Messageshttps://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

  • QuickstartFrom signup to a working call on either wire, in curl, Python or TypeScript.
  • AuthenticationThe key format, the two headers that carry it, and how keys are created, shown and revoked.
  • ModelsEvery model id, with its context window and max output. Rates are on the price page.

API reference

  • Chat CompletionsPOST /v1/chat/completions — the OpenAI wire: request fields, response shape, streaming frames.
  • ResponsesPOST /v1/responses — the OpenAI Responses wire, served stateless: send the whole conversation every turn.
  • MessagesPOST /v1/messages — the Anthropic wire: required max_tokens, top-level system, named SSE events.
  • List modelsGET /v1/models — the catalog as a four-field OpenAI list, no key needed.
  • ErrorsBoth error envelopes side by side, every status and code, and what to retry.
  • StreamingServer-sent events on both wires, what is filtered, and what happens on disconnect.

Guides

  • Prompt cachingCache reads are billed at the cache-read rate automatically; how conversations stay warm and how to key them yourself.
  • Rate limits300 requests per minute per account, a 5 MB body cap, and what a 429 carries.
  • BillingPrepaid credits in USD, debited per token; the $10 minimum, the zero-balance cutoff and the low-balance email.
  • Tool calling, JSON mode and visionTools, tool_choice, structured output and images on both wires — what translates and what is refused.
  • Privacy and loggingWhat Sator records about a request and what it never records: no prompt or completion is ever logged.
  • Limitations and known issuesWhat 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 toolOne page per coding tool, with the exact file, the exact keys and the base URL with or without /v1.
  • OpenCodeAdd Sator as a custom provider in opencode.json with @ai-sdk/openai-compatible.
  • Claude CodePoint Claude Code at Sator's Anthropic wire with ANTHROPIC_BASE_URL and pick a model explicitly — the picker will not list Sator's.
  • CursorOverride Cursor's OpenAI base URL with Sator's /v1 endpoint — reported to work, not verified by us.
  • ClineUse Cline's OpenAI Compatible provider with Sator's /v1 base URL and set the context and output limits by hand.
  • Roo CodeRoo Code's OpenAI Compatible provider with Sator's /v1 base URL; Roo requires native tool calling, which Sator provides.
  • ContinueAdd Sator models to ~/.continue/config.yaml with provider openai and Sator's /v1 apiBase.
  • AiderPoint Aider at Sator with OPENAI_API_BASE and a prefixed model name, openai/<id>.
  • ZedAdd Sator to Zed's language_models settings as an openai_compatible provider (or anthropic_compatible, without /v1).
  • Codex CLIA model_providers entry with wire_api = "responses" in config.toml. Verified.

SDKs

  • OpenAI SDKThe official openai packages for Python and TypeScript against Sator's /v1 base URL.
  • Anthropic SDKThe official anthropic packages for Python and TypeScript against Sator's bare host, with auth_token for the key.
  • Vercel AI SDKcreateOpenAICompatible for the OpenAI wire; createAnthropic for the Anthropic wire — the one client that wants /v1 on both.
  • LangChainChatOpenAI with base_url; ChatAnthropic with the bare host. Python and JavaScript.

For agents

  • Agent setupA deterministic procedure for an AI coding agent to configure any harness against Sator without guessing.