# TemplateFox > TemplateFox is a PDF generation API. Design templates in a visual editor, then generate personalized PDFs via API with dynamic data binding. ## Quick Start - [Documentation](https://templatefox.com/docs): Getting started guide and overview - [API Reference](https://templatefox.com/docs/api-reference): Complete API documentation with endpoints, authentication, and examples ## Official SDKs Generate PDFs in your language of choice: - **TypeScript/JavaScript**: `npm install @templatefox/sdk` - **Python**: `pip install templatefox` - **Java**: Maven `io.github.templatefoxpdf:sdk` - **Go**: `go get github.com/TemplateFoxPDF/gosdk` - **PHP**: `composer require templatefox/sdk` - **Ruby**: `gem install templatefox` - **C#**: NuGet `TemplateFox.SDK` Full SDK documentation: [SDK Docs](https://templatefox.com/docs/sdks) ## API Base URL: `https://api.templatefox.com` Authentication: All requests require an API key in the `x-api-key` header. ### POST /v1/pdf/create Generate a PDF from a template. Request body: - `template_id` (string, required): The 12-character template ID - `data` (object, required): Key-value pairs for template variables - `export_type` (string, optional): `"url"` (default) or `"binary"` - `expiration` (number, optional): URL expiration in seconds (default: 86400) Example: ```bash curl -X POST https://api.templatefox.com/v1/pdf/create \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "template_id": "HMQywVpZxqAM", "data": { "customer_name": "John Doe", "invoice_number": "INV-001" } }' ``` Response: ```json { "url": "https://cdn.templatefox.com/generated/abc123.pdf", "credits_remaining": 29, "expires_in": 86400 } ``` ## Data Binding Use `{{variable_name}}` syntax in templates for dynamic content. Pass values via the `data` object in API requests. Supported types: strings, numbers (converted to string), dates (as strings), URLs (for images). ## Template Designer - [Designer Overview](https://templatefox.com/docs/designer/overview): Visual drag-and-drop interface for designing templates - [Components](https://templatefox.com/docs/designer/components): Text, Image, Table, and Container elements - [Tables](https://templatefox.com/docs/designer/tables): Creating dynamic tables with repeating rows - [Styling](https://templatefox.com/docs/designer/styling): Typography, colors, borders, and spacing - [Page Sections](https://templatefox.com/docs/designer/page-sections): Headers and footers that repeat on every page - [Containers](https://templatefox.com/docs/designer/containers): Grouping and layout elements ## Guides - [Data Binding](https://templatefox.com/docs/guides/data-binding): Injecting dynamic content into templates - [Barcodes & QR Codes](https://templatefox.com/docs/guides/barcodes-qrcodes): Adding barcodes and QR codes to PDFs - [System Variables](https://templatefox.com/docs/guides/system-variables): Built-in variables like page numbers and dates ## Free Tools Try PDF generation without signing up: - [Invoice Generator](https://templatefox.com/generators/free-online-invoice-generator) - [Certificate Maker](https://templatefox.com/generators/free-online-certificate-maker) - [Receipt Maker](https://templatefox.com/generators/free-online-receipt-maker) - [Packing Slip Generator](https://templatefox.com/generators/free-online-packing-slip-generator) - [Shipping Label Maker](https://templatefox.com/generators/free-online-shipping-label-maker) - [Barcode Sheet Generator](https://templatefox.com/generators/free-online-barcode-sheet-generator) - [QR Code Sheet Generator](https://templatefox.com/generators/free-online-qr-code-sheet-generator) All free tools: [Tools](https://templatefox.com/tools) ## Integrations - [n8n Community Node](https://www.npmjs.com/package/n8n-nodes-templatefox): Integrate TemplateFox into n8n workflows ## Error Codes | Status | Code | Description | |--------|------|-------------| | 400 | INVALID_REQUEST | Missing or invalid parameters | | 401 | UNAUTHORIZED | Invalid or missing API key | | 403 | FORBIDDEN | No credits remaining | | 404 | TEMPLATE_NOT_FOUND | Template ID not found | | 500 | INTERNAL_ERROR | Server error | ## Rate Limits - Free: 10 req/min, 100 req/day - Pro: 60 req/min, 10,000 req/day - Enterprise: Custom ## Optional - [Interactive API Docs](https://api.templatefox.com/docs): Swagger/OpenAPI documentation - [Dashboard](https://app.templatefox.com/dashboard): Manage API keys and templates