Skip to content

API Overview

The Glyph API provides programmatic access to document generation and AI-powered customization. Use it to build custom integrations, automate document workflows, or create your own editor experiences.

Quick Reference: Which Endpoint Should I Use?

Section titled “Quick Reference: Which Endpoint Should I Use?”
EndpointInputReturnsUse Case
/v1/createdata, html, or urlJSON with hosted URL + metadataRecommended for integrations (Airtable, Zapier, n8n)
/v1/generatehtml + optional sessionIdBinary PDF/PNG streamLow-level, for streaming or direct file download
/v1/preview + /v1/modify + /v1/generatetemplate + dataBinary PDFInteractive editing flow with AI modifications
https://api.glyph.you

For self-hosted deployments, use your own domain.

The current API version is v1. All endpoints are prefixed with /v1/.

All API requests require authentication via API key:

Terminal window
curl -X POST https://api.glyph.you/v1/preview \
-H "Authorization: Bearer gk_your_api_key" \
-H "Content-Type: application/json" \
-d '{"template": "quote-modern", "data": {...}}'

See Authentication for details.

EndpointDescription
POST /v1/createOne-call PDF generation: Send data, HTML, or URL - get PDF with hosted URL
POST /v1/previewRender template with data, get HTML and session ID
POST /v1/modifyApply AI modifications to a session
POST /v1/generateGenerate PDF or PNG from HTML (returns binary stream)
POST /v1/batch/generateGenerate up to 10 PDFs in one request
GET /v1/templatesList available templates with schemas
POST /v1/airtable/connectConnect Airtable and fetch records for PDFs
POST /v1/auth/signupSelf-service signup, get a free API key
StepRequestResponse
1. PreviewClient → POST /v1/preview (template + data) → APIAPI → HTML + sessionId → Client
2. ModifyClient → POST /v1/modify (sessionId + prompt) → API → Claude AIClaude AI → Modified HTML → API → New HTML + changes → Client
3. GenerateClient → POST /v1/generate (sessionId) → APIAPI → PDF file → Client

All POST requests accept JSON:

{
"template": "quote-modern",
"data": {
"client": { "name": "John Smith" },
"lineItems": [...],
"totals": { "subtotal": 1000, "total": 1000 }
}
}

Successful responses return JSON:

{
"html": "<html>...</html>",
"sessionId": "550e8400-e29b-41d4-a716-446655440000"
}

Error responses include an error code:

{
"error": "Validation failed",
"code": "VALIDATION_ERROR",
"details": [...]
}

All endpoints are rate-limited based on your tier:

TierRequests/Minute
Free10
Pro60
Scale120
Enterprise300

See Rate Limits for details.

Check API availability:

Terminal window
curl https://api.glyph.you/health

Response:

{
"status": "ok",
"version": "0.49.0",
"timestamp": "2026-02-07T12:00:00.000Z"
}

While you can use the API directly, we provide SDKs for easier integration:

  • JavaScript/TypeScript: @glyphpdf/sdk - Includes the <glyph-editor> web component
  • Python: Interested? Let us know at hello@glyph.you
  • Ruby: Interested? Let us know at hello@glyph.you