Skip to main content
Base URL: https://x402.ottoai.services The HTTP API sells individual requests through x402. An unpaid request returns a price challenge; your client signs a payment authorization, repeats the request and receives the result. Discovery is free. The catalog website can show a challenge but has no wallet-signing flow; paid calls need an agent, script or terminal client.

Find an endpoint

Base-USDC payment is available across this storefront. Some routes also advertise Solana; use only the network, token and transfer scheme in that route’s current accepts array. X Layer has its own host and payment requirements. If you do not know which service fits your task, Service discovery can recommend one. Its fee is separate from the service you buy. For endpoint choices, example requests and result-reading rules, start with a task guide:

Inspect the challenge

This request is free:
A paid route normally answers 402 Payment Required, with base64 JSON in PAYMENT-REQUIRED and payment details in the response body. Decode the header before paying:
Check the request URL, recipient (payTo), network, asset, amount and validity. Amounts use the asset’s smallest unit: 1000 in 6-decimal USDC is 0.001 USDC. The challenge is the price for that call; a copied price table can lag. Read supported extensions from this response too. Signed offers, payment identifiers and sign-in-with-x re-access are route-specific. Cached data routes are pay-per-call and do not advertise SIWX; only use a re-access window where the live challenge offers one. A Permit2 payment requires the corresponding allowance; it is not permission to pay with an arbitrary token absent from accepts.

Make a paid request

The following example buys one /crypto-news response using USDC on Base. It refuses a challenge above 0.001 USDC. Review the actual recipient first, and load X402_PRIVATE_KEY through your local secret configuration. Never put a key in source code or an agent conversation.
Save as request.mjs and run with node request.mjs:
The wrapper handles challenge → sign → retry with PAYMENT-SIGNATURE. Keep axios’s default validateStatus: accepting 402 as success prevents the interceptor from running. This example limits one call; an automated loop needs its own total budget and retry policy. An EIP-3009 Base-USDC service payment needs USDC but no Base ETH in the payment wallet. Execution may need a separately funded account and gas. Paying for a read grants no authority to trade. For execution endpoints, follow Trade execution and inspect the route’s account requirements; a user-supplied address does not replace payer authorization.

Read the result

Check the HTTP status and response body. A payment receipt and useful delivered data are separate evidence. Preserve the full result, original request and receipt headers. A value is measured data; null means the field applies but its value is unavailable; an absent field makes no claim. For example, an uncached route has no snapshot age. Check coverage and source-health fields before acting on a result. Where supported on EVM routes, PAYMENT-RESPONSE can include an EIP-712 otto-content-receipt binding content, request and payment. Generation is best-effort: a valid response may lack it, and Solana settlements do not carry this EVM receipt. Agent identity registrations identify providers; they do not prove a particular delivery.

Handle failures

The MCP guide documents its same-authorization replay path. Unknown execution status is not a failed trade and does not justify a replacement transaction. Service discovery and refunds covers the bounded feedback program for qualifying purchases. It is not a blanket refund on every API failure. For unresolved delivery, contact support with the request and receipt, never the wallet key. The retired /top-ten route was absorbed into /crypto-news; /historical-summaries has no replacement.