Endpoint
Complete pipeline that generates a document from JSON, renders it to PDF/PNG, and then generates photo variations.
Request Body
template
string
default:"guia_despacho.html"
Template file name
Photo preset names. If omitted, generates all 8 presets.
Key fields to preserve in photos. Auto-generated from doc_number if empty.
Response
Unique identifier for this generation run
Generated document files.
Array of photo generation results.
File path (null if failed)
Example
curl -X POST http://localhost:8000/generate/dataset \
-H "Content-Type: application/json" \
-d '{
"header": {
"doc_number": "00054321",
"date": "15/04/2026",
"emitter_name": "ACME FOODS S.A.",
"receiver_name": "DISTRIBUIDORA CENTRAL LTDA."
},
"items": [
{"description": "HARINA DE TRIGO 25KG", "qty": 40, "unit": "UN", "unit_price": 12500, "total": 500000}
],
"presets": ["full_picture", "blurry"]
}'
{
"run_id": "c3d4e5f6g7",
"document": {
"html": "output/c3d4e5f6g7/guia_despacho_00054321.html",
"png": "output/c3d4e5f6g7/guia_despacho_00054321.png",
"pdf": "output/c3d4e5f6g7/guia_despacho_00054321.pdf"
},
"photos": [
{"name": "full_picture", "path": "output/c3d4e5f6g7/photos/photo_full_picture.png", "ok": true},
{"name": "blurry", "path": "output/c3d4e5f6g7/photos/photo_blurry.png", "ok": true}
]
}