Skip to main content

🔤 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:

  1. Upload once via POST /fonts. You get back a fontId.
  2. Reference many times by passing that fontId inside renderOptions.styleOptions when 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

See API Reference: Upload 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

See API Reference: Create 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

See API Reference: List 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

See API Reference: Delete 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 fontId in your own database and reference it.
  • Pick the right style file. fontFamily and fontStyle are parsed from the font file metadata. If you want Bold and Italic versions, upload them as separate files; each gets its own fontId.
  • Per-word overrides. Inside an edited transcript, individual word entries can carry their own fontId to mix typefaces within a single caption. See Editing Transcripts.