Get started · 5 min read
Quickstart
Generate your first PDF in three steps: get a key, publish a template, call the API.
Step 1: Create an API key
In the app, open API keys and create a test key. Keep it on your server, never in the browser.
export BOUROU_KEY="[YOUR TEST KEY]"Step 2: Publish a template
Start a new chat and describe the report. Check the preview and the schema, then press Publish. The template gets a slug you use in the API, such as monthly-sales.
| Field | Type | Format |
|---|---|---|
| month | string | "YYYY-MM" |
| region | enum | 4 values |
| revenue | number | — |
| accounts[] | array | object |
Step 3: Generate a report
Send the template slug, the version and the data. The data must match that version's schema.
curl -X POST https://api.bourou.dev/v1/reports \ -H "Authorization: Bearer $BOUROU_KEY" \ -H "Content-Type: application/json" \ -d '{ "template": "monthly-sales", "version": 3, "data": { "month": "2026-10", "region": "EMEA", "revenue": 184200, "accounts": [{ "name": "Acme", "amount": 42000 }] } }'The response holds the report id and a link to the PDF.
200 OK
{
"id": "rep_8f2a",
"template": "monthly-sales",
"version": 3,
"mode": "test",
"status": "succeeded",
"pdf_url": "https://[PDF URL]"
}Test and live
Test key
Free to use
For building and CI. 100 calls a month on Free, unlimited on Pro.
Live key
Counts toward your plan
For production. Failed calls are not counted.
Errors
| Code | Meaning | What to do |
|---|---|---|
| 401 | Missing or wrong key | Check the Authorization header |
| 404 | Template not found | Check the slug, and that it is published |
| 422 | Data does not match the schema | The response lists each field that failed |
| 429 | Live allowance used up | Wait for the next period or change plan |