Docs

Quickstart

Start here to send your first RelayPDF request. One bearer key covers HTML, URL, Markdown, and template PDFs, screenshots, Office conversion, and PDF tools. Agents should run relaypdf setup and approve in the browser instead of asking for a pasted key.

Base URL is https://api.relaypdf.com. Send a bearer key, choose an endpoint, and pick a response mode (binary, url, async). The same key covers PDFs, screenshots, converts, and PDF tools.

1) Get an API key

For agents, run relaypdf setup and approve in the browser. Do not paste secrets into prompts.

CLI setup
npx @relaypdf/cli setup

2) Send a request

Start with POST /v1/pdf using html, url, markdown, or a published templateId. Office files use POST /v1/convert. Merge is POST /v1/pdf/merge.

curl
curl -X POST https://api.relaypdf.com/v1/pdf \
  -H "Authorization: Bearer pdf_live_…" \
  -H "Content-Type: application/json" \
  -d '{"html":"<h1>Hello</h1>","filename":"hello.pdf"}' \
  --output hello.pdf

3) Choose response mode

binary returns file bytes, url returns a 24-hour download link, async returns 202 + poll URL. Failed requests are never billed.

Official clients

Node @relaypdf/sdk, Python relaypdf, PHP relaypdf/relaypdf, C# RelayPDF, Java com.relaypdf:relaypdf. CLI and MCP: npx @relaypdf/cli. n8n: n8n-nodes-relaypdf.