Clear all usage restrictions from a PDF. MCP tool remove_restrictions / HTTP POST /v1/restrictions/remove.
Clear permission-based restrictions (no-print, no-copy, no-modify, …) from a PDF so it can be used freely.
At a glance
Section titled “At a glance”| MCP tool | remove_restrictions |
| HTTP endpoint | POST /v1/restrictions/remove |
| Price | $0.05 |
| Input | One PDF |
| Output | The PDF with all usage restrictions cleared |
Parameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
file |
file | yes | Source PDF. |
MCP example
Section titled “MCP example”Remove the usage restrictions from
https://example.com/locked.pdf.
{ "file": "https://example.com/locked.pdf"}HTTP example
Section titled “HTTP example”curl -i -X POST https://api.pdfasyougo.com/v1/restrictions/remove \ -H "Content-Type: application/json" \ -H "X-PAYMENT: <base64-encoded-payment-payload>" \ -d '{"file":"https://example.com/locked.pdf"}'import { wrapFetchWithPayment } from 'x402-fetch';import { privateKeyToAccount } from 'viem/accounts';
const account = privateKeyToAccount(process.env.X402_WALLET_PRIVATE_KEY as `0x${string}`);const fetchWithPay = wrapFetchWithPayment(fetch, account);
const res = await fetchWithPay('https://api.pdfasyougo.com/v1/restrictions/remove', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ file: 'https://example.com/locked.pdf' }),});console.log((await res.json()).output.url);Response
Section titled “Response”{ "output": { "url": "https://files.pdfasyougo.com/o/e58d…?token=…", "expires_at": "2026-06-29T12:00:00Z", "pages": 24, "bytes": 186368 }, "operation": "restrictions.remove", "cost": "0.05 USDC"}- This clears permission restrictions (print/copy/modify and the like).
- It does not remove an open password — if the file requires a password to open, use Remove password first.
- Only clear restrictions on documents you’re authorized to modify.