402 Payment Required responses. If the server requests payment, Enact pays using your agent session credentials and retries.
CLI Reference
enact pay
Make a payment-aware HTTP request.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Make a payment-aware HTTP request.
enact pay <url> [options]
402 Payment Required responses. If the server requests payment, Enact pays using your agent session credentials and retries.
| 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 |
# Basic GET
enact pay https://api.example.com/resource
# POST with body
enact pay https://api.example.com/analyze \
--method POST \
--body '{"text": "hello world"}'
# Preview cost before paying
enact pay --dry-run https://api.example.com/resource
# Custom headers
enact pay https://api.example.com/resource \
--header 'X-Request-ID: abc123'
enact pay --dry-run https://api.example.com/resource
Dry Run: GET https://api.example.com/resource
Payment required
Cost: $0.01
Remaining: $95.50
Remaining is lower than Cost, the request will fail. Top up your wallet or create a new session with a higher budget.enact -t pay https://api.example.com/resource
{
"status": 200,
"receipt": true,
"body": { ... }
}
enact -t pay --dry-run https://api.example.com/resource
{
"requiresPayment": true,
"cost": { "amount": "0.01", "currency": "AlphaUSD" },
"remainingBudget": "95.50",
"wouldExceedBudget": false
}