PDF and Export API
The PDF and Export API provides endpoints for exporting processed documents in different formats. These endpoints allow you to convert your processed content into PDF, JSON, or Markdown formats for easy sharing and distribution.
API Endpoints
Get JSON Format
/pdf/ID/json Retrieve a document in JSON format.
curl -X GET https://api.shrinked.com/pdf/doc123456/json?includeReferences=true \ -H "x-api-key: YOUR_API_KEY"{ "document": { "id": "doc123456", "title": "Quarterly Earnings Call Transcript", "content": { "sections": [ { "title": "Introduction", "content": "Good morning everyone and welcome to our quarterly earnings call...", "references": [ { "timestamp": "00:00:15", "speaker": "John Smith, CEO" } ] }, { "title": "Financial Overview", "content": "I'm pleased to report that we've exceeded our quarterly targets...", "references": [ { "timestamp": "00:01:30", "speaker": "Jane Doe, CFO" } ] } ] }, "metadata": { "source": "https://example.com/earnings-call.mp3", "processingTime": 125, "wordCount": 2500, "language": "en" } }}Get Markdown Format
/pdf/ID/markdown Retrieve a document in Markdown format.
curl -X GET https://api.shrinked.com/pdf/doc123456/markdown?includeReferences=true \ -H "x-api-key: YOUR_API_KEY"# Quarterly Earnings Call Transcript
## Introduction
Good morning everyone and welcome to our quarterly earnings call...
> Speaker: John Smith, CEO [00:00:15]
## Financial Overview
I'm pleased to report that we've exceeded our quarterly targets...
> Speaker: Jane Doe, CFO [00:01:30]Get PDF Document
/pdf/ID/document Download a document in PDF format.
curl -X GET https://api.shrinked.com/pdf/doc123456/document?template=report \ -H "x-api-key: YOUR_API_KEY" \ --output document.pdfBinary PDF file.
PDF Customization Options
When generating PDF documents, you can customize various aspects of the output:
Templates
default
Standard template with basic formatting
report
Business report layout with table of contents
transcript
Optimized for transcripts with speaker identification
article
Magazine-style layout for content
Additional Options
| Option | Type | Description |
|---|---|---|
fontSize | string | Font size for body text (e.g., “12pt”) |
fontFamily | string | Font family (e.g., “Arial”, “Times”) |
includeTimestamps | boolean | Whether to include media timestamps |
includeToc | boolean | Whether to include table of contents |
headerText | string | Custom header text |
footerText | string | Custom footer text |
Example Request with Customization
curl -X GET "https://api.shrinked.com/pdf/doc123456/document?template=report&fontSize=11pt&fontFamily=Arial&includeToc=true" \ -H "x-api-key: YOUR_API_KEY" \ --output document.pdfExport Formats
JSON
Structured data format for programmatic use
/pdf/ID/jsonMarkdown
Text-based markup for content editing
/pdf/ID/markdownPortable Document Format for distribution
/pdf/ID/documentHTML
Web format for online viewing
/pdf/ID/htmlComing SoonDOCX
Microsoft Word format
/pdf/ID/docxComing SoonUsage Limits
- Maximum 100 export requests per hour per API key
- PDF generation limited to 50MB per document
- Concurrent exports limited to 5 per account
Contact support to increase these limits for your account.