Overlay customizable text such as CONFIDENTIAL onto a PDF. MCP tool add_text_watermark / HTTP POST /v1/watermark/text.
Stamp customizable text — CONFIDENTIAL, DRAFT, a name — across the pages of a PDF.
At a glance
Section titled “At a glance”| MCP tool | add_text_watermark |
| HTTP endpoint | POST /v1/watermark/text |
| Price | $0.05 |
| Input | One PDF + watermark text |
| Output | The PDF with the text watermark applied to every page |
Parameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
file |
file | yes | Source PDF. |
text |
string | yes | The watermark text, e.g. CONFIDENTIAL. |
template |
string | no | A preset that controls style and layout (e.g. diagonal, footer). Defaults to a centered diagonal stamp. |
position |
string | no | Placement override, e.g. center, top, bottom, diagonal. |
opacity |
number | no | 0–1. Default 0.3. |
rotation |
number | no | Degrees to rotate the text. |
MCP example
Section titled “MCP example”Add a “CONFIDENTIAL” watermark across every page of
https://example.com/merged.pdf.
{ "file": "https://example.com/merged.pdf", "text": "CONFIDENTIAL", "position": "diagonal", "opacity": 0.3}HTTP example
Section titled “HTTP example”curl -i -X POST https://api.pdfasyougo.com/v1/watermark/text \ -H "Content-Type: application/json" \ -H "X-PAYMENT: <base64-encoded-payment-payload>" \ -d '{"file":"https://example.com/merged.pdf","text":"CONFIDENTIAL","position":"diagonal","opacity":0.3}'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/watermark/text', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ file: 'https://example.com/merged.pdf', text: 'CONFIDENTIAL', position: 'diagonal', opacity: 0.3, }),});console.log((await res.json()).output.url);Response
Section titled “Response”{ "output": { "url": "https://files.pdfasyougo.com/o/c4a1…?token=…", "expires_at": "2026-06-29T12:00:00Z", "pages": 24, "bytes": 191000 }, "operation": "watermark.text", "cost": "0.05 USDC"}- The watermark is applied to every page.
templatechooses a built-in style;position,opacity, androtationfine-tune it.- To overlay a logo or image instead of text, use Add image watermark.