Documentation
Gist Plus Documentation
The complete guide to building autonomous AI commerce systems with the Gist Plus protocol.
Why Gist Plus over per-request payments?
Legacy per-request flows pioneered using HTTP 402 “Payment Required” for blockchain-based API payments. They work, but every request requires its own blockchain transaction — slow and expensive at scale.
Gist Plus fixes this with prepaid sessions. Instead of 100 transactions for 100 requests, Gist Plus uses just two: one to open the session, one to close it. Everything in between happens off-chain with automatic balance tracking.
3.5×
Cheaper
6×
Faster
50×
Fewer txs
Complete protocol flow
01
Agent creates Intent
Express needs, max price, SLA requirements
02
Provider sends Offer
Actual price, SLA guarantees, Ed25519 signature
03
Agent creates Session
Deposits funds on Solana (1 blockchain tx)
04
Agent makes requests
100+ requests, all off-chain, auto-deducted
05
Agent closes Session
Refund for the remaining balance (1 blockchain tx)
Key insight: only steps 03 and 05 touch the blockchain. Step 04 — all the requests — happens off-chain with instant balance deduction. That is why Gist Plus is 50× more efficient.
Quick install
For AI agents
npm install @gistplus/clientFor API providers
npm install @gistplus/serverYour first agent
import { GistClient } from '@gistplus/client';
const client = new GistClient({ connection, wallet });
// 1. Express your needs
const intent = client.createIntent({
capability: 'gpt-4-inference',
maxPricePerRequest: 0.01,
token: 'USDC',
});
// 2. Negotiate
const offer = await client.negotiate(
'https://api.provider.com',
intent
);
// 3. Create a session
const session = await client.createSession(offer);
// 4. Execute (payment is automatic)
const result = await client.executeRequest(
session.sessionId,
{ prompt: 'Hello AI!' }
);
console.log(result.data); // Response
console.log(result.receipt); // Proof