To generate a video with the Placid REST API:
{info} Every 10 seconds = 10 credits
Switch to test mode for free watermarked previews!
// - POST to endpoint `https://api.placid.app/api/rest/videos`
{
...
"clips": [
{
"template_uuid": "illcmemnt",
"layers": {
"video": {
"video": "https://socialmediacollection.com/assets/video-tiktok-1.mp4"
},
"logo": {
"image": "https://socialmediacollection.com/assets/logo.png"
},
"username": {
"text": "@username"
}
},
},
],
...
// Options for filename, size modifications, export,..
}
{
"id": 1,
"status": "queued",
"video_url": null,
"polling_url": null
}
Field | Values |
---|---|
id |
Unique video id for internal reference |
status |
queued The request has been put into the queue. finished The video has been created successfully. error There was an error. |
image_url |
URL to created video or null |
polling_url |
Endpoint that you can GET poll for status updates |
Create a new video by using the following endpoint and request structure.
Videos are generated from one or more templates used as clips
, filling their layers
with your data.
Method | URI |
---|---|
POST | https://api.placid.app/api/rest/videos |
{
"webhook_success": "https://webhook.url",
"passthrough": null,
"clips": [
{
"template_uuid": "<template_uuid>",
// - audio settings
"audio" : "https://mp3url.mp3",
"audio_duration" : "...",
"audio_trim_start" : "00:00:00",
"audio_trim_end" : "00:00:00",
// - layer settings
"layers": {
"video": {
"video": "https://videourl.mp4"
},
"img": {
"image": "https://imageurl.jpg"
},
"subtitle": {
"hide": true
},
"title": {
"text": "Lorem Ipsum"
}
...
},
},
// ...
],
"modifications": {
"width": "<width>",
"height": "<height>",
"fps": "<fps>",
"filename": "<filename>",
"canvas_background": "blur"
},
"transfer": {
"to": "s3",
"key": "<your key>",
"secret": "<your secret>",
"region": "<region name>",
"bucket": "<bucket name>",
"visibility": "public",
"path": "videos/video.mp4",
"endpoint": "https://exampleendpoint.com"
}
}
Field | Values | Description |
---|---|---|
webhook_success |
Webhook URL | After the image is created Placid will POST the response to this Webhook URL |
passthrough |
string or array |
Any data added to this parameter will be saved and sent in any subsequent webhooks and requests for this video (max-length is 1024 characters) |
clips |
array of clip objects |
Your desired clips/templates; Add multiple templates to get a merged video |
transfer |
Additionally transfer the generated image to your storage |
The content of your video will be defined by an array of templates in your clips
object.
Field | Values |
---|---|
clips.*.template_uuid |
The ID of the template used for your clip |
clips.*.audio |
URL of mp3 audio file for this clip |
clips.*.audio_duration |
Set to auto to trim audio to video length; defaults to full to include the whole audio track |
clips.*.audio_trim_start |
Timestamp of the trim start point 00:00:45 or with milliseconds 00:00:45.25 |
clips.*.audio_trim_end |
Timestamp of the trim end point 00:00:55 or with milliseconds 00:00:55.25 |
clips.*.layers |
Dynamically change the content and properties of your template layers |
Get your {template_uuid}
from the template overview in the Templates
tab of your Placid API project.
picture
layers in your template with video filestext
layers of your templateTo transfer the generated video to your storage use the transfer
object.
Field | Values |
---|---|
transfer.to |
s3 |
transfer.key , transfer.secret |
Your credentials (Placid never stores them) |
transfer.bucket |
Your bucket name |
transfer.visibility |
public or private |
transfer.path |
File path (Define the full video path starting from the root directory of your bucket, including filename and file extension. Placid will overwrite existing files in the specified directory!) |
To modify the generated video use the modifications
object.
Field | Values |
---|---|
modifications.format |
mp4 |
modifications.width |
Video width Empty = auto |
modifications.height |
Video height Empty = auto |
modifications.canvas_background |
Defaults to #000000 ; Enter hexcode or blur for blurred |
modifications.fps |
Defaults to 25 fps; min 1 max 30 |
modifications.filename |
Filename of the generated video |
This endpoint allows you to retrieve a video by providing their unique id
. Refer to the object at the top of this page to see which properties are included with video objects.
Method | URI |
---|---|
GET | https://api.placid.app/api/rest/pdfs/{id} |