Skip to content
RING
Launch Studio

Provider setup

Only two skills call a model: Text Summarizer in AI mode and Structured Data Extractor in AI mode. Everything else runs without a provider. Without one, those steps fail validation with a clear message; they never return invented output.

Provider credentials are read on the server only. They are never sent to the browser, never stored in a workflow, and masked if they ever appear in an error.

Option 1: Anthropic API key

Set the key in the server environment (.env.local for development):

ANTHROPIC_API_KEY=your-key-here

Ring uses the official Anthropic SDK. Optional settings:

VariableDefaultMeaning
RING_AI_MODELclaude-opus-5-5The model AI steps call.
RING_AI_EFFORTlowlow, medium or high. Summarizing and extracting do well at low.
RING_AI_FALLBACKSonSet to off to disable the server-side refusal fallback (see below).
RING_AI_PRICE_INPUT_PER_MTOKbuilt-in tableUSD per million input tokens, for estimates and reservations.
RING_AI_PRICE_OUTPUT_PER_MTOKbuilt-in tableUSD per million output tokens.

Restart the server after changing the environment. Settings → "What this server can do" shows whether a provider was found, the model and the price in use. It never shows the key.

Option 2: Vercel AI Gateway (on a Vercel deployment)

RING_AI_GATEWAY=vercel

With this set and no Anthropic key present, AI calls go through the Vercel AI Gateway, authenticated with the deployment's own OIDC token. No key is created or stored. Usage draws from the team's gateway balance, which is why it is opt-in.

Prices and budgets

Budgets are enforced with a price per token. Ring ships a table of Anthropic's published first-party prices (cached 2026-11-03) and uses the entry for the configured model. Prices change, and partner platforms price differently, so:

  • set RING_AI_PRICE_INPUT_PER_MTOK and RING_AI_PRICE_OUTPUT_PER_MTOK to override the table;
  • a model with no known price cannot be used for AI steps, because a budget could not be enforced. Settings says so.

Costs shown in Ring are estimates derived from token counts and these prices. They are not invoices.

Limits for a public deployment

On a public site, visitors run AI steps on the operator's account. Two settings bound that:

VariableMeaning
RING_AI_DAILY_CAP_USDA ceiling on what the whole deployment may count against AI calls per UTC day. Each call books its reservation against the day before it is made, in one atomic database statement, and the booking is replaced by the actual cost afterwards. When the day is full, AI steps stop with a clear message until 00:00 UTC; no-AI modes keep working.
RING_MAX_RUN_BUDGET_USDThe most one run's budget may be. Validation refuses a higher budget.

The Studio and Settings show the allowance and what is left of it today. Both figures are estimates from configured prices, like every other cost in Ring; the provider's own spending limits remain the hard backstop.

Refusal fallback

By default Ring enables the provider's server-side fallback: if the configured model declines a request on policy grounds, the same request is re-run on a fallback model inside the same call. The reply is priced by the model that actually served it, and reservations carry a 1.25 safety factor for that reason. If every model declines, the step fails with the code provider_refused.

Set RING_AI_FALLBACKS=off to send requests without it.

How retrieved content is handled

Pages, feeds and on-chain text are untrusted data. Ring:

  • sends them to the model inside a marked block, after instructions that say the block is data and must not be followed;
  • strips anything that could close that block early;
  • gives the model no tools, so nothing in the content can trigger an action;
  • renders model output as Markdown without interpreting HTML.

These measures reduce the risk of instructions hidden in a page steering the model. They do not eliminate it; treat AI output as a draft to review.

Checking the integration

After setting a key:

  1. Open Settings and confirm "AI provider: Ready".
  2. Open the Research Brief template in Studio. The checks strip should say "Ready to run" with an estimate.
  3. Run it and open the summarizer step: it shows the model, token usage, the reservation and the actual cost.

The repository's automated tests use a test double for the provider. A real key is the only way to exercise the real API; do that once before relying on AI steps.