ReinkeyDocsConsole

Reinkey documentation

Reinkey is the session layer for machine payments on Stellar. It extends x402 with a payment scheme called channel: one transaction opens a session, every call after that is a signed cumulative voucher verified off-chain in about 0.2 ms, and the seller settles hundreds of payments with one claim. Measured on testnet: 468 payments, 3 chain transactions.

That matters because on Stellar every exact payment is its own transaction — about five seconds each — which can carry neither agent traffic nor per-second or per-token pricing.

A session carries a budget that lives in the agent's own Soroban account, metering by request, second or token, a signed receipt per payment, and funding with any asset. Read How it works for the mechanism, or the open scheme specification for the wire format.

There are three products. Use one, or all.

Reinkey MeterReinkey Reins
ForSellers: APIs, data feeds, inferenceAgent owners
DoesCharges per request, per token or per secondGives an agent a spending account with on-chain limits
You install@reinkey/meter@reinkey/sdk
Start hereMeter quickstartReins quickstart

Reinkey Float is the finance layer on top: a lending pool where agents work on uncollateralized credit, because funds in a Reins account handed to the pool cannot leave its policy. Read about Float.

Using an AI assistant instead of writing code? @reinkey/mcp is an MCP server that gives any MCP client — Claude among them — tools that discover, call and stream paid resources, inside the same on-chain budget.

Create an account, no sign-up

Connect a wallet in the console → Reins → Create your own agent account. One transaction deploys the same account code with your wallet as owner; the agent key is generated in your browser and shown once. From then on you change caps, payees, expiry and exchange permission, or freeze the account, from the console — each write authorized by your wallet and sent straight to Stellar. See the Console guide.

Try it without installing anything

The testnet facilitator hosts a metered demo seller. An unpaid request returns the payment terms:

bash
curl -i "$REINKEY_API/demo/book"
HTTP
HTTP/1.1 402 Payment Required
PAYMENT-REQUIRED: eyJ4NDAyVmVyc2lvbiI6Mi…

The current testnet endpoint is https://reinkey.onrender.com. Examples in these docs refer to it as $REINKEY_API. Contract identifiers come from GET /demo/info; never hard-code them.

What runs where

  • On-chain (Soroban contracts): the channel contract that holds session deposits and pays sellers, and the reinkey-account contract that enforces an agent's policy in __check_auth.
  • Off-chain (the facilitator): verifies vouchers, keeps the highest accepted voucher per session, signs receipts and submits claim transactions. It never holds funds and cannot redirect them.
  • In your server: rk.meter() middleware. In your agent: the SDK, or the MCP server.

Read How it works for the full picture, and the security model before you trust it with anything.

Status

Testnet, unaudited. Everything here runs on Stellar testnet. The contracts have not been audited and the packages are pre-1.0 and not yet on npm — build them from the monorepo until they are. Interfaces may change.

Reinkey runs on Stellar testnet. The contracts are unaudited. Don't send mainnet funds.