Inspection reports in one request.
Send structured findings and inline photos. Receive a real A4 PDF. No arbitrary HTML, no templates to publish, and no inspection data-capture workflow to replace.
Quick start
For a no-key demo, use POST /api/public/demo/inspection with an empty JSON object. Custom demo reports allow up to 5 findings and 5 photos. API keys are issued manually during early access.
curl --fail-with-body -X POST http://localhost:8080/api/public/demo/inspection \
-H 'Content-Type: application/json' -d '{}' -o demo.pdfThe standalone local API listens on port 8081. With an issued beta key:
curl --fail-with-body \ -X POST http://localhost:8081/v1/reports/inspection \ -H "Authorization: Bearer $PANDA_API_KEY" \ -H 'Content-Type: application/json' \ --data-binary @benchmarks/pandarender_benchmark/payload.json \ -o inspection.pdf
Hosted API endpoints use the /api/public prefix. The API returns PDF bytes directly, not a temporary storage URL. Save the response as a file or forward it to your next workflow step.
Report JSON
Required: a report ID, title, site, inspection date and inspector, organisation branding, declared areas, photos and at least one finding. Each photo and finding needs a unique ID. Finding photo references must point to existing photos.
{
"report_id": "PANDA-QA-2026-001",
"title": "Property Condition Inspection",
"site": { "name": "Riverside Court", "address": "12 Example Lane, Bristol" },
"inspection": { "date": "2026-11-22", "inspector_name": "Alex Example" },
"branding": { "organisation": "Example Inspection Services" },
"areas": ["Kitchen"],
"photos": [{ "id": "P-001", "image": "data:image/jpeg;base64,…",
"caption": "Kitchen evidence", "area": "Kitchen" }],
"findings": [{ "id": "F-001", "area": "Kitchen", "title": "Water damage",
"severity": "high", "description": "Observed damage near sink.",
"recommendation": "Arrange assessment.", "photo_ids": ["P-001"] }],
"image_policy": "strict"
}The abbreviated image above explains the shape only. Use the downloadable benchmark payload for a runnable example with real inline photo bytes. A finding without photos requires allow_no_photos: true; it is visibly labelled “No photo supplied”.
Endpoints
| Method / path | Outcome |
|---|---|
| GET /healthz | Minimal health response |
| GET /openapi.json | Downloadable API specification |
| POST /v1/reports/inspection/validate | Shape, IDs, references and limits only; assets_checked: false |
| POST /v1/reports/inspection | Bearer API key → application/pdf |
| POST /demo/inspection | Low-quota public demo → application/pdf |
Successful generation includes Content-Disposition, X-PandaRender-Report-Id, X-PandaRender-Page-Count and X-PandaRender-Warning-Count. PDFs use Cache-Control: no-store.
Sample report & observed resources
The public sample now depicts a fictional home with eight meaningful findings and twelve realistic AI-generated photographs. The live demo uses three findings and five generated photographs. Neither is a real inspection. The original 20-finding, 30-image benchmark remains available separately for reproducible testing.
Latest local full-fixture run: 16 pages, 1,198,603 PDF bytes, 5.374 seconds end-to-end, 3.840 seconds in the renderer, 3.700 CPU seconds, and 552,112 KB largest single-process peak RSS. These are observed test measurements, not aggregate container memory, cost estimates, or a production speed guarantee.
Responses also include X-PandaRender-Request-Id and, when available, X-PandaRender-Quota-Used / X-PandaRender-Quota-Limit. Quota resets at UTC midnight. Private owner monitoring separates API usage from website visitor analytics.
Limits & security
- Beta: 100 findings, 60 photos, 80 pages, 16 MB total JSON.
- Photos: inline JPEG, PNG or WebP only. 4 MB and 20 megapixels per image. Magic bytes are verified, images are transcoded and metadata is stripped.
- Remote image URLs, SVG, HTML, scripts and remote fonts are disabled.
- Demo: 5 findings, 5 photos; 3 requests/minute and 10/day per IP.
- Beta keys: 10 requests/minute plus an owner-configured daily allowance. Failed render attempts consume an attempt slot to bound abuse. No automated billing.
- No PDF or report-body persistence. A private ledger contains usage outcomes only. No idempotency support yet; avoid automatic retries.
- Supported locale: en-GB. Latin typography and common currency glyphs are covered; complex-script support is not guaranteed.
Error reference
| Status | Typical code |
|---|---|
| 400 | PANDA_JSON_INVALID |
| 401 | PANDA_AUTH_INVALID |
| 413 | PANDA_INPUT_TOO_LARGE / PANDA_DEMO_LIMIT |
| 422 | PANDA_FINDINGS_INVALID / PANDA_PHOTO_REFERENCE_MISSING |
| 422 | PANDA_IMAGE_INVALID / PANDA_IMAGE_TOO_LARGE |
| 429 | PANDA_RATE_LIMIT / PANDA_BUSY |
| 503 | PANDA_RENDER_FAILED |
{ "error": {
"code": "PANDA_PHOTO_REFERENCE_MISSING",
"message": "Referenced photo does not exist",
"photo_id": "P-MISSING",
"request_id": "request-uuid"
} }Node.js example
import { readFile, writeFile } from 'node:fs/promises';
const payload = await readFile('payload.json', 'utf8');
const response = await fetch('http://localhost:8081/v1/reports/inspection', {
method: 'POST',
headers: { 'Authorization': 'Bearer ' + process.env.PANDA_API_KEY,
'Content-Type': 'application/json' },
body: payload
});
if (!response.ok) throw new Error(await response.text());
await writeFile('inspection.pdf', Buffer.from(await response.arrayBuffer()));