---
updatedAt: 2025-06-18T02:39:23.000Z
agentTools:
  projectIndex: https://api.encoding.com/llms.txt
---

# Text Overlay

<a name="textoverlay"></a>Create custom text overlays for your source video.

```xml
<?xml version="1.0"?>
<query>
    <userid>[UserID]</userid> <!-- required-->
    <userkey>[UserKey]</userkey> <!-- required-->
    <action>[Action]</action> <!-- required-->
    <source>[SourceFile]</source> <!-- required-->
    <format>
        <!-- Format params -->
        <text_overlay>
            <!-- Common overlay params -->
            <text>[Text1]</text> <!-- required-->
            <font_source>[Font1Source]</font_source> <!-- required-->
            <font_size>[Font1Size]</font_size>
            <font_rotate>[Font1Rotate]</font_rotate>
            <font_color>[Font1Color]</font_color>
            <align_center>[0|1]</align_center>
            <overlay_x>[TextOverlay1PositionX]</overlay_x>
            <overlay_y>[TextOverlay1PositionY]</overlay_y>
            <size>[TextOverlay1Size]</size>
        </text_overlay>
        <!-- ... -->
        <text_overlay>
            <!-- Overlay params -->
        </text_overlay>
    </format>
</query>
```
```json
{
    "query": {
        "userid": "[UserID]", // required
        "userkey": "[UserKey]", // required
        "action": "[Action]", // required
        "source": "[SourceFile]", // required
        "format": {
            // Format params
            "text_overlay": [
                {
                    // Common overlay params
                    "text": "[Text1]",
                    "font_source": "[Font1Source]",
                    "font_size": "[Font1Size]",
                    "font_rotate": "[Font1Rotate]",
                    "font_color": "[Font1Color]",
                    "align_center": "[0|1]",
                    "overlay_x": "[TextOverlay1PositionX]",
                    "overlay_y": "[TextOverlay1PositionY]",
                    "size": "[TextOverlay1Size]"
                },
                {
                    // Overlay params
                }
            ]
        }
    }
}
```

| Parameter         | Description                                        | Allowed Values                        | Default Value |
| :---------------- | :------------------------------------------------- | :------------------------------------ | :------------ |
| **text**          | Specify the text for the overlay.                  | Text                                  | None          |
| **font\_source**  | Specify the URL for the font file.                 | Valid URL.                            | None          |
| **font\_size**    | Specify the text font size.                        | Non-negative integer                  | 0             |
| **font\_rotate**  | Specify the angle on which text should be rotated. | Non-negative integer                  | 0             |
| **font\_color**   | Specify the font color.                            | 6-digits hexadecimal 000000-FFFFFF    | 000000        |
| **align\_center** | Align text in the center.                          | 0 or 1. 0 = disabled, 1 = enabled.    | 0             |
| **overlay\_x**    | Specify the text overlay position on the x axis.   | Non-negative integer                  | 0             |
| **overlay\_y**    | Specify the text overlay position on the y axis.   | Non-negative integer                  | 0             |
| **size**          | Specify the size of the text block in pixels.      | WxH where W and H – positive integers | None          |

> 🚧 Note
>
> **\<text />** and **\<font\_source />** are the required parameters.