Developer integration

Connect an agent to a bounded model purchase.

Use Toolkit's machine-readable manifest, Discovery API, MCP server, or open AgentPay SDK. Keep signing keys in a trusted wallet or credential store; the agent receives scoped progress credentials instead.

REST

Discover offers and check the payment rail before creating a reservation.

GET https://toolkit.fun/api/agentpay/v1/discovery GET https://toolkit.fun/api/agentpay/v1/readiness?provider=openrouter POST https://toolkit.fun/api/agentpay/v1/policies/{policyId}/reservations POST https://toolkit.fun/api/agentpay/v1/models/{provider}/{model}/invoke

MCP

Expose discovery, quote, reserve, invoke, reconcile, result, and public proof tools to an MCP client.

{ "mcpServers": { "toolkit-agentpay": { "url": "https://toolkit.fun/api/agentpay/mcp" } } }

Funding modes

ModeUse it whenSettlement
toolkit_creditsThe account or team owns Toolkit Cloud model allowance. Use the authenticated /api/agentpay/v1/credit-purchases route.Toolkit usage ledger and private receipt; idempotent by purchase ID.
x402_monadThe agent has a trusted wallet and a bounded testnet policy.x402 v2 upto, Permit2, Monad Testnet receipt.
byok_providerThe customer wants the provider relationship and key to stay theirs.Preview only. The public AgentPay route accepts no raw key; use the existing Toolkit BYOK workflow path.

Recovery rules

Never retry an unknown payment by creating a new purchase. Keep the same purchase ID, call reconciliation, and wait for chain or provider evidence. Missing result access returns a purchase-scoped SIWX challenge. Recorded Demo mode never sends a payment.

Machine contracts

Public proof

GET /api/agentpay/v1/proofs/{publicProofId} returns redacted usage, settlement and receipt evidence without exposing prompts or model output.