Start here, whatever you write
Every page below uses the same API. You send POST https://api.castpdf.com/v1/pdf with your key in the Authorization header and a JSON body. The body holds either HTML, or the ID of a template you saved plus the data to fill it. The answer is the PDF itself, or a private download link if you ask for one.
- Quickstart: your first PDF in about five minutes, with curl, Node.js or Python.
- API reference: every endpoint, field, limit and error.
- Authentication and keys: test keys for building, live keys for real documents.
- Errors and rate limits: what each error code means, and the 20 requests a minute a test key allows.
Do I need an SDK?
No. We do not publish SDKs yet, and you do not need one. Each example uses the HTTP client your language already has, such as fetch, requests, net/http or HttpClient. That keeps your dependencies short and the code easy to read in a review.
Rendering is limited to 30 seconds and 50 pages per PDF. Set your client's timeout to at least 60 seconds, and send an Idempotency-Key header so a retry never makes, or bills, a second document.