🔤 Custom Fonts
Upload your own fonts and reference them when creating video tasks. Useful for matching brand typography, or for languages whose glyphs aren't covered by the default template fonts.
Overview
Custom fonts are a two-step pattern:
- Upload once via
POST /fonts. You get back afontId. - Reference many times by passing that
fontIdinsiderenderOptions.styleOptionswhen creating video tasks. No need to re-upload per video.
You can also list, inspect, and delete uploaded fonts.
Supported formats
.ttf.otf.woff.woff2
Max file size: 50MB. The number of fonts per account depends on your subscription tier; the upload response includes remainingFontLimit.
Step 1: Upload a font
curl -X POST "https://api.zapcap.ai/fonts" \
-H "x-api-key: YOUR_API_KEY" \
-F "file=@/path/to/MyCustomFont.ttf"
Response:
{
"id": "54abe67d-be14-4c78-800b-01d12bcfaaa6",
"filename": "MyCustomFont.ttf",
"fontFamily": "Roboto",
"fontStyle": "Regular",
"remainingFontLimit": 4
}
Save id — that's the fontId you'll pass when creating tasks.
Step 2: Reference the font in a video task
Pass the fontId inside renderOptions.styleOptions:
curl -X POST "https://api.zapcap.ai/videos/YOUR_VIDEO_ID/task" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"templateId": "YOUR_TEMPLATE_ID",
"autoApprove": true,
"language": "en",
"renderOptions": {
"styleOptions": {
"fontId": "54abe67d-be14-4c78-800b-01d12bcfaaa6",
"fontSize": 46,
"fontColor": "#ffffff"
}
}
}'
fontId takes precedence over whatever font the template would have used by default. Other styleOptions (size, weight, color, stroke, shadow) still apply on top. See Captions Configuration for the full list.
Listing your fonts
curl -X GET "https://api.zapcap.ai/fonts?page=1&limit=20" \
-H "x-api-key: YOUR_API_KEY"
Returns a paginated list with id, filename, fontFamily, fontStyle, and createdAt for each font.
Deleting a font
curl -X DELETE "https://api.zapcap.ai/fonts/FONT_ID" \
-H "x-api-key: YOUR_API_KEY"
Returns 204 No Content. Existing renders are unaffected, but any future task referencing that fontId will fail.
Tips
- Upload once, reuse. Don't re-upload a font for every video — store the
fontIdin your own database and reference it. - Pick the right style file.
fontFamilyandfontStyleare parsed from the font file metadata. If you want Bold and Italic versions, upload them as separate files; each gets its ownfontId. - Per-word overrides. Inside an edited transcript, individual word entries can carry their own
fontIdto mix typefaces within a single caption. See Editing Transcripts.