Skip to content
Documentation

Everything an engineer needs.

From sign-up to your first governed call in minutes. Reference material for the inference API, the admin API, routing directives, and the concepts that tie them together.

Quickstart

First call in minutes.

Sign up, create a virtual key, point your SDK at Trifrost. If your code speaks OpenAI, it already speaks Trifrost.

  • Sign up — your organization is provisioned with a default customer
  • Create a virtual keysk-bf-…, hashed at rest, scoped to your teams and budgets
  • Call any registered alias — one endpoint, every provider
  • Watch it land — the event, the cost, and the tokens appear in the console in real time

Every response carries cost and token telemetry in headers: X-TF-Cost-USD, token counts, model, provider.

first call
curl https://api.trifrost.tech/v1/chat/completions \
  -H "Authorization: Bearer sk-bf-…" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kimi3",
    "messages": [
      {"role": "user", "content": "Hello, governed world."}
    ]
  }'
API surfaces

Three surfaces. Three auth models.

SurfacePathAuth
Inference/v1/*Virtual key (sk-bf-…) — budgets, allowlists, and failover apply
Admin/api/v1/*OIDC server-side session with customer membership — RBAC enforced
Auth/api/auth/*Login, callback, session, logout — BFF flow against your IdP

Unknown /v1/* paths get a JSON 404 — never a surprise HTML page.

Key concepts

The vocabulary of the control plane.

Aliases & alias groups

An alias is a stable name for a model. Attach the same alias to models on multiple providers and it becomes a load-balancing group — round-robin, weighted, or least-latency, with automatic failover.

Gateway deep-dive →

Virtual keys

sk-bf-* keys replace raw provider credentials. Each key carries an owner, budgets, rate limits, and an allowlist — and is hashed at rest with timing-safe comparison.

Governance deep-dive →

Budgets

USD and token budgets at every level of the hierarchy — Customer → Department → User → Key — enforced pre-request with structured 402 responses.

The FinOps story →

Model allowlists

Restrict which models a department or user can call. Intersection semantics across scopes, explicit deny-all — regulatory model restriction as configuration.

Governance deep-dive →

Events

Exactly one HMAC-signed event per request — success, failure, blocked, streaming — plus admin mutations. Query in the console, search by request ID, export to your SIEM.

Observability deep-dive →

The console

Playground, spend, events, providers, models, governance, policies, virtual keys, metrics, RBAC — everything above, clickable.

Launch console →

Reference

Provider directives, per request.

The provider request field steers provider selection within an alias group by slug. Directives compose; failover never escapes your constraints; everything is stripped before the request goes upstream.

provider directives
{
  "model": "kimi3",
  "messages": [...],
  "provider": {
    "only":    ["fireworks", "together"],   // strict
    "ignore":  ["digitalocean"],          // blacklist
    "order":   ["fireworks"],             // soft preference
    "allow_fallbacks": false            // no retry
  }
}
  • only — strict. A non-member slug fails 400 provider_not_in_group, so a typo never silently re-routes
  • ignore — blacklist, failover included. Emptying the group fails 400 provider_excluded_all
  • order — soft preference. Listed members lead; the rest keep load-balancer order. Never excludes
  • String form"provider": "fireworks" pins the group, equivalent to only with one member

For LLMs

Point your coding assistant at /llms.txt for the curated index, or /llms-full.txt for the whole documentation corpus in one file.

llms.txt →

Changelog

Dated milestones of everything shipped — from the plugin pipeline foundation to zero-content stream failover.

Read the changelog →

Testing without a provider bill

fakellm is our deterministic, OpenAI-compatible test harness — exact token accounting, configurable pricing, and failure injection including mid-stream truncation.

See failover in action →
Stuck?

Talk to an engineer, not a ticket queue.