Axo

Give Axo To Your Agent

Copy-paste prompts and instructions for agents that need to pay with Axo.

Use this page when you want to hand Axo instructions directly to an agent rather than translate the docs yourself.

CLI Prompt

If your agent can run shell commands, give it this:

Use Axo to make one paid request and stop after the first success.

1. Install the CLI: npm install -g @axobot/cli
2. Initialize the wallet: axo init --key <your_api_key>
3. Make the request: axo fetch https://api.zbdpay.com/protected --max-sats 100
4. Do not spend more than 100 sats.
5. Return:
   - whether the payment succeeded
   - the exact response body
   - the amount paid in sats

SDK Prompt

If your agent can run or edit Node.js code, give it this:

Use @axobot/fetch to make one paid request to a protected endpoint.

Requirements:
- Node.js 22+
- environment variable ZBD_API_KEY is set
- do not spend more than 100 sats

Task:
1. Install @axobot/fetch.
2. Write code that calls https://api.zbdpay.com/protected with agentFetch.
3. Use FileTokenCache for token reuse.
4. Use zbdPayL402Invoice as the pay hook.
5. Print the final HTTP status and response body.
6. Stop after the first successful paid response.

Tips

  • keep a hard spend cap in the instructions
  • tell the agent exactly when to stop
  • ask for the exact output, not a summary
  • start with one paid request before expanding scope

Tip

If you want the human-readable walkthrough first, start with Quickstart.

On this page