API & Integration -> Quick Start
Use a custom font
Import your own custom fonts and use them in your videos and images.
Step 1Start with a template
Let's start with a simple template containing just one text element. This gives us a foundation to work with before adding the custom font.Click
Open in Editorto explore the template structure. You'll see the text element is currently using the default font family.

Step 2Add a custom font
Next, we'll add a custom font to our template. Supported formats include OTF, TTF, and WOFF. By using the
modificationsparameter, we'll add the font to the template and apply it to the text element.In this example, we're adding the Coolvetica font and applying it to
Text-1. The
fonts.addoperation adds the new fonts without overwriting any existing ones in the template.

curl -X POST https://api.creatomate.com/v2/renders \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_API_KEY_HERE" \ -d '{ "template_id": "YOUR_TEMPLATE_ID_HERE", "modifications": { "fonts.add": [ { "family": "Coolvetica Rg", "weight": "400", "style": "normal", "source": "https://cdn.creatomate.com/demo/coolvetica-rg.otf" } ], "Text-1.font_family": "Coolvetica Rg", "Text-1.font_weight": "400", "Text-1.font_style": "normal" } }'
Step 3RenderScript example
In this final example, here's how to achieve the same result using RenderScript instead of template modifications.This approach also shows how to work with multiple font styles. Notice how each weight and style needs its own font file definition at the top level.

curl -X POST https://api.creatomate.com/v2/renders \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_API_KEY_HERE" \ -d '{ "output_format": "jpg", "width": 1280, "height": 720, "fonts": [ { "family": "Coolvetica Rg", "weight": 400, "style": "normal", "source": "https://cdn.creatomate.com/demo/coolvetica-rg.otf" }, { "family": "Coolvetica Rg", "weight": 400, "style": "italic", "source": "https://cdn.creatomate.com/demo/coolvetica-rg-it.otf" } ], "elements": [ { "type": "text", "y": "33%", "fill_color": "#ffffff", "text": "Hello, world!", "font_family": "Coolvetica Rg", "font_size": 80 }, { "type": "text", "y": "66%", "fill_color": "#ffffff", "text": "Hello, italic world!", "font_family": "Coolvetica Rg", "font_style": "italic", "font_size": 80 } ] }'