1-Click Developer Onboarding Protocol
The onboarding protocol allows developers to monetize any API endpoint without writing custom payment integration logic or maintaining blockchain-specific infrastructure.
How it Works
The developer interface connects directly to a lightweight proxy configuration tool that registers endpoints on the BotSpeak gateway in under 60 seconds.
Deployment Workflow
- Input your target API Endpoint URL (e.g.,
https://api.exa.ai/search). - Select Settlement Network and Stablecoin (e.g., Base Mainnet, USDC).
- Define the Cost Per Invocation and a Session Spending Cap (e.g., $1.00).
- Click Enable x402 Sessions to generate a dynamic wallet and proxy URL.
Upon clicking, the platform automatically provisions a non-custodial wallet, sets up a reverse-proxy gateway, configures standard PAYMENT-REQUIRED headers, and generates an x402-compliant endpoint URL ready for automated agent traffic.
Session Pre-Authorization (SPA) Handshake
The Session Pre-Authorization protocol begins when an agentic client initiates a multi-turn session with the BotSpeak proxy, replacing the need for an active signature per HTTP call.
EIP-712 Structured Payload
The client signs an EIP-712 structured payload authorizing a maximum session expenditure, encoding the payer's address, the merchant, spending limit, expiration, and a cryptographic nonce.
{
"primaryType": "SessionPreAuthorization",
"domain": {
"name": "BotSpeak Session Gateway",
"version": "2.0.0",
"chainId": 8453
},
"message": {
"sessionID": "0xf2b5a1b...",
"client": "0x987654...",
"merchant": "0x123456...",
"spendingLimit": "5000000",
"expirationTimestamp": "1774886400"
}
}
Fulfillment Flow
When this signature is validated by the gateway, it issues an ephemeral session token via the PAYMENT-RESPONSE header. For all subsequent requests within the window, the agent simply attaches this session token.
Off-Chain Credit Ledger & TEE Aggregator
To maintain micro-payments with low operational overhead, the platform utilizes a dual-tier transaction architecture.
Tier 1: In-Memory SQLite Ledger
The first tier is a local, high-speed ledger utilizing RAM-cached data structures backed by a persistent Write-Ahead Logging SQLite database. This ledger handles request validation times under 0.005 milliseconds. The gateway validates the session token, verifies the balance, and records the micro-deduction immediately.
Tier 2: AWS Nitro Enclaves (TEE)
The second tier is a Trusted Execution Environment (TEE) deployed within secure hardware enclaves. This enclave acts as a non-custodial coordination layer, verifying signed off-chain payment vouchers securely against the agent's pre-funded on-chain escrow.
Asynchronous Batch Settlement Engine
Instead of broadcasting a transaction to the blockchain for every individual API call, the gateway aggregates off-chain micro-payments into periodic batch transactions.
The batch settlement contract utilizes EIP-3009 transferWithAuthorization or receiveWithAuthorization specifications to execute parallel transfer claims without sequential nonce bottlenecks.
V_{batch} = \sum_{i=1}^{N} v_i
C_{eff} = \frac{G_{on-chain}}{N} \approx 0 \quad \text{as} \quad N \to \infty
The on-chain gas fee is incurred only once for the entire batch rather than N times. This enables the platform to process nanopayments down to $0.000001 with near-zero overhead.