Docs

Authentication

Every write endpoint requires Authorization: Bearer. Keys are hashed at rest and rejected in the query string. Coding agents must not ask a human to paste a key — run relaypdf setup (or relaypdf login) and wait for browser approval.

Every POST /v1/* write operation requires Authorization: Bearer pdf_live_… (or a local development key). GET /health is public. GET /v1/files/:id is a time-limited public download and does not use a key.

Create a key

Dashboard → API keys. For agents and CI, run relaypdf setup (or relaypdf login) and approve the device in the browser instead of pasting a secret into chat.

CLI
npx @relaypdf/cli setup

Where credentials live

The CLI writes ~/.config/relaypdf/credentials.json with mode 0600 and never prints the key. setup can also write RELAYPDF_API_KEY into an env file.