{
  "serviceId": "pdf-tools",
  "displayName": "PDF Tools API",
  "description": "Inspect, check, split, merge, extract pages, rotate, linearize, optimize, strip metadata, encrypt, decrypt or repair PDFs from public HTTPS URLs. POST /v1/pdf with operation, input_urls and options. Answers JSON: document facts, and for transforms temporary HTTPS URLs to the result PDFs, kept one hour. Up to 50 MB per input. Pay per request in USDC; no account, no API key.",
  "category": "documents",
  "resourceUrl": "https://agent.pocket.network/v1/pdf-tools",
  "priceUsd": "0.005000",
  "priceVersion": 1,
  "rails": [
    {
      "id": "base",
      "network": "eip155:8453",
      "chainId": 8453,
      "tokenAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "tokenDecimals": 6,
      "payToAddress": "0xF732ea490c5766071785a2310523f7fA2CEbB829"
    }
  ],
  "paymentNetworks": [
    "eip155:8453",
    "eip155:4217"
  ],
  "paymentProtocols": [
    "x402",
    "mpp"
  ],
  "protocols": [
    "rest"
  ],
  "inputSchema": {
    "type": "object",
    "description": "The JSON body of POST /v1/pdf. Each operation's options schema is in the OpenAPI document the backend serves at /openapi.json. Limits: 50 MB per input, 100 MB in total, 500 combined pages.",
    "required": [
      "operation",
      "input_urls"
    ],
    "properties": {
      "operation": {
        "type": "string",
        "enum": [
          "inspect",
          "check",
          "split",
          "merge",
          "extract_pages",
          "rotate",
          "linearize",
          "optimize_structure",
          "remove_metadata",
          "encrypt",
          "decrypt",
          "repair"
        ],
        "description": "What to do with the PDF."
      },
      "input_urls": {
        "type": "array",
        "minItems": 1,
        "maxItems": 10,
        "items": {
          "type": "string",
          "maxLength": 2048,
          "pattern": "^https://"
        },
        "description": "Public HTTPS PDFs on port 443. merge takes 2 to 10; every other operation takes exactly one."
      },
      "options": {
        "type": "object",
        "description": "The operation's options. extract_pages needs {pages}; rotate needs {angle: 90, 180 or 270} and takes pages; split takes pages_per_file; encrypt needs owner_password and user_password (8 to 127 bytes, AES-256). Any operation takes password for an encrypted input; merge takes passwords, one per input."
      }
    }
  },
  "outputSchema": {
    "type": "object",
    "description": "A JSON object with ok, service, operation, data, outputs and notes. data carries the document facts (page_count, pdf_version, encrypted, linearized, structurally_valid, ...); outputs lists each result PDF with url, bytes, page_count and expires_at. A refused request answers ok false with error.code and error.message, e.g. unsafe_url."
  },
  "methods": {
    "GET /": "read",
    "GET /v1/health": "read",
    "GET /v1/identity": "read",
    "GET /v1/version": "read",
    "POST /v1/pdf": "read",
    "POST /v1/self-test": "read"
  },
  "firstParty": true,
  "networks": [
    "eip155:8453",
    "eip155:4217"
  ],
  "serving": true,
  "page": "https://agent.pocket.network/services/pdf-tools",
  "descriptor": "https://agent.pocket.network/services/pdf-tools/descriptor.json"
}