Document Generator (/api/v1/doc-generator)
Generate professional PDF documents for various business use cases.
All endpoints require authentication via X-API-Key and consume credits (DOC_GENERATION).
Generate a Document
- Method:
POST - Endpoint:
/api/v1/doc-generator/:type
Supported Document Types
| Type | Description |
|---|---|
nda | Non-Disclosure Agreement |
financial-summary | Financial Summary Report |
employment-contract | Employment Contract |
service-agreement | Service Agreement |
offer-letter | Job Offer Letter |
Each document type accepts a JSON body with the relevant fields for that document.
- cURL
- JavaScript
curl -X POST https://api.riskinmind.ai/api/v1/doc-generator/nda \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"party_a": "Company A",
"party_b": "Company B",
"effective_date": "2025-01-01"
}' --output nda.pdf
const response = await fetch('https://api.riskinmind.ai/api/v1/doc-generator/nda', {
method: 'POST',
headers: {
'X-API-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
party_a: "Company A",
party_b: "Company B",
effective_date: "2025-01-01"
})
});
const blob = await response.blob();
const url = URL.createObjectURL(blob);
const link = document.createElement("a");
link.href = url;
link.download = 'nda.pdf';
link.click();
Response
- Content-Type:
application/pdf - Returns: Binary PDF stream (
<type>-document.pdf)