Converter Service
The Converter service transforms files between different formats. It supports InDesign and POD (Print on Demand) package conversion, PDF conversion, font format conversion, and image processing.
Base URL: /v1/converter/
Scopes: converter (full), converter:read, converter:write
Token type: any — converter endpoints accept either a user token or a client token. See Token Types.
Endpoints
| Method | Path | Scopes | Description |
|---|---|---|---|
GET | /v1/converter/jobs | converter / converter:read | List conversion jobs |
POST | /v1/converter/jobs | converter / converter:write | Create a conversion job |
GET | /v1/converter/jobs/{id} | converter / converter:read | Job detail |
GET | /v1/converter/jobs/{id}/files | converter / converter:read | Download the converted files, see File Types |
GET | /health/converter | — | Service health (public, unauthenticated) |
Supported Conversions
Package Conversion
| Input | Output | Description |
|---|---|---|
indesign_package | typograph_package | Convert an InDesign package (zipped Collect-for-Output bundle) to Typograph format |
pod_package | typograph_package | Convert a POD (Print on Demand) package to Typograph format |
PDF Conversion
| Input | Output | Description |
|---|---|---|
pdf | typograph_package | Convert a PDF to a template, see Convert a PDF |
ai | typograph_package | Convert an Illustrator file saved with PDF compatibility to a template |
Font Conversion
| Input Types | Output Types |
|---|---|
eot, otf, ttf, woff, woff2, ttc | ttf, otf, woff, woff2 |
Image Conversion
| Input Types | Output Types |
|---|---|
bmp, ai, eps, gif, psd, jpg, jpeg, png, svg, webp, tiff, tif | jpg, png, webp, svg |
An ai file converts to png or svg only: a job asking for jpg or webp is refused with a 422 (validation_error). Its image_variants are allowed: that rule is about the output type, not the variants inside the zip. Into a typograph_package, an ai file is a PDF conversion.
Variants for an asset store
| Input Types | Output Type |
|---|---|
A font (eot, otf, ttf, woff, woff2, ttc), or font_package: a zip of fonts | font_variants |
An image (bmp, ai, eps, gif, psd, jpg, jpeg, png, svg, webp, tiff, tif), or image_package: a zip of images | image_variants |
One job converts a file, or a whole zip of them, into everything a store serves for it, as one zip with a manifest.json (layouts under Package Formats). A zip of many files costs one job instead of one each.
Package Formats
Package conversions exchange ZIP archives. The exact archive layout matters — the converter validates and rejects anything it can't parse. The structures below describe what to send in (input.source.url) and what to expect back (uploaded to output.upload.url).
indesign_package (input)
A standard Adobe InDesign Collect for Output bundle, zipped. The archive may contain a single wrapper folder or place the bundle contents at the root — both are accepted (the converter ignores __MACOSX and .DS_Store entries).
indesign_package.zip
└── <bundle-folder>/ (optional wrapper — may be omitted)
├── <document>.idml required — the InDesign document
├── Links/ required if the document references images
│ ├── photo-01.jpg
│ └── logo.ai
└── Document fonts/ required if the document references fonts
├── MyFont-Regular.otf
└── MyFont-Bold.otf
Linked images and embedded fonts are converted as part of the job — see the typograph_package output below for what comes back.
pod_package (input)
A ZIP containing the MY VIVENDA POD template JSON. The converter scans the archive, skips macOS metadata (__MACOSX/, ._*), and uses the first .json file it finds.
pod_package.zip
└── <any-name>.json POD template — single template object OR array of templates
The JSON itself follows the POD template schema. Multiple templates in one array become multiple pages in the resulting Typograph document.
font_package and image_package (input)
A zip of fonts, or of images. Every file in it is converted, at any depth of folders, except
hidden files (a name starting with .) and __MACOSX entries, so put only fonts, or only images,
in it:
image_package.zip
├── logo.svg
├── photos/cover.tiff
└── photos/team.psd
image_variants (output)
image_variants.zip
├── images/<name>_<uuid>/original.<ext> the image as it came in
├── images/<name>_<uuid>/print.png
├── images/<name>_<uuid>/editor.webp
├── images/<name>_<uuid>/thumbnail.webp
└── manifest.json one entry per image
font_variants (output)
font_variants.zip
├── fonts/<stem>_<uuid>/original.<ext> the font as it came in
├── fonts/<stem>_<uuid>/<stem>.ttf the TrueType the publisher reads
└── manifest.json one entry per font, with its family and style
A variable font becomes one static font per named instance, so one upload can be several entries.
typograph_package (output)
The converted bundle. Contents differ slightly between InDesign and POD sources:
typograph_package.zip (from indesign_package conversion)
├── template_bundle.json { "version": "1.0.0", "template": {...}, "manifest": {...} }
├── template_thumbnail.webp the first page as a picture (see Text Layout)
├── images/ browser-ready variants of all linked images
│ ├── photo-01.webp
│ └── logo.png
└── fonts/ TTF versions of all embedded fonts
├── MyFont-Regular.ttf
└── MyFont-Bold.ttf
typograph_package.zip (from pod_package conversion)
└── template_bundle.json { "version": "1.0.0", "template": {...}, "manifest": {...} }
typograph_package.zip (from pdf or ai conversion)
├── template_bundle.json { "version": "1.0.0", "template": {...}, "manifest": {...} }
├── images/ the images of the PDF
├── fonts/google/ the fonts Google Fonts has, in full (see What to expect)
└── fonts/pdf/ the other fonts, as previews from the PDF (see What to expect)
The template_bundle.json carries both the template (spreads, elements, styles, swatches, font_data) and the manifest (referenced images and fonts) as top-level fields. See the Documents concept page for the full schema.
A package made before the file was renamed holds it as templatebundle.json. Every Typograph reader of a package, from an upload to the portal to the canvas, still takes that name, so an older package keeps working; a new one always carries template_bundle.json.
The Publisher Service does not accept typograph_package.zip directly, but it does accept the template_bundle.json inside it: unzip the package, host template_bundle.json, and pass its URL as input.bundle.url. Images and fonts in images/ and fonts/ are referenced by URL in the manifest, so they need to stay reachable from the Publisher worker.
Create a Conversion Job
Request Structure
| Property | Type | Required | Description |
|---|---|---|---|
tag | string | No | Optional tag to identify or group jobs (max 255 chars) |
input | object | Yes | Input file specification |
input.type | string | Yes | Input file format |
input.source | object | Yes | Source file URL and optional headers |
input.source.url | string | Yes | URL to download input file |
input.source.headers | object | No | HTTP headers for downloading (max 5) |
output | object | Yes | Output specification |
output.type | string | Yes | Output file format |
output.upload | object | Yes | Target for converted files |
output.upload.url | string | Yes | URL to upload converted files |
output.upload.headers | object | No | HTTP headers for uploading (max 5) |
output.config | object | No | Image options (see Image Configuration), or single_pages for a typograph_package (see Single pages) |
url_headers | array | No | Header rules for the source download and the upload, at most 10: see Headers for the URLs of a job |
Convert an InDesign Package
Convert an InDesign package to Typograph format:
curl -X POST https://api.typograph.nl/v1/converter/jobs \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"tag": "design-project-alpha",
"input": {
"type": "indesign_package",
"source": {
"url": "https://example.com/packages/design.zip"
}
},
"output": {
"type": "typograph_package",
"upload": {
"url": "https://example.com/webhook/upload"
}
}
}'
Response
{
"id": "01234567-89ab-cdef-0123-456789abcdef",
"tag": "design-project-alpha",
"status": "queued",
"message": null,
"warnings": [],
"input": {
"type": "indesign_package",
"source": {
"url": "https://example.com/packages/design.zip"
}
},
"output": {
"type": "typograph_package",
"upload": {
"url": "https://example.com/webhook/upload"
}
},
"created_at": "<ISO 8601 timestamp>"
}
Convert a POD Package
Convert a POD (Print on Demand) package — a zipped archive of POD-schema documents — to Typograph format:
curl -X POST https://api.typograph.nl/v1/converter/jobs \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"tag": "pod-import-batch-001",
"input": {
"type": "pod_package",
"source": {
"url": "https://example.com/pod/template.zip"
}
},
"output": {
"type": "typograph_package",
"upload": {
"url": "https://example.com/webhook/upload"
}
}
}'
The response shape is the same as for InDesign packages — only input.type differs. POD packages always convert to typograph_package; pairing pod_package with any other output type is rejected with a validation error.
Convert a PDF
Convert a PDF, or an Illustrator file saved with PDF compatibility, to a template:
curl -X POST https://api.typograph.nl/v1/converter/jobs \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"tag": "spring-flyer",
"input": {
"type": "pdf",
"source": {
"url": "https://example.com/files/spring-flyer.pdf"
}
},
"output": {
"type": "typograph_package",
"upload": {
"url": "https://example.com/webhook/upload"
}
}
}'
The response shape is the same as for InDesign packages. For an Illustrator file, set input.type to ai. A PDF converts to typograph_package only: pairing pdf with any other output type is refused with a 422 (validation_error), and so is output.config.single_pages, because every page of a PDF already becomes one page.
The source URL does not have to end in .pdf: the converter checks the file itself, so a presigned URL without a file name works. The template is named after the file name in the URL, or document when the URL names none.
What to expect
A PDF describes how a page looks, not how it was built, so a converted PDF is a starting point: the layout, the text as editable text, the images and the colours are carried over, and the template needs finishing rather than rebuilding. Check the result before printing it.
| Carried over | Not carried over (yet) |
|---|---|
| Every page, as one page of the template | Gradients and patterns (pdf_gradient) |
| Text, as editable text boxes in their own lines | Spot colours (pdf_spot_color) |
| Photos and other images, with their transparency: a soft shadow or a blurred shape stays see-through | Some image formats and colour spaces, such as CMYK pixels that are not a JPEG, and 16-bit images (pdf_image_unsupported) |
| Vector shapes with a solid colour | The transparency of a CMYK JPEG (the JPEG itself is carried over), or of an image whose transparency cannot be read (pdf_image_transparency_lost) |
| The order of what lies on top, and how shapes and images blend with what lies under them (multiply, overlay, lighten and the other blend modes) | A scanned page has no text: it comes out as an image |
The conversion is built and tuned on PDFs exported from Canva. A PDF from another program converts as far as the converter reads it, and every item it could not carry over is a warning on the job (below), so nothing is dropped without saying so. For the best result:
- export a PDF rather than flattened print output, and without a password;
- keep text as text, not as outlines;
- save an Illustrator file with Create PDF Compatible File on.
A PDF only holds its fonts cut down to the letters the design uses. So every font that Google Fonts has comes along in full: its file is in the package under fonts/google/, its entry in the manifest has "source": "google", and the job has a font_added warning for it (below). Google Fonts publishes its fonts under open licences, most of them the SIL Open Font License; the licence of a family is on its page at Google Fonts.
Any other font comes along as a preview when the PDF embeds it: the cut-down copy, as a TrueType file under fonts/pdf/, its manifest entry with "source": "pdf" and the letters it has in available_characters, and a font_preview warning. A preview shows the design as it was, but it has only the letters the PDF uses, and it is not a font to edit or print with: upload the complete font and use that. Typograph imports such a font as a preview of its template and asks for the complete one (Template uploads). A font is not taken from the PDF when its owner does not allow it to be embedded, or when the copy cannot be read as a font a browser can show.
A font that comes along neither way is named by the template by family and style only, without a file; text in it is shown in the default font, with a font_missing warning. Add the complete fonts to the project before editing or printing the template. When Google Fonts cannot be reached, the job still completes, without those fonts.
Limits and failures
A PDF conversion takes a file of at most 100 MB. A larger file fails the job with The input file could not be downloaded., like any download that fails.
When the file cannot be converted, the job fails (status failed, nothing uploaded) and message says why, in a sentence to show as it is:
message | What to do |
|---|---|
The file is not a PDF. | Send a PDF |
The Illustrator file was not saved with PDF compatibility. Save it with "Create PDF Compatible File" on, or export it as a PDF. | Save the .ai file again as it says |
The PDF is protected by a password. Upload it without one. | Save the PDF without a password |
The PDF could not be read. | Export the PDF again from the program that made it |
The PDF could not be read within 120 seconds. | Export a simpler PDF, or split it |
Warnings
Every converter job, whatever it converts, has warnings: what the conversion could not carry
over, one entry per item. Every entry has a code to act on and a message to show as it is, and
may carry data of its own:
"warnings": [
{"code": "pdf_gradient", "message": "Page 1: a shape could not be converted (it is a colour gradient or a pattern).", "page": 1}
]
It is always a list, empty when there is nothing to report, in GET /v1/converter/jobs/{id} and in
the conversion.completed event. Read a warning by its code, and ignore a code you do not know:
more are added as conversions learn to report them. message keeps its meaning: why a job failed,
or a note about the whole job (see Text Layout).
A PDF conversion fills warnings with what it could not carry over, with the page it is on in
page (counted from 1). Shapes with the same problem on one page are one warning, with the count
in message. A job keeps at most 10 warnings per code; the last of them then has more, the
number of warnings with that code that were left out.
code | Meaning |
|---|---|
pdf_image_unsupported | An image in a format, compression or colour space that is not read (CMYK pixels that are not a JPEG, 16-bit); the reason is in message |
pdf_image_damaged | An image whose pixel data is broken |
pdf_image_uncropped | An image cropped by more than one outline at once, placed uncropped |
pdf_image_transparency_lost | A partly transparent image whose transparency could not be kept (a CMYK JPEG, or a mask that cannot be read), placed without it |
pdf_gradient | Shapes filled with a gradient or a pattern, not carried over |
pdf_spot_color | Shapes in a spot colour, not carried over |
pdf_shape_unsupported | Shapes not carried over for another reason; the reason is in message |
pdf_shape_uncropped | Shapes cropped in a way that could not be kept, shown whole |
pdf_font_default | Text in a font the PDF gives no name (emoji, some text effects), shown in the default font |
A PDF conversion also adds a font_added for every font it took from Google Fonts, with the font in name as a person reads it (Montserrat Bold, or Anton for a regular style) and where it came from in source:
{"code": "font_added", "message": "The font \"Montserrat Bold\" was added from Google Fonts.", "source": "google", "name": "Montserrat Bold"}
A font_preview for every font it shows from the PDF's own copy, with source pdf, and a font_missing for every font whose text is in the default font, each with the font in name:
{"code": "font_preview", "message": "The font \"Helvetica World Bold\" is shown as a preview from the PDF, with only the characters the PDF uses. Upload the complete font to edit the text.", "source": "pdf", "name": "Helvetica World Bold"}
{"code": "font_missing", "message": "The font \"Lust Didone\" is not in the package: its text is shown in the default font until the font is uploaded.", "name": "Lust Didone"}
Other conversions do not fill warnings yet.
Text Layout
A converted document carries its text, its styles and its frames, but an InDesign source does not say where each line breaks or where each word sits. Typograph works that out — the text layout — with the same engine the editor uses, as the last step of every InDesign package conversion. The typograph_package that comes back has its text laid out, so it can go to the Publisher Service without being opened in the editor first.
A POD document names font slots rather than fonts, and the real fonts are set later. Its text cannot be laid out until they are, so a pod_package conversion comes back without text layout, as before, with its pages as they are. Asking a pod_package job for single pages (true or "keep_together") is refused with 422.
The same step draws the first page as template_thumbnail.webp, at most 1600 pixels on its longest side, next to template_bundle.json. Show it as a preview of the template. A package uploaded to Typograph uses it as the template's thumbnail until the template is first saved in the editor. A package whose text could not be laid out comes back without one.
The layout uses the fonts in the package. If a font the document uses is missing from the package or cannot be read, the text is not laid out at all, rather than laid out in a substitute font that would move every line break. The job still completes, and message says why and names the fonts. The pages are still split as single_pages asks (below): that does not depend on the text.
message on a completed job | Meaning | What to do |
|---|---|---|
null | The text is laid out | Nothing |
Converted without text layout: these fonts did not load: "Gotham" (normal), "Gotham" (bold). Open it in the editor once before printing. | These fonts are missing or unreadable. At most five are named, then and n more; a font known only by its file is named by the file | Add the fonts to the InDesign package (Document fonts/) and convert again, or open the template in the editor once, with the fonts available, before printing |
Converted without text layout: the layout service did not answer. Open it in the editor once before printing. | The layout step was unavailable | Convert again later, or open the template in the editor once before printing |
When the layout service did not answer, no pages are split either: unless the job asked for "single_pages": false (below), that message ends with single_pages was not applied: the template keeps its spreads.
If the converted document cannot be opened at all, so that no page can be built from it, the job fails rather than deliver a blank template: status is failed, nothing is uploaded, and message is The converted template could not be opened: its pages could not be built from the converted document, so it was not uploaded. The conversion.failed event carries it in message and in error, with error_code document_not_built (see Webhooks). Such a template would also open blank in the editor: write to support@typograph.nl with the job id and the InDesign package.
A font family that is missing from the package entirely is not always detected: such a template can come back laid out in a substitute face, with message empty. Until that is fixed, check InDesign's package report for missing fonts before converting, and look at the converted template before printing it.
InDesign's File ▸ Package does not copy fonts activated through Adobe Fonts (Creative Cloud) into Document fonts/; the package report lists them as not included. That is the most common reason a font is missing. Use a font file you can package, or add it to Document fonts/ yourself.
message on completed jobs toomessage is no longer only for failed jobs. A package conversion can complete without text layout; check message on the job (or the conversion.completed event) before sending the template to print.
Single pages
By default a converted InDesign template comes back as single pages, except the spreads the document keeps together. Set output.config.single_pages to choose:
single_pages | Result |
|---|---|
"keep_together" (default) | Single pages, except the spreads the document keeps together: InDesign spreads that do not allow their pages to shuffle (an island spread such as a gatefold or a centrefold), and a document that opens on a two-page spread |
true | Every spread split into single pages |
false | Spreads as in the source document: a two-page InDesign spread stays one spread |
To keep the spreads:
curl -X POST https://api.typograph.nl/v1/converter/jobs \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"tag": "brochure-spreads",
"input": {
"type": "indesign_package",
"source": {
"url": "https://example.com/packages/brochure.zip"
}
},
"output": {
"type": "typograph_package",
"upload": {
"url": "https://example.com/webhook/upload"
},
"config": {
"single_pages": false
}
}
}'
single_pages applies to a typograph_package output only; with any other output type the request is refused with 422 (single_pages can only be set when the output type is typograph_package.). Like the image options, it is not repeated in job responses.
Convert Fonts
Convert a TTF font to WOFF2 for web use:
curl -X POST https://api.typograph.nl/v1/converter/jobs \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"tag": "font-conversion-001",
"input": {
"type": "ttf",
"source": {
"url": "https://example.com/fonts/myfont.ttf"
}
},
"output": {
"type": "woff2",
"upload": {
"url": "https://example.com/webhook/upload"
}
}
}'
Convert and Resize Images
Convert images with optional resizing and optimization:
curl -X POST https://api.typograph.nl/v1/converter/jobs \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"tag": "image-optimization",
"input": {
"type": "png",
"source": {
"url": "https://example.com/images/photo.png"
}
},
"output": {
"type": "webp",
"upload": {
"url": "https://example.com/webhook/upload"
},
"config": {
"width": 1200,
"height": 800,
"quality": 85,
"fit": "max",
"strip": true
}
}
}'
Image Configuration
| Property | Type | Description |
|---|---|---|
width | integer | Target width in pixels (1-10000) |
height | integer | Target height in pixels (1-10000) |
quality | integer | Output quality (1-100, default: 90) |
fit | string | Sizing method (see below) |
strip | boolean | Remove metadata from output |
Fit Options
| Value | Description |
|---|---|
max | Scale down to fit within the dimensions, maintaining aspect ratio. An image already smaller than the box keeps its own size: max never enlarges |
min | Scale to cover the dimensions, maintaining aspect ratio, so one side may come out larger than asked. Enlarges an image smaller than the box |
exact | Stretch to exactly width × height, ignoring the aspect ratio. Needs both. Enlarges an image smaller than the box |
crop | Scale to cover the dimensions, then cut the centre to exactly width × height. Needs both. Enlarges an image smaller than the box |
exact and crop without both width and height are refused with a 422 (validation_error). A vector image (SVG, AI, EPS) has no pixel size of its own. Rendered to PNG, every mode scales it to the box. Converted to JPG or WEBP (SVG and EPS only: an AI is refused, see Image Conversion), it is first rasterised at its own size and then sized like any other image, so max does not enlarge it beyond that size. min needs a size, and an EPS has none until it is rendered: an EPS to JPG or WEBP with fit min is refused with a 422 (validation_error). Convert it to PNG, or choose another fit.
Download Converted Files
Download the output once conversion is complete:
curl "https://api.typograph.nl/v1/converter/jobs/{id}/files?file_type=output" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-o converted-file.zip
File Types
| Type | Description |
|---|---|
output | Converted file (default) |
input | Original source file |
Upload Request Format
When a job completes successfully, Typograph sends the converted file as a single HTTP PUT request to output.upload.url. Your upload target must accept this request shape:
| Property | Value |
|---|---|
| Method | PUT |
| URL | Exactly the URL you provided in output.upload.url (redirects are not followed) |
Content-Type | Detected from the file — e.g. font/woff2, image/webp, image/png, application/zip for package conversions |
User-Agent | Typograph/Util-Upload |
| Custom headers | Merged from output.upload.headers, or else from the url_headers rule that covers the upload URL (can't override Content-Type or User-Agent) |
| Body | Raw file bytes, streamed (no multipart / form-data wrapper) |
| Connection timeout | 10 seconds |
| Transfer timeout | 300 seconds |
Your endpoint must respond with an HTTP status in the 200–299 range — anything else fails the job.
Uploading Directly to Cloud Storage
You can point output.upload.url straight at a presigned URL from S3, GCS, Azure Blob, Cloudflare R2, etc. Each provider accepts signed PUT requests with a raw body; set output.upload.headers to whatever the signer expects. Make sure the presigned URL is signed against the content type Typograph will send (see the list above) — protected headers (Content-Type, User-Agent) cannot be overridden.
Custom Headers
Give a URL that needs a header its own headers, as below, or give the job url_headers: rules that send their headers with every request to a URL they cover, for both the source download and the upload.
{
"url_headers": [
{
"match": "https://storage.example.com/private/",
"headers": { "Authorization": "Bearer storage-token" }
}
],
"input": {
"type": "png",
"source": { "url": "https://storage.example.com/private/image.png" }
},
"output": {
"type": "webp",
"upload": { "url": "https://webhook.example.com/uploads" }
}
}
The per-URL form, an exact rule that wins over any prefix:
{
"tag": "protected-conversion",
"input": {
"type": "png",
"source": {
"url": "https://storage.example.com/private/image.png",
"headers": {
"Authorization": "Bearer storage-token"
}
}
},
"output": {
"type": "webp",
"upload": {
"url": "https://webhook.example.com/uploads",
"headers": {
"X-API-Key": "webhook-api-key"
}
}
}
}
Examples
PSD to PNG Thumbnail
curl -X POST https://api.typograph.nl/v1/converter/jobs \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"tag": "psd-thumbnail",
"input": {
"type": "psd",
"source": {
"url": "https://example.com/designs/layout.psd"
}
},
"output": {
"type": "png",
"upload": {
"url": "https://example.com/webhook/upload"
},
"config": {
"width": 400,
"fit": "max"
}
}
}'
AI to SVG Conversion
curl -X POST https://api.typograph.nl/v1/converter/jobs \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"tag": "logo-conversion",
"input": {
"type": "ai",
"source": {
"url": "https://example.com/logos/company-logo.ai"
}
},
"output": {
"type": "svg",
"upload": {
"url": "https://example.com/webhook/upload"
}
}
}'
Batch Font Conversion
Convert multiple fonts by creating separate jobs:
for font in regular bold italic; do
curl -X POST https://api.typograph.nl/v1/converter/jobs \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d "{
\"tag\": \"font-${font}\",
\"input\": {
\"type\": \"otf\",
\"source\": {
\"url\": \"https://example.com/fonts/myfont-${font}.otf\"
}
},
\"output\": {
\"type\": \"woff2\",
\"upload\": {
\"url\": \"https://example.com/webhook/upload\"
}
}
}"
done
Complete Example with Headers
Convert an image from protected storage with custom headers:
curl -X POST https://api.typograph.nl/v1/converter/jobs \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"tag": "premium-image-conversion",
"input": {
"type": "tiff",
"source": {
"url": "https://storage.example.com/originals/photo.tiff",
"headers": {
"Authorization": "Bearer storage-token"
}
}
},
"output": {
"type": "webp",
"upload": {
"url": "https://cdn.example.com/upload",
"headers": {
"X-Upload-Token": "upload-secret-key"
}
},
"config": {
"width": 1920,
"height": 1080,
"quality": 90,
"fit": "max",
"strip": true
}
}
}'