Your API.
Agent-payable.
No rewrites.
Wrap your existing API in five minutes. Prism handles agent discovery (MCP, x402), authentication (OAuth + DCR), payment settlement across ten rails, signed audit, idempotency, and rev-share. Two webhooks on your side. Zero changes to your business logic.
Prism is the first product from Agent Gate, the infrastructure layer for the agent-payable web.
Three steps. Five minutes. No business-logic changes.
Prism sits in front of your existing API as a configurable reverse proxy. Your code stays where it is. Customers (agents) discover, pay, and call through Prism.
One POST. Tell prism your API's URL, two webhook endpoints, your fee, and the resource id agents will call. Persisted in the multi-tenant store; hot-registered without a restart.
$ curl -sX POST https://api.agentgate.md/admin/tenants \
-H "Authorization: Bearer $PRISM_ADMIN_KEY" \
-H "Content-Type: application/json" \
-d '{
"slug": "acme-search",
"display_name": "Acme Search",
"credentials": {
"gateway": {
"target_url": "https://api.acme.com",
"quote_url": "https://api.acme.com/_prism/quote",
"settle_url": "https://api.acme.com/_prism/settle",
"webhook_secret": "whsec_...",
"resource_id": "acme.search",
"fee_bps": 250
}
}
}'Quote returns a price for the agent's request. Settle confirms after payment. Each is a small handler. Prism signs settle deliveries (HMAC-SHA256), retries with exponential backoff, dead-letters on permanent failure. Stripe-shaped DX.
// /your/_prism/quote
export async function POST(req) {
const { method, path, body_b64 } = await req.json();
// Static, per-shape, cost-plus, or per-agent — your call.
return Response.json({
price_minor: "5000",
price_asset: "USDC.SOL",
price_decimals: 6,
});
}
// /your/_prism/settle
import { verifyPrismSignature } from "./verify";
export async function POST(req) {
const body = await req.text();
if (!verifyPrismSignature({
secret: process.env.PRISM_WEBHOOK_SECRET!,
timestampHeader: req.headers.get("x-prism-timestamp"),
signatureHeader: req.headers.get("x-prism-signature"),
body,
})) return new Response("unauthorized", { status: 401 });
const event = JSON.parse(body);
await db.creditAgent(event.agent_id, event.amount_minor);
return new Response(null, { status: 200 });
}Agents discover your resource through MCP, REST, ACP, or A2A — whichever they speak. They pay through any of ten rails (x402, Solana Pay, EVM transfer, Stripe, Lightning, AP2, …). Prism takes its bps + flat. You see net in /admin/.../revenue.
# Agent side — any MCP client:
$ claude mcp add prism --transport http https://api.agentgate.md/mcp
✓ mcp/prism registered (12 tools)
# Operator side — rev-share rolling totals, per asset:
$ curl https://api.agentgate.md/admin/tenants/$ID/gateway/revenue \
-H "Authorization: Bearer $PRISM_ADMIN_KEY"
{
"delivered_events": 1247,
"by_asset": [
{ "asset": "USDC.SOL", "calls": 1247,
"gross_minor": "6235000", "fee_minor": "162075",
"net_to_customer_minor": "6072925" }
]
}Four front doors. One gateway.
Same Bearer, same idempotency, same audit log. Agents pick the protocol they already speak — your /quote and /settle handlers don't change.
If you've shipped Stripe webhooks, you've shipped this.
HMAC-SHA256 signing. Idempotency key per event. Exponential backoff. Durable event log. Manual redeliver from /admin. The boring details that make webhooks survivable in production.
Every settle delivery carries the headers you'd expect from a modern webhook system. Same shape across all event types.
Up to 8 attempts over ~24h. Same idempotency key on every retry — your handler stays correct under at-least-once delivery.
Your asset. Your rail. Your fee.
Prism takes a basis-point fee plus a flat per-event amount, in the same asset the agent paid. Rolling totals exposed on /admin. Cash out the way you already do.
Two real deployments. Both fork-able.
One shows the operator path: wrapping an existing API. One shows the agent path: an MCP client that pays. Both are deployed against api.agentgate.md right now.
Two route handlers (/quote and /settle), one tenant POST, deployed to Vercel. Charges agents $0.005 per /forecast call. The minimum-viable wrap. Public release with the Agent Gate org.
$ vercel deploy weather-gateway$ curl -sX POST $PRISM/admin/tenants -d @prism.tenant.json✓ tnt_… fee_bps=250 resource_id=weather.forecast→ first agent pays $0.005 USDC.SOL
Spin a slot reel from inside Claude Code. The agent issues an AP2 mandate, pays via Stripe, and pulls a BLAKE3 commit-reveal — fully audit-logged. The customer doesn't have a face.
$ claude mcp add casino \--transport http https://casino.agentgate.md/mcp✓ mcp/casino registered (4 tools)▸ pay_to_play_mandate { amount_usd: 25 } → mandate_active
Boring standards. Wild composition.
Nothing here is invented. Prism is what you get when you wire the existing agent / payment / crypto stack together with care.
Two paths.
One command each.
Pick the side you're on. Both lead to the same gateway, both land you in production within an afternoon.
Register your tenant, point Prism at your /quote and /settle handlers, ship. Existing API code stays where it is.
DCR + token + auto-discovery. Your agent registers itself, gets a bearer, and can call any tenant's resources behind Prism.