Makes an HTTP request that automatically handles 402 Payment Required responses. If the server requests payment, Enact pays using your agent session credentials and retries.
Options
Flag
Description
--method <METHOD>
HTTP method (default: GET)
--body <JSON>
Request body
--header 'Key: Value'
Add a request header (repeatable)
--dry-run
Preview cost without paying
Examples
# Basic GETenact pay https://api.example.com/resource# POST with bodyenact pay https://api.example.com/analyze \ --method POST \ --body '{"text": "hello world"}'# Preview cost before payingenact pay --dry-run https://api.example.com/resource# Custom headersenact pay https://api.example.com/resource \ --header 'X-Request-ID: abc123'