PDFHQ logo

Documents

DocumentationGetting started

Preflight before upload

Check PDF operation eligibility, signed metadata, batch limits and HQ Credit estimates before sealing or uploading files.

Server-side API keys Signed storage uploads

Validate PDF operations without uploading#

POST /v1/preflight validates a proposed PDF operation, metadata, settings, plan restrictions and an advisory HQ Credit estimate without allocating storage, creating a task or charging credits. Supply each file's format, size_bytes and page_count. Authentication uses an account session or an API key with task permissions; limited anonymous requests cannot read balances.

cURL
curl -X POST 'https://api.pdfhq.io/v1/preflight'   -H 'Content-Type: application/json'   -H 'x-api-key: YOUR_API_KEY'   -d '{"operation":"merge","inputs":[{"format":"pdf","size_bytes":51200,"page_count":2},{"format":"pdf","size_bytes":40960,"page_count":3}],"file_count":2,"settings":{}}'

Inspect supported, eligible, can_proceed, blockers, quote and next_actions. Only a central HQTools-verified offer can resolve a purchasable blocker. A technically unsupported request must not show a paywall.

Execution and security#

Rate limits and strict request validation protect the anonymous endpoint. Do not assume a successful preflight reserves credits, fixes a price or proves the uploaded PDF contents. Sign and upload directly to storage, create the task, and let the server revalidate actual documents, entitlements, quotas and HQ Credits at execution.

The reference SDKs expose preflight(request) in ten languages, and the live OpenAPI /openapi.json describes the public contracts. Handle HTTP 422 validation, 429 rate-limit and 503 unavailable responses.

PDFHQ logo

PDF tools and document intelligence. Prepare, understand and work with your documents.

© 2026 PDFHQ. All rights reserved.