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

  1. Client requests a paid resource.
  2. AgentFetch responds with HTTP 402 and payment requirements.
  3. The client signs/authorizes payment.
  4. The request is retried with the x402 payment payload.
  5. 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

StatusMeaning
400Invalid request
402Payment required
408Browser job timed out
429Queue or rate limit reached
500Unexpected server error