Developer Guide
Welcome to the RenderDoc Developer Guide! This guide provides comprehensive technical documentation for integrating RenderDoc into your applications.
What You'll Learn
This developer guide covers everything you need to integrate RenderDoc programmatically:
Getting Started
- Authentication - API keys, JWT tokens, and OAuth
- Generating Documents - Generate PDFs and Excel files
- Working with Templates - Create, manage, and use templates via API
Advanced Features
- Template Schema - Understanding the template JSON structure
- Error Handling - Handle API errors gracefully
- Rate Limiting - Understand API limits and quotas
Integration
- Best Practices - Security, performance, and optimization tips
Quick Example
Here's a quick example to get you started with generating a PDF document:
const response = await fetch('https://api.renderdoc.dev/api/v1/documents/generate', {
method: 'POST',
headers: {
'Authorization': 'Bearer rd_sk_abc123xyz456...',
'Content-Type': 'application/json'
},
body: JSON.stringify({
templateId: 'invoice-template',
format: 'pdf',
variables: {
invoiceNumber: 'INV-2025-001',
customerName: 'Acme Corporation',
lineItems: [
{ description: 'Consulting', quantity: 10, price: 100 },
{ description: 'Development', quantity: 5, price: 150 }
],
total: 1750.00
}
})
});
const data = await response.json();
console.log('Document ready:', data.downloadUrl);
Note: All documents are generated from templates. Templates are created via the Dashboard or API.
Base URL
All API requests should be made to:
https://api.renderdoc.dev
Authentication
RenderDoc uses API keys for authentication. Include your API key in the Authorization header:
curl https://api.renderdoc.dev/api/v1/documents/generate \
-H "Authorization: Bearer rd_sk_abc123xyz456..." \
-H "Content-Type: application/json" \
-d '{"templateId": "...", "format": "pdf", "variables": {...}}'
Learn more about Authentication →
Core Concepts
Templates
Templates are reusable document designs. They define:
- Layout: How content is arranged (headers, sections, tables)
- Variables: Placeholders for dynamic data (
{{customerName}}) - Formatting: Styles, fonts, colors
- Format: PDF or Excel output
Document Generation
Generate documents by:
- Providing a template ID
- Specifying the output format (pdf/xlsx)
- Passing variables to populate the template
Batch Processing
For high-volume generation:
- Submit a batch request with multiple documents
- Receive a batch ID
- Poll for status or receive webhook notification
- Download generated documents
Language Examples
The RenderDoc API is a standard REST API that works with any HTTP client. Here are examples in popular languages:
Node.js
import { RenderDoc } from '@renderdoc/sdk';
const client = new RenderDoc({ apiKey: process.env.RENDERDOC_API_KEY });
const result = await client.documents.generate({
templateId: 'invoice-template',
format: 'pdf',
variables: {
invoiceNumber: 'INV-001',
customerName: 'Acme Corp'
}
});
Python
from renderdoc import RenderDoc
client = RenderDoc(api_key=os.environ["RENDERDOC_API_KEY"])
result = client.documents.generate(
template_id="invoice-template",
format="pdf",
variables={
"invoiceNumber": "INV-001",
"customerName": "Acme Corp"
}
)
Java
RenderDoc client = new RenderDoc(System.getenv("RENDERDOC_API_KEY"));
GenerateResult result = client.documents().generate(
GenerateRequest.builder()
.templateId("invoice-template")
.format("pdf")
.variable("invoiceNumber", "INV-001")
.variable("customerName", "Acme Corp")
.build()
);
cURL
curl -X POST https://api.renderdoc.dev/api/v1/documents/generate \
-H "Authorization: Bearer rd_sk_..." \
-H "Content-Type: application/json" \
-d '{
"templateId": "invoice-template",
"format": "pdf",
"variables": {
"invoiceNumber": "INV-001",
"customerName": "Acme Corp"
}
}'
See specific endpoint documentation in the API Reference for detailed examples.
Getting Help
- 📚 Check the API Reference for complete endpoint documentation
- 📖 Browse the User Guide for platform features
- 📧 Email us: [email protected]
Ready to integrate? → Start with Authentication