ReinkeyDocsConsole

Reinkey documentation

Reinkey is payment infrastructure for APIs and AI agents on Stellar. It extends x402 with a payment channel scheme, so a payment is a signed voucher verified in about a millisecond instead of an on-chain transaction that takes five seconds.

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.

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.

What runs where

  • On-chain (Soroban contracts): the channel contract that holds 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 channel, and submits claim transactions. It never holds funds and cannot redirect them.
  • In your server: meter() middleware. In your agent: the SDK.

Read How it works for the full picture.

Status

Testnet, unaudited. Everything here runs on Stellar testnet. The contracts have not been audited and the packages are pre-1.0. Interfaces may change.

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