Insert a Shapes
🔶 Enhance visuals with shape overlays in your video.
Our API allows you to add shape overlays to a video, such as a circle, rectangle, or ellipse. You can specify the properties of the shape, such as the position and size. It enables you to enhance or modify the visual appearance of the media by superimposing shapes on top of it.
In this example, we will add a circle to the video. Follow the steps below:
- Specify the overlay
type
. - Specify the X-coordinate of the center of the circle (
centerX
). It determines the horizontal position of the circle's center within the video. - Specify the Y-coordinate of the center of the circle (
centerY
). It determines the vertical position of the circle's center within the video. - Define the
radius
of the circle. It determines the size or scale of the circle overlay.
Caution:
Don't forget to replace the placeholder "YOUR_API_KEY" with your unique API key in the header. If you haven't obtained one yet, please contact us at [email protected], and we will provide one as soon as possible.
The following is a request example for adding a circle:
curl --request POST \
--url https://api.yepic.ai/v1/videos \
--header 'X-Api-Key: YOUR_API_KEY' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"slides": [
{
"overlays": [
{
"type": "CircleOverlay",
"centerX": 1,
"centerY": 0.7,
"radius": 1
}
]
}
],
"videoTitle": "My first video",
"videoFormat": "mp4"
}
For details on the available shape fields, refer to the tables below:
1. Circle Overlay
Fields | Data Type | Required | Description |
---|---|---|---|
type | string | Yes | The type of the asset overlay, for example, "CircleOverlay", "EllipseOverlay", "RectangleOverlay", etc. |
centerX | double | Yes | The x coordinate of the insertion point in the canvas. |
centerY | double | Yes | The Y coordinate of the insertion point in the canvas. |
radius | double | Yes | The radius of the circle. |
2. Ellipse Overlay
Fields | Data Type | Required | Description |
---|---|---|---|
type | string | Yes | The type of the asset overlay, for example, "CircleOverlay", "EllipseOverlay", "RectangleOverlay", etc. |
centerX | double | Yes | The x coordinate of the insertion point in the canvas. |
centerY | double | Yes | The Y coordinate of the insertion point in the canvas. |
radiusX | double | Yes | The radius of the ellipse on the x-axis. |
radiusY | double | Yes | The radius of the ellipse on the y-axis. |
angle | double | No | The rotation angle to be applied over the asset. |
3. Rectangle Overlay
Fields | Data Type | Required | Description |
---|---|---|---|
type | string | Yes | The type of the asset overlay, for example, "CircleOverlay", "EllipseOverlay", "RectangleOverlay", etc. |
xPosition | double | No | The x coordinate of the insertion point in the canvas. |
yPosition | double | No | The y coordinate of the insertion point in the canvas. |
height | double | Yes | The height of the rectangle. |
width | double | Yes | The width of the rectangle. |
angle | double | No | The rotation angle to be applied over the asset. |
radiusX | double | No | The horizontal corner radius of the rectangle. |
radiusY | double | No | The vertical corner radius of the rectangle. |
📌 Need help?

Updated about 2 months ago