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.
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.
Method
Effect
GET /
read
GET /v1/health
read
GET /v1/identity
read
GET /v1/version
read
POST /v1/pdf
read
POST /v1/self-test
read
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."
}