Hosted render API
POST a Liasse document as JSON and get the rendered file back — xlsx, pptx, docx or pdf.
The hosted render API turns the document model into a file
without installing the library: POST your document JSON, a format and an
optional theme, and receive the bytes. All four formats render synchronously.
Authenticated with an API key (liasse_sk_…). Each key has an included
monthly quota. On a metered key, renders beyond the quota are billed as usage
(Stripe); on a non-metered key they return 402. A key is auto-provisioned at
checkout and emailed to you; you can also create and revoke keys yourself from
the my licenses page.
Endpoint
POST /api/render
Authorization: Bearer liasse_sk_xxx
Content-Type: application/json{
"format": "xlsx",
"document": {
"meta": { "title": "Rapport T3" },
"blocks": [
{ "type": "heading", "text": "Revenus", "level": 1 },
{
"type": "table",
"columns": [
{ "key": "poste", "header": "Poste" },
{ "key": "t3", "header": "T3", "format": "currency", "align": "right" }
],
"rows": [{ "poste": "Abonnements", "t3": 472900 }],
"summary": { "t3": "sum" }
}
]
},
"theme": { "palette": { "primary": "#0B5FFF" } }
}The response body is the file; Content-Type is set per format and
Content-Disposition suggests document.<format>.
Example
curl -X POST https://liasse.tnjl.me/api/render \
-H "Authorization: Bearer liasse_sk_xxx" \
-H "Content-Type: application/json" \
-d '{"format":"pdf","document":{"meta":{"title":"Hello"},"blocks":[{"type":"heading","text":"Hello","level":1}]}}' \
--output hello.pdfFormats
format | Output | Content-Type |
|---|---|---|
xlsx | Excel | …spreadsheetml.sheet |
pptx | PowerPoint | …presentationml.presentation |
docx | Word | …wordprocessingml.document |
pdf | application/pdf |
Responses
| Status | Meaning |
|---|---|
200 | The rendered file (binary). |
400 | Unknown format, invalid JSON, or the document failed validation (see issues). |
401 | Missing or invalid API key. |
402 | Monthly quota exceeded. |
413 | Payload over 1 MB. |
429 | Rate limited (Retry-After header). |
The document is validated against the same schema as @liasse/core's
defineDocument; the optional theme accepts the same shape as defineTheme.