Docs API Reference
REST API
API Reference
Integrate PDF generation into your applications with our simple REST API.
API Key Required (Free Beta)
We're currently in beta! To get your free API key, send an email to report@yet.lu.
Include the API key in every request using the x-api-key header.
Base URL
https://api.yet.report Generate PDF
Create a new PDF from text or markdown content.
POST
/generate 1 Request Body
JSON
{
"content": "# Your Content Here\n\nMarkdown or plain text...",
"style": "corporate" // optional: corporate, academic, legal, etc.
} 2 Response
Response
200 OK {
"success": true,
"job_id": "81e8827a-8207-41d7-abc6-41ee530fa7da",
"message": "Processing started"
} | Field | Type | Description |
|---|---|---|
success | boolean | Whether the request was accepted |
job_id | string | Unique job identifier for tracking |
message | string | Status message |
error | string | Error message (when failed) |
Check Status
Poll this endpoint to check the status of a PDF generation job.
GET
/status/{jobId} 1 Response
Response
200 OK {
"job_id": "81e8827a-8207-41d7-abc6-41ee530fa7da",
"status": "complete",
"step": 5,
"total_steps": 5,
"message": "Complete!",
"pdf_url": "https://...",
"error": null
} 2 Status Values
| Status | Description |
|---|---|
started | Job created, processing beginning |
generating | AI is generating the document |
compiling | Compiling to PDF |
complete | Done - pdf_url contains download link |
failed | Error occurred - check error field |
Error Handling
The API uses standard HTTP status codes to indicate success or failure.
200 Success
202 Accepted - Job started
400 Bad request - Invalid input
403 Forbidden - Invalid or missing API key
404 Not found - Job ID not found
429 Rate limit exceeded
500 Server error
Rate Limits
Rate limits depend on your API key plan. During beta, all API keys have generous limits.
Need a custom plan? Contact us at report@yet.lu.
Examples
$
cURL
Terminal
curl -X POST https://api.yet.report/generate \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"content": "# Hello World\n\nMy first PDF!"}' JS
JavaScript (fetch)
JavaScript
const response = await fetch('https://api.yet.report/generate', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key': 'YOUR_API_KEY'
},
body: JSON.stringify({
content: '# Hello World\n\nMy first PDF!'
})
});
const { success, job_id } = await response.json();
console.log('Job ID:', job_id); PY
Python
Python
import requests
response = requests.post(
'https://api.yet.report/generate',
headers={'x-api-key': 'YOUR_API_KEY'},
json={'content': '# Hello World\n\nMy first PDF!'}
)
data = response.json()
print(f"Job ID: {data['job_id']}")