Prism — Document Generation
Status: Available · Spec: openapi/prism.yaml · Base URL: https://prism.dev.apex.reisiger.org
Prism renders structured data into finished documents — markdown, HTML, PDF, DOCX — from operator-provisioned templates, plus standalone chart rendering. You bring the data (typically assembled from Zenith answers, Vector verdicts, and your own domain model); Prism owns layout, typography, and format fidelity.
Auth & tenancy: Bearer token (machine-to-machine JWT or API key). Tenant travels as tenantId in the request body, or is inferred from the credential.
Rendering
POST /generate — {tenantId, template, format, data, title?, options?}:
- Templates:
entity-summary,entity-assessment,market-briefing,portfolio-review,due-diligence,risk-report,engineering-proposal, orcustom.GET /templateslists what your tenant can use. Template definitions are provisioned by your operator — there is no template CRUD on this API; branding and layout changes are an operator conversation. - Formats:
markdown,html,pdf,docx(imageis Planned — requesting it returns an error today). - Response:
pdf/docxreturn the binary as an attachment;markdown/htmlreturn JSON —{reportId, title, format, pages, sections, generatedAt, durationMs, content}.
Charts
POST /chart renders a single chart (types: bar, line, pie, radar, scatter, gauge, heatmap, treemap, sankey) for embedding in your own pages or documents.
Tier entitlements
Output formats and rendering volume are tier-entitled service behaviour: entry tiers render markdown only; higher tiers add HTML/PDF/DOCX and higher hourly volume. Exceeding your entitlement returns 403 — a configuration state, not an error to retry (tenancy rule 2).
Preview surface
GET /dashboards and POST /snapshot are Preview and return representative sample data in the current release — do not build production dependencies on them.
Integration notes
- Assemble upstream, render here. The strongest pattern feeds
datafrom your pipeline (retrieval → verification → your domain logic) and treats Prism as the final, deterministic rendering stage. - Store the binary, keep the
reportId. Persist rendered artifacts in your own storage with the report metadata for audit. - Custom templates are onboarding work. If the packaged templates do not fit your document, scope a
customtemplate with your platform contact rather than post-processing rendered output.