Agent developers
Build agents that discover and pay for APIs on their own, inside limits you set and they can't change.
On this page
How agents use NODRA
An agent uses NODRA exactly as a developer's code does: find an API, call its gateway URL, read the 402 quote, pay and retry. The difference is that the agent decides when to call, so the rules about what it may pay must live in your code, not in the model's judgement.
Discovery
Agents can search the public directory API by capability (q), category and price, and read each API's description, billing rule and 30-day stats before choosing. llms.txt gives a plain-text map of NODRA's public pages.
Spending limits
Enforce limits before signing, outside the model:
- A maximum per call. Refuse any quote whose
amountis above it. - A total budget, counted when a payment is signed. Even a call that fails after signing counts against it until you know otherwise; NODRA doesn't submit payments for failed calls, so the real spend can be lower.
- An allow-list of gateway origins the agent may pay. A quote from any other host is refused, so a prompt-injected model can't be steered into paying an arbitrary site.
- One network and one asset. Refuse quotes for anything else rather than converting.
The agent's wallet
- Give each agent its own keypair with only the USDC it needs. It needs no SOL.
- Keep the key file out of source control and out of the model's context.
- The key signs only as the owner of the USDC transfer. NODRA's fee payer co-signs when it settles.
Retries and idempotency
Make one paid attempt per decision. Each quote can be paid once and each signed payment can be used once, so resending the same PAYMENT-SIGNATURE never charges twice: you get 409 payment_already_processed or 409 payment_in_progress. A new payment for a new quote is a new charge, so only sign another after reading why the first attempt failed. See Handle failed paid requests.