# AgentPay Credits Purchase

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

Purchase prepaid USDC credits on AgentPay to fund pay-per-call API usage for AI agents on Base or Algorand

## Facts

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

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 agentpay-credits-purchase-1a3d2e86
```

Example prompt: Add $50 of AgentPay credits to my account so I can keep running web extraction and domain lookup calls without interruption.

## When to prefer this

Use this endpoint when an AI agent needs to pre-fund its AgentPay credit balance before making pay-per-call API requests for web extraction, document tools, or domain lookups. Prefer this over per-call x402 payments when you want to batch-fund multiple future calls or avoid repeated micropayment overhead per request.

## Known failure modes

- Insufficient USDC balance in wallet — payment fails with 402 or payment error
- USD amount outside allowed range (must be 1–500) — validation error returned
- Invalid or missing usd query parameter — schema validation error
- Network or blockchain transaction failure — timeout or transaction error
- Wallet not connected or x402 payment headers missing — authentication/payment error

## How this service works

Web extraction, domain lookups and document tools for AI agents. Pay per call in USDC via x402 on Base or Algorand.

## Output

Returns a confirmation of the credit purchase including the amount of USD credits added, transaction details, and updated credit balance information for the AgentPay account, paid via USDC on Base or Algorand using the x402 protocol.

## 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/agentpay-credits-purchase-1a3d2e86/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agentpay.agentpay-apis.workers.dev](https://www.zero.xyz/host/agentpay.agentpay-apis.workers.dev/llms.txt)
