Authentication
Every request to the API is authenticated with a API key in thex-api-key header.
Example
Python
Where does the key go on each endpoint
Thex-api-key header is the same on all endpoints (/convert, /convert/raw, /convert/from-url, /pdf/index, GET /jobs/{id}). The key is not accepted as a query param or inside the JSON body: it always goes in the header.
Good practices
- Save the API key in an environment variable or secrets manager, never in the code or in the repository.
- Do not include it in URLs or logs (query params are usually registered in proxies and CDNs).
- Use a different key per environment (development, staging, production) to be able to revoke one without affecting the others.
- If a key leaks (for example in a log, a public repository or a frontend client), rotate it immediately.
- If your application calls API from the browser, do not expose the key directly: proxy the request from your own backend.
Authentication errors
Frequently asked questions
- Does the API key expire? It depends on your plan; consult the panel where you generated it. Rotating it manually is the recommended way to invavalidate it early.
- Can I have several active keys at the same time? Yes, it is the recommended way to separate different environments or applications.
- What happens if I send the
x-api-keyheader twice? Only one value is evaluated; avoid this by configuring the HTTP client correctly.
