pay_and_fetch
Fetch a URL and automatically pay when the server returns 402 Payment Required, staying within operator-set budget, host, and chain limits; non-paywalled resources cost nothing.
Instructions
Fetch a resource, paying automatically if it answers 402 Payment Required. THIS SPENDS REAL MONEY from the configured wallet. The payment is refused unless it is within the per-request cap, the remaining lifetime budget, the allowed hosts and the allowed chains - those limits are set by the operator and cannot be raised from here. If a resource is not paywalled it is simply fetched, costing nothing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The resource to fetch. Must be http(s). | |
| method | No | HTTP method. Default GET. | |
| max_response_chars | No | Truncate the body to this length. Default 20000. |