# Pyfile x402 Pass Purchase API

> Pyfile x402 Pass Purchase API is a paid API for AI agents from pyfile-agent.taile3ff35.ts.net:10000, paid per call via x402, $0.1/call, status unknown (last checked 2026-10-20).

Purchase a time-window + quota pass for a specific scope, returning a reusable token to skip per-call payments on covered routes until expiry or quota exhaustion.

## Facts

- Endpoint: POST https://pyfile-agent.taile3ff35.ts.net:10000/pass/buy?utm_source=zero.xyz
- Price: $0.1/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-20
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/pyfile-x402-pass-purchase-api-f34ce34d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_h5y7Ral3D4-kPcPcnEaPi

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 pyfile-x402-pass-purchase-api-f34ce34d -d '<json body>'
```

Example prompt: Buy me a 7-day secret scope pass on the Pyfile toolkit so I can make multiple API calls without paying each time — use the secret-7d scope.

## When to prefer this

Choose this endpoint when you plan to make multiple calls to Pyfile toolkit routes within a fixed time window and want to avoid per-call x402 micro-payments. It is especially cost-effective for high-frequency or batch usage patterns. Prefer the matching scope (web-24h for short bursts, secret-7d for a week of secret-route access, ideas-30d for sustained month-long usage).

## Known failure modes

- Invalid or unrecognized scope value returns an error — must be exactly web-24h, secret-7d, or ideas-30d
- Payment failure (insufficient USDC balance or x402 protocol error) prevents pass issuance
- Pass already expired or quota already exhausted after purchase — token becomes invalid on covered routes
- Network timeout or server error on the Tailscale-hosted endpoint

## How this service works

Buy a time-window pass with quota. Body: {scope: web-24h|secret-7d|ideas-30d}. Returns a token to send as header X-Pass on covered routes, skipping per-call payment until the pass expires or the quota is used.

## Output

Returns a JSON object with ok (boolean), a pass token string to send as X-Pass header on covered routes, the scope, an ISO-8601 valid_until expiry timestamp, integer quota of covered calls, and an array of route paths covered by the pass.

## 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": [
      "POST"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {}
    }
   }
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "json",
     "description": "Output payload format."
    },
    "example": {
     "type": "object",
     "required": [
      "ok",
      "token",
      "scope"
     ],
     "properties": {
      "ok": {
       "type": "boolean"
      },
      "note": {
       "type": "string"
      },
      "quota": {
       "type": "integer",
       "description": "Number of covered calls included."
      },
      "scope": {
       "type": "string",
       "description": "Pass scope: web-24h, secret-7d, or ideas-30d."
      },
      "token": {
       "type": "string",
       "description": "Pass token; send as X-Pass header on covered routes."
      },
      "routes": {
       "type": "array",
       "items": {
        "type": "string"
       },
       "description": "Routes this pass covers."
      },
      "valid_until": {
       "type": "string",
       "description": "ISO-8601 expiry timestamp."
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/pyfile-x402-pass-purchase-api-f34ce34d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from pyfile-agent.taile3ff35.ts.net:10000](https://www.zero.xyz/host/pyfile-agent.taile3ff35.ts.net%3A10000/llms.txt)
