Videos


Model properties

  • Name
    id
    Type
    string
    Description

    Unique identifier for the video.

  • Name
    is_failed
    Type
    boolean
    Description

    Whether or not the video has failed to be processed.

  • Name
    is_ready
    Type
    boolean
    Description

    Whether or not the video is ready for consumption.

  • Name
    download_url
    Type
    url
    conditional
    Description

    URL to download the video file. Shown only if the video is ready.

  • Name
    stream_url
    Type
    url
    conditional
    Description

    URL to stream the video file. Shown only if the video is ready.

  • Name
    flow_id
    Type
    string
    conditional
    Description

    Unique identifier for the parent workflow. Only shown if the video was generated by a Flow.

  • Name
    metadata
    Type
    object
    Description

    An object containing user-supplied metadata about the video.


GET/v2/videos

List all videos

This endpoint allows you to retrieve a paginated list of all your videos. By default, a maximum of 15 videos are shown per page.

Request parameters

  • Name
    page
    Type
    integer
    Description

    Specify the page number to retrieve. Default is 1.

  • Name
    per_page
    Type
    integer
    Description

    Limit the number of videos returned per page. Default is 15.

Request

GET
/v2/videos
curl -G https://api.editframe.com/v2/videos \
  -H "Authorization: Bearer {token}" \
  -d limit=10

Response

{
  "data": [
    {
      "id": "PgQQX3hrtZ",
      "is_failed": false,
      "is_ready": true,
      "download_url": "https://api.editframe.com/v2/videos/PgQQX3hrtZ/download",
      "stream_url": "https://api.editframe.com/v2/videos/PgQQX3hrtZ/stream",
      "metadata": { ... },
    },
    {
      // ...
    }
  ],
  "meta": {
    "current_page": 1,
    "last_page": 1,
    "per_page": 15,
    "total": 2,
    "from": 1,
    "to": 10
  }
}

POST/v2/videos/new

Create a new video

This endpoint allows you to create a video from our config JSON data generated by the SDK. The config JSON data is passed as a string in the request body.

Note: This endpoint only accept remote URLs for files. If you need to upload local files, use the SDK..

Request parameters

  • Name
    config
    Type
    JSON
    required
    Description

    The config JSON data generated by the SDK.

Request

POST
/v2/videos/new
curl --location 'https://api.editframe.com/v2/videos/new' \
--header 'Authorization: Bearer EDITFRAME_TOKEN' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data '{
"config": {
    "backgroundColor": "#000000FF",
    "dimensions": {
        "height": 1080,
        "width": 1920
    },
    "duration": 10,
    "layers": [
        {
            "file": "https://editframe.com/docs/composition/layers/video/puppy-beach.mp4",
            "id": "0e7d0c",
            "type": "video",
            "audio": {
                "volume": 1
            },
            "position": {
                "angle": 0,
                "angleX": 0,
                "angleY": 0,
                "isRelative": false,
                "origin": "center",
                "x": 0,
                "y": 0,
                "z": 0
            },
            "size": {
                "scale": 1
            },
            "timeline": {
                "start": 0
            },
            "transitions": [],
            "trim": {
                "start": 0
            }
        },
        {
            "file": "https://editframe.com/docs/composition/layers/audio/audio-example.mp3",
            "id": "c2f7fa",
            "type": "audio",
            "audio": {
                "volume": 1
            },
            "timeline": {
                "start": 0
            },
            "transitions": [],
            "trim": {
                "start": 0
            }
        }
    ]
}
}'

Response

{
"id": "do2wzgPqPy",
"timestamp": 1687277090,
"status": "processing",
"metadata": {}
}


GET/v2/videos/:id

Retrieve a video

This endpoint allows you to retrieve an individual video by providing the video id. Refer to the model properties to see which properties are included with video objects.

Request

GET
/v2/videos/PgQQX3hrtZ
curl https://api.editframe.com/v2/videos/PgQQX3hrtZ \
  -H "Authorization: Bearer {token}"

Response

{
  "id": "PgQQX3hrtZ",
  "is_failed": false,
  "is_ready": true,
  "download_url": "https://api.editframe.com/v2/videos/PgQQX3hrtZ/download",
  "stream_url": "https://api.editframe.com/v2/videos/PgQQX3hrtZ/stream",
  "metadata": { ... }
},

DELETE/v2/videos/:id

Delete a video

This endpoint allows you to delete your videos generated by Tools or the Commposition API.

Request

DELETE
/v2/videos/PgQQX3hrtZ
curl -X DELETE https://api.editframe.com/v2/videos/PgQQX3hrtZ \
  -H "Authorization: Bearer {token}"