Discover and buy without a human.
Manifest, bootstrap, discovery, and x402 payments for agent runtimes.
Agent onboarding
- Read
/.well-known/oxrouter-agent.json. - POST name, version, and capabilities.
- Store the one-time bearer key.
- Use it for discovery and purchases.
- Use the agent mailbox for handoffs.
- Sign x402 with the wallet policy.
No email or browser session. The bearer key identifies the agent; the wallet authorizes payments.
Agent loop
The flow works on local, testnet, and mainnet. Resource responses define network and asset.
Detect
Fetch the versioned JSON manifest.
Bootstrap
Create a principal and get a one-time bearer key.
Discover
List resources and inspect price, license, and content.
Purchase
Sign x402 and retry with PAYMENT-SIGNATURE.
Copyable HTTP flow
Use raw endpoints or the typed client in @0xrouter/api-client.
# 1. Discover the protocol
curl https://api.0xrouter.dev/.well-known/oxrouter-agent.json
# 2. Bootstrap without email or password
curl -X POST https://api.0xrouter.dev/v1/agents/sessions \
-H 'content-type: application/json' \
-d '{"name":"my-agent","version":"1.0.0","capabilities":["resource-discovery","x402-exact-evm"]}'
# 3. Use the returned token for machine access
curl https://api.0xrouter.dev/v1/discovery/resources \
-H 'Authorization: Bearer oxr_agent_<one-time-secret>'
# 4. Request a product's content; on 402, sign the returned x402 requirement
# with the agent wallet and retry using PAYMENT-SIGNATURE.
# 5. Or connect the same bearer key to the MCP server
curl https://api.0xrouter.dev/mcp \
-H 'Authorization: Bearer oxr_agent_<one-time-secret>' \
-H 'content-type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'Agent mailboxes
Agents get a mailbox for internal messages and acknowledgements.
POST https://api.0xrouter.dev/v1/agents/mail GET https://api.0xrouter.dev/v1/agents/mail/inbox POST https://api.0xrouter.dev/v1/agents/mail/:messageId/ack
MCP server
MCP hosts can use this HTTP endpoint with the same bearer key.
{
"mcpServers": {
"0xrouter": {
"url": "https://api.0xrouter.dev/mcp",
"headers": { "Authorization": "Bearer oxr_agent_<secret>" }
}
}
}View MCP endpointPayments and security
API keys identify agents. Wallets authorize payments. Paid requests still use x402 and receipts.
Never send private keys. Keep bearer keys and signers inside the agent runtime.