# AgentProof Fetch – Credit Pack Purchase

> AgentProof Fetch – Credit Pack Purchase is a paid API for AI agents from agentproof-fetch-production.agentproof.workers.dev, paid per call via x402, $0.45/call, status unknown (last checked 2026-10-11).

Purchase a prepaid credit pack for AgentProof Fetch, returning a bearer credit key and Ed25519-signed receipt that authorizes subsequent provenance fetch and change-check calls.

## Facts

- Endpoint: POST https://agentproof-fetch-production.agentproof.workers.dev/v1/credits?utm_source=zero.xyz
- Price: $0.45/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentproof-fetch-credit-pack-purchase-97b7a65d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_T-ykD1d23AW2G0Ea3-nYe

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability agentproof-fetch-credit-pack-purchase-97b7a65d -d '<json body>'
```

Example prompt: I need to start using AgentProof to fetch and verify web pages — can you pay for a credit pack so I get the bearer key and signed receipt to authorize my fetch calls?

## When to prefer this

Use this endpoint when an agent needs to acquire authorization to call AgentProof's `/v1/fetch` or `/v1/check` endpoints and does not yet have a valid credit key. This is the required first step before any provenance fetching can occur. Prefer this over alternatives when you need Ed25519-signed, offline-verifiable receipts tied to SHA-256 hashes of fetched content, which no generic scraping or caching API provides.

## Known failure modes

- Payment not settled — state is not SETTLED, no credit_key issued
- Insufficient USDC balance — payment rejected before receipt is generated
- Network timeout on Cloudflare Worker — transient 5xx error, retry safe if no settlement confirmed
- Malformed request body — 400 error if body does not conform to schema (must be empty object {})
- Double-spend or replay detected — payment provider rejects duplicate payment attempts

## How this service works

Provenance fetch for AI agents: turn a public URL into clean markdown with SHA-256 hashes of the raw bytes and the normalised markdown, plus an Ed25519-signed receipt that anyone can verify offline. Honours robots.txt; refuses private networks.

## Output

Returns a JSON object containing: a `credit_key` (bearer token prefixed `apk_`) to authorize future `/v1/fetch` and `/v1/check` calls; a `credit_pack` object with total credit balance ($0.50 USD), per-operation prices (fetch_markdown: $0.005, check_changed: $0.002), and expiry date; a `job_id`; settlement `state`; and an Ed25519-signed `receipt` (with base64url signature and payload) that can be verified offline.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "properties": {},
     "description": "No input: the pack is fixed. Send {} (or an empty body).",
     "additionalProperties": false
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "op": "credit_pack",
  "pack": {
   "usage": "Authorization: Bearer <credit_key> on POST /v1/fetch or /v1/check",
   "price_usd": "0.45",
   "credit_usd": "0.50",
   "prices_usd": {
    "check_changed": "0.002",
    "fetch_markdown": "0.005"
   },
   "valid_until": "2027-09-24T12:00:00.000Z",
   "credit_atomic": "500000"
  },
  "state": "SETTLED",
  "job_id": "job_<24 hex>",
  "receipt": {
   "alg": "Ed25519",
   "payload": {
    "v": 1,
    "type": "agentproof.receipt"
   },
   "signature": "<base64url>"
  },
  "credit_key": "apk_<43 base64url>"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentproof-fetch-credit-pack-purchase-97b7a65d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agentproof-fetch-production.agentproof.workers.dev](https://www.zero.xyz/host/agentproof-fetch-production.agentproof.workers.dev/llms.txt)
