Developer Documentation
Call. Pay. Receive.
AgentFetch is designed to feel like a normal HTTP API with an x402 payment step in front of paid resources.
Quickstart
Unauthenticated discovery endpoints can remain public, while paid API operations return HTTP 402 Payment Required until a valid x402 payment authorization is provided.
GET https://api.agentfetch.is/health GET https://api.agentfetch.is/pricing POST https://api.agentfetch.is/v1/pdf
x402 payment flow
- Client requests a paid resource.
- AgentFetch responds with HTTP 402 and payment requirements.
- The client signs/authorizes payment.
- The request is retried with the x402 payment payload.
- Payment is verified/settled and the requested job runs.
Production network, facilitator and final prices should be configured only after testnet verification.
PDF Render
curl -X POST https://api.agentfetch.is/v1/pdf \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com","format":"A4","printBackground":true}'Markdown
POST /v1/markdown
{
"url": "https://example.com"
}Screenshot
POST /v1/screenshot
{
"url": "https://example.com",
"fullPage": true
}Error responses
| Status | Meaning |
|---|---|
| 400 | Invalid request |
| 402 | Payment required |
| 408 | Browser job timed out |
| 429 | Queue or rate limit reached |
| 500 | Unexpected server error |