Multiple Overlays
By default, a single text field places one overlay at 50% (vertically centered). Use the overlays field to add multiple caption bars with custom positions.
Using the overlays field
Section titled “Using the overlays field”Pass a JSON string as the overlays form field:
curl -X POST https://snapchat-text-overlay-api.com/v1/overlay \ -H "x-api-key: snap_live_your_key" \ -F "asset=@photo.jpg" \ -F 'overlays=[{"text":"night one in miami","position":40},{"text":"the vibes are immaculate","position":55}]' \ --output rendered.pngOverlay object
Section titled “Overlay object”| Field | Type | Required | Description |
|---|---|---|---|
text | string | Yes | Caption text, max 180 characters |
position | number | No | Vertical position as percentage (0-100) |
Default positioning
Section titled “Default positioning”If position is omitted:
| Overlay | Default position |
|---|---|
| 1st | 50% (center) |
| 2nd | 60% |
| 3rd | 70% |
| 4th | 80% |
Overlays auto-space by 10% when positions aren’t specified.
Position reference
Section titled “Position reference”| Value | Location |
|---|---|
0 | Top edge |
25 | Upper quarter |
50 | Center (default) |
75 | Lower quarter |
100 | Bottom edge |