Docs

Quickstart

  1. Open the dashboard, connect a Solana wallet and sign in.
  2. Create an agent. Copy its key (shown once).
  3. Top up the agent with USDC.
  4. Point any OpenAI-compatible SDK at Reins.
from openai import OpenAI
client = OpenAI(base_url="https://reins/v1", api_key="rk_live_…")
r = client.chat.completions.create(model="reins/auto", messages=[{"role":"user","content":"Summarize this."}])
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://reins/v1", apiKey: process.env.REINS_KEY });
await client.chat.completions.create({ model: "anthropic/claude-sonnet-4.5", messages, stream: true });

Streaming, tools and images pass straight through. Every response carries x-reins-receipt (the receipt number) and, when not streaming, x-reins-cost.

reins/auto

Set model to reins/auto and Reins reads the request: short, simple prompts go to a small fast model; normal work to a mid model; tool calls, very long context and hard code or analysis go to a top model. Two fallbacks are attached, so if one provider is down the call still lands.

Auto keeps 30% of what it saved you against the top model. If it saved nothing, it costs nothing extra.

Limits and errors

Checked before every call, in this order. A blocked call costs nothing and still writes a receipt (so blocks show on the public record).

CheckHTTPcode
Agent paused (by owner or loop breaker)403paused
Model not on allowlist403not_allowed
Worst-case cost over per-call max429per_call_max
Daily cap reached (resets 00:00 UTC)429daily_cap
Balance too low402balance
Same call repeated too fast429loop_breaker

Worst-case cost = estimated input tokens plus max_tokens at the model's price plus fees. If you don't send max_tokens and the default would break the per-call max, Reins lowers it to fit instead of blocking.

Limits can only be changed from the dashboard, and every change is signed by the owner wallet. The agent's key can't touch them.

Money

  • Balances are in US dollars, funded with USDC on Solana. Top-ups have no Reins fee.
  • A call costs the model's own price plus 8% of the output-token cost. reins/auto adds its share of the savings.
  • 50% of all Reins fees buy back $REINS every hour and burn it. The rest runs Reins.
  • Move balance between your agents any time from the dashboard.
  • No subscription, no minimum, credit never expires.

Receipts and seals

Each call writes a receipt with totals only: model, token counts, cost, status. Never the prompt or reply. Each receipt's hash covers its fields plus the agent's previous receipt hash, so history can't be edited without breaking the chain.

Every hour, all new receipts become the leaves of a SHA-256 Merkle tree. The root is posted on Solana as a memo:

reins:seal:v1 #42 root=9f3c…e1 n=1830 receipts=88120-89949

To check a receipt, get its proof from GET /api/proof/:id, hash up the path, and compare with the memo in the seal transaction. The seals page does it in your browser.

Trust levels

NewJust created
Active7 days since its first paid call
Steady30 days, under 1% of calls blocked
ProvenSteady plus $500 spent on record
Established90 days, under 1% blocked, $500+ spent

Endpoints

POST /v1/chat/completionsOpenAI chat format, streaming supported
GET /v1/modelsEvery model with price per million tokens
GET /v1/meThe calling agent's balance, today's spend and limits
GET /api/agent/:idPublic record of an agent
GET /api/recordsEvery listed agent
GET /api/sealsLatest seals with Solana tx
GET /api/proof/:receiptMerkle proof for one receipt

Auth: Authorization: Bearer rk_live_…