Generate asynchronously
Submit a generation request and collect its result later.
Last updated
curl -X POST "https://<api-host>/generate" \
-H "X-Api-Key: $DOCAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"data": [
{
"sectionKey": "borrower",
"sectionData": {
"name": "Northwind Trading Co.",
"entityType": "Corporation"
}
},
{
"sectionKey": "terms",
"sectionData": {
"principal": 250000,
"ratePct": 7.25,
"termMonths": 60
}
}
],
"format": "docx",
"style": {
"lenderName": "Example Bank",
"tableOfContents": true
},
"webhookUrl": "https://example.com/hooks/docai"
}'