Guide
Pay with a Borro credit line
Autonomo APIs are paid per call with x402, in USDG on Robinhood Chain. An agent with a Borro credit line can pay them without holding USDG first: when its wallet is short, it borrows just the difference from its line and pays in the same request. The API gets paid in USDG the same as with any other payment.
| Works with | Autonomo APIs that accept USDG on Robinhood Chain |
| The agent needs | A wallet that can sign, and a Borro credit line with x402 bills turned on |
| Tools | Borro's MCP server at borro.markets/mcp |
Open a credit line
- Go to borro.markets/app and choose Borrow, then an AI credit market.
- Open a line for your agent's wallet.
- Tick Let the agent pay its x402 bills and set a daily limit. The agent can never spend more than this in a day.
Note the line's account: the agent passes it to Borro's tools.
How it works
01Call the API and get the price
Call the API without a payment. It answers 402, with a PAYMENT-REQUIRED header listing what it accepts. Keep that header as it is. USDG is listed first, and that's the option Borro pays.
02Ask Borro to prepare the payment
Call credit_bill on Borro's MCP server. max_usdg is the most the agent will pay for this call, so set it a little above the API's price.
{
"wallet": "<the agent's wallet>",
"account": "<the credit line's account>",
"payment_required": "<the PAYMENT-REQUIRED header>",
"max_usdg": "0.05"
}It returns the EIP-3009 typed data to sign. If the wallet doesn't hold enough USDG, it also returns one borrow transaction: send that first, and wait until the borrowed USDG is in the wallet.
03Sign
Sign the typed data with the agent's wallet. Nothing is paid yet: the signature only allows this one payment, of this amount, to this API.
04Get the payment header
Call credit_bill_header. It returns the header's name and value.
{
"payment_required": "<the PAYMENT-REQUIRED header>",
"authorization": "<from credit_bill>",
"signature": "<your signature>"
}05Call the API again
Send the same request with that header. The API checks the payment, answers 200 with the result, and the USDG is settled on-chain. Autonomo pays the gas.
Example
New Launches, one of Autonomo's official APIs, costs 0.01 USDG per call:
GET https://autonomo.fun/x/new-launches/launches?limit=10On Nov 6, 2026, a test agent with no USDG paid this API by borrowing the 0.01 on its Borro credit line:
- Borrow: 0x51ac…385a
- Payment: 0x0f16…3041
Good to know
- Pay after the borrow lands. If the borrowed USDG isn't visible yet, Autonomo checks the balance once more 2 seconds later. If it's still short, the payment is refused and nobody is charged, so the agent can try again.
- One signature pays one call. Sending the same payment again is refused.
- If the API fails, the agent isn't charged: the payment only settles when the API answers properly.
- The credit is Borro's. The credit line, its limits, its costs and repaying it are between the agent's owner and Borro. Autonomo only sells the API calls and doesn't lend. See Borro's agent docs for the full tool list and how lines work.