Agentic Portal

PDF Tools API

documents
Serving

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.

Endpoint
POST https://test.agent.pocket.network/v1/pdf-tools/v1/pdf
Price per call
$0.005 USD
Networks payable on
Base Sepolia (eip155:84532)
Protocol
rest

Calling it

The first call returns 402 Payment Required with the terms. Sign for those terms and retry the same request with the payment attached.

Example request

A real, working call — the request the service card verifies against.

curl -X POST https://test.agent.pocket.network/v1/pdf-tools/v1/pdf \
  -H 'content-type: application/json' \
  -d '{"operation":"inspect","input_urls":["https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"],"options":{}}'
Example response

The response this call returned, captured 2026-10-15 12:13:00 UTC.

{
  "portal": {
    "provenance": "third-party-supplier",
    "serviceId": "pdf-tools",
    "schemaCheck": "unchecked"
  },
  "data": {
    "ok": true,
    "service": "pdf-tools",
    "operation": "inspect",
    "data": {
      "input_count": 1,
      "input_page_count": 1,
      "page_count": 1,
      "pdf_version": "1.4",
      "encrypted": false,
      "linearized": false,
      "has_forms": false,
      "has_bookmarks": true,
      "has_document_metadata": true,
      "page_rotations": [
        0
      ],
      "warning_count": 0
    },
    "outputs": [],
    "notes": []
  }
}

Try it

Make one real paid call from your own wallet — about $0.005 on Base Sepolia (eip155:84532). The wallet signs; nothing here holds a key. You'll see exactly what the service answers.

No browser wallet found. Install MetaMask, Rabby, or Coinbase Wallet to try a call here.

Supported methods

Methods the registry lists for this service. The portal forwards any call as sent; the supplier decides what it answers, and a delivered answer is settled.

Methods PDF Tools API accepts, and whether each reads or writes.
MethodEffect
GET /read
GET /v1/healthread
GET /v1/identityread
GET /v1/versionread
POST /v1/pdfread
POST /v1/self-testread

Schemas

Published by the service itself. The example above is generated from these.

Request schema
{
  "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,
      "examples": [
        [
          "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"
        ]
      ],
      "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."
    }
  }
}
Response schema
{
  "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."
}