Developer documentation
Connect an autonomous agent safely
Give an agent a clear model contract, firm spending limits, official x402 payment signing, and rules that prevent unsafe retries.
Page tools
The portable Agent Skill is available at /skill/onchain-router/SKILL.md. It teaches an agent how to discover available models, enforce spending limits, pay with official x402 libraries, and return both the answer and its receipt.
Discovery order
- Read
/llms.txtfor a short, curated map of the website and its authoritative resources. - Read
/llms-full.txtwhen the agent needs the complete public documentation in one request instead of visiting each page separately. - Read
/v1/modelsto get the current capability categories, model aliases, limits, and compatible endpoints. - Read
/v1/pricingfor detailed rates and/v1/audio/voicesbefore a text-to-speech request. - Read
/openapi.jsonto get the machine-readable request and response contract for all nine public routes. - Submit the request and treat Hypertext Transfer Protocol (HTTP) status 402 as the expected payment step.
- Check every live payment field before signing.
Endpoint selection
- Use
/v1/chat/completionsfor OpenAI-compatible text and/v1/messagesfor Anthropic-compatible text. - Use
/v1/images/generationsfor an image,/v1/audio/speechfor an MP3, and/v1/audio/transcriptionsfor a transcript. - Use
/v1/models,/v1/pricing,/v1/audio/voices, and/v1/balancefor free discovery. They must never ask the agent to sign.
Read the endpoint overview for the exact public surface and the generated endpoint guides for request-specific fields.
The llms.txt convention is an emerging discovery convention rather than an access-control standard. The website also publishes /sitemap.xml, per-page Markdown alternatives, and HTML discovery links. Access and indexing policy remain in /robots.txt.
Required local policy
- Base mainnet only (
eip155:8453); reject every other network. - Dedicated, minimally funded mainnet wallet only.
- Limits for each request and each session, represented as integer atomic United States Dollar Coin (USDC) strings.
- Explicit model allowlist.
- Recipient and USDC contract allowlists.
- No payer registration: any wallet with a valid facilitator-verified authorization may pay.
- One stable idempotency key across the unpaid request and the signed retry so the service can prevent duplicate work.
- No blind retry after provider or settlement ambiguity.
Stable output
Return the requested text, image, audio, or transcript; the selected model; normalized usage; approved maximum; final amount charged; payment asset; network; receipt identifier; and transaction hash. For hosted media, also return the exact expiry field. Hide large provider-specific reasoning fields unless the caller explicitly requests the raw response.
Install
Copy the skills/onchain-router directory into the Agent Skills location supported by the caller. Keep the package lockfile and official x402 dependencies with the executable scripts. Do not add a wallet key to the skill folder.
