API Modes: Direct and Preflight
The Tools API endpoints support two operational modes, specified in the path via the {mode} parameter.
Direct
POST /api/v1/tools/modes/direct/{tool}
Returns the binary content of the generated file (image, SVG, or PDF) directly with the appropriate Content-Type and Content-Disposition headers.
Ideal for direct download or embedding in applications.
Preflight
POST /api/v1/tools/modes/preflight/{tool}
Returns a JSON response containing a token and a URL to view the result in the integrated viewer (/tools/viewer?token=...).
Ideal for integrations that need to show a preview before downloading.
Viewer
The viewer (/tools/viewer) shows an SVG preview of the result and allows downloading in the available formats:
- Barcode: svg, png, jpg, pdf
- QR Code: svg, png, pdf