chat/completions (see
Deprecations).
All endpoints live under /v1/agent/*, authenticate with your sk-rav- key,
and are scoped (sessions:*, messages:*, runs:* — granted by default on
all keys).
Model
Every run reports
credits and usage from the billing ledger receipt —
the number you see is the number that was charged, never an estimate.
Lifecycle
Endpoints
Semantics worth knowing
- One active run per session. Posting while a run is
queuedorin_progressreturns409(enforced at the database level). Wait for the terminal state or cancel first. - Cancel means stop waiting. A turn already executing server-side
completes and its charge stands; the run’s status becomes
cancelledand is never overwritten. - Runs are billed as chat turns (standard multiplier). The run object’s
creditscomes from the charge receipt. - Restarts are safe, not silent. A server restart fails stranded runs
with
interrupted by server restart — resubmit the message; you will never see a run stuck inqueuedforever. - Powered accounts (own Claude token) get
403 powered_token_requiredon execution until the account’s Claude connection is set up in the app; their runs record zero-credit receipts.
chat/completions and the stateless split
POST /v1/chat/completions is now the stateless fast surface — fast mode
is the default and needs no selector. The legacy agentic behavior over
chat/completions (mode: "standard" or metadata.ravchat.session_id hints)
is deprecated: responses carry Deprecation: true and
Sunset: Fri, 14 Aug 2026 headers until the sunset date, after which those
requests return invalid_request pointing here. Migrate stateful workloads
to /v1/agent/* — the model above is strictly more capable.