Skip to main content
Every paid Otto AI route states its price before you pay. Check the price for free, then pay for one /crypto-news response. Each starter pays 0.001 USDC and refuses a higher price.

Check the price for free

This needs Python 3 only. It needs no wallet and no packages:
It prints the price on each network that the route accepts:
eip155:8453 is Base. solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp is Solana. To price another route, change the URL. The API reference lists every route with its price.

Pay with Python on Base

The payment wallet needs USDC on Base. It needs no ETH. Load X402_PRIVATE_KEY through your local secret configuration. Never put a key in source code or an agent conversation.
Save as base_request.py and run it with python base_request.py:

Pay with Python on Solana

Solana payment works on every route whose price quote lists Solana. The payment wallet needs USDC on Solana. It needs no SOL, because the network fee is paid for you. Load SOLANA_PRIVATE_KEY, the wallet’s base58 secret key, through your local secret configuration.
Save as solana_request.py and run it with python solana_request.py:

Pay with Node.js on Solana

The same Solana payment from Node.js 20.18 or later:
Save as solana-request.mjs and run it with node solana-request.mjs:
For Node.js on Base, follow Make a paid request.

Read the result

Each starter saves otto-result.json. It holds the data and the PAYMENT-RESPONSE receipt, which is base64 JSON with the settlement transaction. Read the result explains each field. If the payment is refused, the starter prints the reason from the 402 answer, for example insufficient_funds. A refused payment is not charged. Each starter pays for one call. Give an automated loop its own total budget.