Get started
Authentication
Every request to /v1 needs an API key in the Authorization header.
curl https://devilpdf.com/v1/usage \
-H "Authorization: Bearer $DEVILPDF_API_KEY"#API keys
Create and revoke keys in the dashboard under API keys. Keys can only be managed from the dashboard, not through the API.
- A key starts with
dp_live_. - The full key is shown once, when you create it. We store only a hash, so we cannot show it again. If you lose it, create a new one.
- An account can have up to 25 active keys. Use one key per app or environment so you can revoke one without touching the others.
- A revoked key stops working immediately.
All keys on an account share the same templates, documents and monthly allowance.
#Keep keys on the server
An API key can render documents and read every template and document on your account. Never put it in browser code, a mobile app, or a public repository. Call DevilPDF from your backend.
If your users need to edit a template in the browser, use the embeddable editor. It works with a short-lived token that is limited to one template.
#Errors
A missing or invalid key returns 401 with an error object.
{
"error": {
"type": "unauthorized",
"message": "Missing API key. Send it as: Authorization: Bearer dp_live_..."
}
}#Rate limit
Each account can make 600 requests per minute. Above that, requests return 429 with the type rate_limited. Wait a few seconds and retry. See limits.
#MCP
The MCP server uses the same API keys, sent the same way.