# Doc Tools - Credits Purchase

> Doc Tools - Credits Purchase is a paid API for AI agents from agentpay-tools.agentpay-apis.workers.dev, paid per call via x402, $1/call, status unknown (last checked 2026-10-11).

Purchase processing credits for the Doc Tools service (PDF-to-text, RSS/Atom-to-JSON, sitemap-to-URL-list) via a USDC micropayment.

## Facts

- Endpoint: GET https://agentpay-tools.agentpay-apis.workers.dev/credits/buy?utm_source=zero.xyz
- Price: $1/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/doc-tools-credits-purchase-cfd19f2a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Ifm6gQgR5iiKNKvo3H1Ua

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 doc-tools-credits-purchase-cfd19f2a
```

Example prompt: Buy $10 worth of Doc Tools credits on AgentPay so I can start converting PDFs to text and parsing RSS feeds.

## When to prefer this

Use this endpoint when you need to pre-purchase credits specifically for the AgentPay Doc Tools service (PDF-to-text, RSS/Atom-to-JSON, sitemap parsing) before making document processing calls. Choose this over alternatives when working within the AgentPay x402 micropayment ecosystem on Cloudflare Workers.

## Known failure modes

- Amount outside allowed range (must be 1-500 USD) returns validation error
- Payment failure or insufficient USDC returns payment error
- Invalid or missing 'usd' query parameter returns 400 bad request
- Service unavailable on Cloudflare Workers returns 503

## How this service works

PDF to text, RSS/Atom feeds to JSON, sitemaps to URL lists.

## Output

Returns a JSON confirmation of the credit purchase, including the amount of credits bought, payment status, and likely a transaction or balance reference from the AgentPay x402 payment system.

## 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"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [],
     "properties": {
      "usd": {
       "type": "string",
       "description": "Credit amount in USD (1-500)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/doc-tools-credits-purchase-cfd19f2a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agentpay-tools.agentpay-apis.workers.dev](https://www.zero.xyz/host/agentpay-tools.agentpay-apis.workers.dev/llms.txt)
