Create videos in batch
Mass upload of your videos. Method is used to set the task of creating videos in the form of 1 aggregated request instead of a large number of single requests.
An additional advantage is the ability to specify subtitles in the same request. Whereas for a normal single upload, subtitles are uploaded in separate requests.
All videos in the request will be processed in queue in order of priority. Use "priority" attribute and look at general description in POST /videos method.
Limits:
- Batch max size = 500 videos.
- Max body size (payload) = 64MB.
- API connection timeout = 30 sec.
Query parameters
Restriction to return only the specified attributes, instead of the entire dataset. Specify, if you need to get short response. The following fields are available for specifying: id, name, duration, status, created_at, updated_at, hls_url, screenshots, converted_videos, priority. Example, ?fields=id,name,hls_url
Request body
Example request
{
"videos": [
{
"subtitles": [
{
"name": "English (AI-generated)",
"language": "eng",
"vtt": "WEBVTT\n\n1\n00:00:07.154 --> 00:00:12.736\nWe have 100 million registered users or active users who play at least once a week.\n\n2\n00:00:13.236 --> 00:00:20.198\nWe might have 80 or 100,000 playing on a given cluster."
},
{
"name": "German (AI-translated)",
"language": "ger",
"vtt": "WEBVTT\n\n1\n00:00:07.154 --> 00:00:12.736\nWir haben 100 Millionen registrierte Benutzer oder aktive Benutzer, die mindestens einmal pro Woche spielen.\n\n2\n00:00:13.236 --> 00:00:20.198\nWir haben vielleicht 80 oder 100.000, die auf einem bestimmten Cluster spielen."
}
]
}
]
}Response
Successful
Example response
[
{
"id": 70575,
"name": "Coffee Run - Blender Open Movie 720p",
"description": "Fueled by caffeine, a young woman runs through the bittersweet memories of her past relationship. Coffee Run was directed by Hjalti Hjalmarsson and produced by the team at Blender Studio.",
"client_id": 1,
"duration": 184669,
"slug": "FnlHXwA16ZMxmUr",
"status": "ready",
"origin_size": 29260881,
"origin_video_duration": 184669,
"origin_audio_channels": 2,
"origin_height": 804,
"origin_width": 1920,
"created_at": "2024-06-13T12:15:25.000Z",
"updated_at": "2024-07-26T15:30:50.000Z",
"clip_start_seconds": null,
"clip_duration_seconds": null,
"hls_url": "https://demo-public.gvideo.io/videos/2675_FnlHXwA16ZMxmUr/master.m3u8",
"hls_cmaf_url": "https://demo-public.gvideo.io/videos/2675_FnlHXwA16ZMxmUr/master-cmaf.m3u8",
"dash_url": "https://demo-public.gvideo.io/videos/2675_FnlHXwA16ZMxmUr/master.mpd",
"iframe_url": "https://player.gvideo.co/videos/2675_FnlHXwA16ZMxmUr",
"poster": "https://static.gvideo.co/videoplatform/posters/video/10507272/f55b7db5f7a1ea48d713d7e6806bb9c5.jpeg",
"poster_thumb": "https://static.gvideo.co/videoplatform/posters/video/10507272/thumb_f55b7db5f7a1ea48d713d7e6806bb9c5.jpeg",
"screenshot": "https://static.gvideo.co/videoplatform/posters/video/10507272/f55b7db5f7a1ea48d713d7e6806bb9c5.jpeg",
"screenshots": [
"https://static.gvideo.co/videoplatform/thumbnails/2675/2474723_FnlHXwA16ZMxmUr.mp4_2_1080.jpg",
"https://static.gvideo.co/videoplatform/thumbnails/2675/2474723_FnlHXwA16ZMxmUr.mp4_3_1080.jpg"
],
"screenshot_id": -1,
"views": 2000001,
"cdn_views": 30000003,
"projection": "regular",
"sprite": "https://static.gvideo.co/videoplatform/sprites/2675/10507272_sNOwd4luk5mGGf9M.mp4_sprite.jpg",
"sprite_vtt": "1\n00:00:00,000 --> 00:00:05,000\nxMbWbUSuvJ8NX2_sprite.jpg#xywh=0,0,100,42\n\n2\n00:00:05,000 --> 00:00:10,000\nxMbWbUSuvJ8NX2_sprite.jpg#xywh=100,0,100,42\n...\n",
"converted_videos": [
{
"id": 25889825,
"name": "vod720p",
"width": 1719,
"height": 720,
"size": 37651798,
"progress": 100,
"status": "complete",
"mp4_url": "https://demo-public.gvideo.io/videos/2675_FnlHXwA16ZMxmUr/qid3570v3_h264_1566_720.mp4"
},
{
"id": 25889828,
"name": "vod480p",
"width": 1146,
"height": 480,
"size": 20255892,
"progress": 100,
"status": "complete",
"mp4_url": "https://demo-public.gvideo.io/videos/2675_FnlHXwA16ZMxmUr/qid3573v3_h264_800_468.mp4"
}
]
}
]