Documentation
Getting started
Three steps and about four minutes: create a key, POST a URL, keep the file. Everything else is optional.
01 / AUTHENTICATION
Two keys, different jobs
Your access key identifies the project and can be public. Your secret key signs requests and must stay on your server. Server-side calls use a bearer token; browser calls use a signature.
02 / FIRST RENDER
POST a URL, get a PDF
The response body is the file. Content-Type tells you what it is; the X-Credits-Remaining header tells you what it cost.
Tip
If your page builds content after load, add wait_for with a selector that only exists once the page is done. It is the single option that prevents most surprises.
03 / STORAGE
Let us keep the file
With store: true the response is JSON instead of bytes: a CDN URL, a checksum, a page count and an expiry. Set retention to control how long it lives.
04 / ASYNC
Long jobs, without holding the connection
Add async: true and a callback_url. You get a job id immediately and a signed webhook when the render finishes. Verify the signature header before trusting the payload.
05 / ERRORS
When a render fails
Failures return a machine-readable code and a sentence you can log. None of them spend a credit.
Rate limits are per project and returned in X-RateLimit-* headers. Retry 429 and 5xx with exponential backoff; the SDKs do it for you.
SDKS
Official libraries
Typed options, retries and signed-URL helpers. All five wrap the same endpoint, so the docs read the same in every language.
Node.js
npm i urltodoc
Python
pip install urltodoc
PHP
composer require urltodoc/sdk
Go
go get github.com/urltodoc/go
Ruby
gem install urltodoc
Something else
It is one POST with JSON. Ask us and we will write the snippet.