Skip to main content

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

Advanced Features

Integration


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:

  1. Providing a template ID
  2. Specifying the output format (pdf/xlsx)
  3. Passing variables to populate the template

Batch Processing

For high-volume generation:

  1. Submit a batch request with multiple documents
  2. Receive a batch ID
  3. Poll for status or receive webhook notification
  4. 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


Ready to integrate? → Start with Authentication