Vionlabs Previews API
Vionlabs API for on-request assembling of previews results.
Get Previews
Get previews for an item in the customer catalog (movie or series)
In: query
Path Parameters
Customer identifier for a movie or series item in the catalog
Query Parameters
Previews version code
Select specific clip type to search for a specific mood or use any
"ANY"Number of clips to produce. Note if clip criteria are too strict, fewer clips may be returned.
5Specifies which character(s) the clip should target. Characters are identified by integer ranks, where the main character is 0, secondary is 1 etc. Use CharacterSelector.NONE to allow clips with no criteria for character presence.To get multiple characters, use comma separated values, e.g. 1,2
"None"Minimum required probability of nudity. Increase this threshold to see clips with more nudity. Introduced in version 8.
00 <= value <= 1Maximum allowed probability of nudity in the clips. Introduced in version 8.
10 <= value <= 1Minimum required probability of spoken profanity. Introduced in version 8.
00 <= value <= 1Maximum allowed probability of spoken profanity in the clips. Introduced in version 8.
10 <= value <= 1Minimum allowed brightness in the clips.
00 <= value <= 1Maximum allowed brightness in the clips.
10 <= value <= 1Target length of the clips to produce, in seconds. Depending on other parameters, the final length of the clips may deviate from this value.
30Prevent clips from being selected from the beginning of the video, expressed as a percentage of video length.
100 <= value <= 100Prevent clips from being selected from the end of the video, expressed as a percentage of video length.
100 <= value <= 100Allow shortening the clip with this many seconds by ending it earlier, if a scene boundary was detected near the end of the clip.
00 <= valueAllow extending the clip with this many seconds by ending it later, if a scene boundary was detected near the end of the clip.
00 <= valueAllow extending the clip with this many seconds by starting the clip earlier if a scene boundary was detected near the start of the clip.
00 <= valueAllow shortening the clip with this many seconds by starting the clip later if a scene boundary was detected near the start of the clip.
00 <= valueAllow shortening the clip with this many seconds by ending it earlier, to avoid the clip ending mid-speech.
30 <= valueAllow extending the clip with this many seconds by ending the clip later, to avoid the clip ending mid-speech.
30 <= valueDefines a margin as to what constitutes as mid-speech at the end of the clip. Require this many seconds of silence before the clip end to be considered safe.
0Defines a margin as to what constitutes as mid-speech at the end of the clip. Require this many seconds of silence after the clip end to be considered safe.
0Allow extending the clip with this many seconds by starting it earlier, to avoid the clip starting mid-speech.
10 <= valueAllow shortening the clip with this many seconds by starting it later, to avoid the clip starting mid-speech.
10 <= valueDefines a margin as to what constitutes as mid-speech at the start of the clip. Require this many seconds of silence before the clip start to be considered safe.
0.5Defines a margin as to what constitutes as mid-speech at the start of the clip. Require this many seconds of silence after the clip start to be considered safe.
0.5Require this many seconds of separation between clips, in order to distribute the clips across the video and avoid overlaps.
60Search phrase describing the desired content of the clips.
If True, will add a set of keywords for each clip
trueInitiate asynchronous process of preview clips extraction
falseResponse Body
curl -X GET "https://loading/results/jitpreviews/v1/string?version=string&clip_type=ANY&number_of_clips=5&character=None&min_nudity=0&max_nudity=1&min_profanity=0&max_profanity=1&min_brightness=0&max_brightness=1&clip_length=30&skip_start=10&skip_end=10&end_bwd_scene_boundary_search=0&end_fwd_scene_boundary_search=0&start_bwd_scene_boundary_search=0&start_fwd_scene_boundary_search=0&end_bwd_speech_search=3&end_fwd_speech_search=3&end_speech_stop_silence_before=0&end_speech_stop_silence_after=0&start_bwd_speech_search=1&start_fwd_speech_search=1&start_speech_stop_silence_before=0.5&start_speech_stop_silence_after=0.5&minimum_clip_separation=60&search_query=Dystopian+environment&add_keyword_tags=true&generate=false"{
"inventory_id": "string",
"type": "movie",
"vionlabs_id": "string",
"version_id": "string",
"gen_id": "string",
"jitpreview": [
{
"start_time": 0,
"stop_time": 0,
"relevance": 0,
"query_relevance": 0,
"search_query": "string",
"start_frame": 0,
"stop_frame": 0,
"characters": [],
"nudity": 0,
"profanity": 0,
"brightness": 0,
"valence": 0,
"arousal": 0,
"clip_index": 0,
"snapped_start": 0,
"snapped_stop": 0,
"clip_type": "A",
"environment": [
{}
],
"keywords": [
{}
],
"mood": [
{}
],
"start_speech_avoidance": 0,
"end_speech_avoidance": 0,
"type_score": 0,
"vionlabs_id": "string",
"inventory_id": "string",
"fps": 0,
"gen": {
"clip_path": "string",
"large_image_path": "string",
"small_image_path": "string"
}
}
]
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}Get generated preview clips details for gen id
Get previews generated clips details for asynchronous gen_id
In: query
Path Parameters
Asynchronous gen task identifier
Response Body
curl -X GET "https://loading/results/jitpreviews/v1/gen/string"{
"inventory_id": "string",
"type": "movie",
"vionlabs_id": "string",
"version_id": "string",
"gen_id": "string",
"context": {},
"jitpreview": [
{
"start_time": 0,
"stop_time": 0,
"start_frame": 0,
"stop_frame": 0,
"gen": {
"clip_path": "string",
"large_image_path": "string",
"small_image_path": "string",
"large_image_width": 0,
"large_image_height": 0,
"small_image_width": 0,
"small_image_height": 0
}
}
]
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}Get Clip Types Info
Get information about the supported clip types (clip_type parameter) for a given version of the Previews product.
In: query
Query Parameters
Previews version code
Response Body
curl -X GET "https://loading/results/jitpreviews/v2/info/clip_types?version=string"{
"version": "string",
"clip_types": [
"string"
]
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}Get Previews
Get previews for an item in the customer's catalog. This endpoint returns a list of timestamps for the clips that match the specified criteria. To get the actual video clips:
- call this endpoint with
trigger_generation=Trueto initiate the generation of previews clips. The return object will contain a uniquegen_idfor the generation task. - Using the
gen_id, poll the /gen/{gen_id} endpoint to poll the status of the generation task. When the task is complete, the response will contain a list of paths to the generated video clips. The paths are relative to a pre-configured bucket.
In: query
Path Parameters
Customer identifier for a movie or series item in the catalog
Query Parameters
Previews version code
Specifies which character(s) the clip should target. Characters are identified by integer ranks, where the main character is 0, secondary is 1 etc. Use CharacterSelector.NONE to allow clips with no criteria for character presence.To get multiple characters, use comma separated values, e.g. 1,2This parameter is DEPRECATED. Use the combination of character_preference and character_list instead.
"None"Specifies how the character criteria should be applied.To apply character criteria, use any, any_of, all_of, None or avoid
"any"Specifies the list of characters to include in the results when character_preference is set to any_of or all_ofTo select multiple characters, use a comma separated list of integers, e.g. 1,2.
Number of clips to produce. Note if clip criteria are too strict, fewer clips may be returned.
5Select specific clip type to search for a specific mood or use any
"ANY"Minimum required probability of nudity. Increase this threshold to see clips with more nudity. Introduced in version 8.
00 <= value <= 1Maximum allowed probability of nudity in the clips. Introduced in version 8.
10 <= value <= 1Minimum required probability of spoken profanity. Introduced in version 8.
00 <= value <= 1Maximum allowed probability of spoken profanity in the clips. Introduced in version 8.
10 <= value <= 1Minimum allowed brightness in the clips.
00 <= value <= 1Maximum allowed brightness in the clips.
10 <= value <= 1Target length of the clips to produce, in seconds. Depending on other parameters, the final length of the clips may deviate from this value.
300 <= valuePrevent clips from being selected from the beginning of the video, expressed as a percentage of video length.
100 <= value <= 100Prevent clips from being selected from the end of the video, expressed as a percentage of video length.
100 <= value <= 100Allow extending the clip with this many seconds by starting it earlier, if a suitable boundary was detected near the start of the clip.
0Allow shortening the clip with this many seconds by starting it later, if a suitable boundary was detected near the start of the clip.
0Allow shortening the clip with this many seconds by ending it earlier, if a suitable boundary was detected near the end of the clip.
0Allow extending the clip with this many seconds by ending it later, if a suitable boundary was detected near the end of the clip.
0Allow shortening the clip with this many seconds by ending it earlier, if a dialog boundary was detected near the end of the clip.
00 <= valueAllow extending the clip with this many seconds by ending it later, if a dialog boundary was detected near the end of the clip.
00 <= valueAllow extending the clip with this many seconds by starting it earlier, if a dialog boundary was detected near the start of the clip.
00 <= valueAllow shortening the clip with this many seconds by starting it later, if a dialog boundary was detected near the start of the clip.
00 <= valueAllow shortening the clip with this many seconds by ending it earlier, if a scene boundary was detected near the end of the clip.
00 <= valueAllow extending the clip with this many seconds by ending it later, if a scene boundary was detected near the end of the clip.
00 <= valueAllow extending the clip with this many seconds by starting the clip earlier if a scene boundary was detected near the start of the clip.
00 <= valueAllow shortening the clip with this many seconds by starting the clip later if a scene boundary was detected near the start of the clip.
00 <= valueAllow shortening the clip with this many seconds by ending it earlier, to avoid the clip ending mid-speech.
30 <= valueAllow extending the clip with this many seconds by ending the clip later, to avoid the clip ending mid-speech.
30 <= valueDefines a margin as to what constitutes as mid-speech at the end of the clip. Require this many seconds of silence before the clip end to be considered safe.
0Defines a margin as to what constitutes as mid-speech at the end of the clip. Require this many seconds of silence after the clip end to be considered safe.
0Allow extending the clip with this many seconds by starting it earlier, to avoid the clip starting mid-speech.
10 <= valueAllow shortening the clip with this many seconds by starting it later, to avoid the clip starting mid-speech.
10 <= valueDefines a margin as to what constitutes as mid-speech at the start of the clip. Require this many seconds of silence before the clip start to be considered safe.
0.5Defines a margin as to what constitutes as mid-speech at the start of the clip. Require this many seconds of silence after the clip start to be considered safe.
0.5Require this many seconds of separation between clips, in order to distribute the clips across the video and avoid overlaps.
60Search phrase describing the desired content of the clips.
If True, will add a set of keywords for each clip
trueInitiate asynchronous process of preview clips extraction. Only one of generate or generate_vertical can be True.DEPRECATED. Use trigger_generation instead.
falseInitiate asynchronous process of vertical preview clips extraction. Only one of generate or generate_vertical can be True. Only available for product version with vertical prefix.DEPRECATED. Use trigger_generation in conjunction with aspect_ratio instead.
falseTrigger the generation of preview clips.
falseAspect ratio of the preview clips. When set to 9:16, vertical conversion information is used. Only supported with versions with -vertical suffix.
"None"Response Body
curl -X GET "https://loading/results/jitpreviews/v2/string?version=string&character=None&character_preference=any&character_list=string&number_of_top_candidates=5&clip_type=ANY&min_nudity=0&max_nudity=1&min_profanity=0&max_profanity=1&min_brightness=0&max_brightness=1&clip_length=30&skip_start=10&skip_end=10&start_bwd_snap_search=0&start_fwd_snap_search=0&end_bwd_snap_search=0&end_fwd_snap_search=0&end_bwd_dialog_boundary_search=0&end_fwd_dialog_boundary_search=0&start_bwd_dialog_boundary_search=0&start_fwd_dialog_boundary_search=0&end_bwd_scene_boundary_search=0&end_fwd_scene_boundary_search=0&start_bwd_scene_boundary_search=0&start_fwd_scene_boundary_search=0&end_bwd_speech_search=3&end_fwd_speech_search=3&end_speech_stop_silence_before=0&end_speech_stop_silence_after=0&start_bwd_speech_search=1&start_fwd_speech_search=1&start_speech_stop_silence_before=0.5&start_speech_stop_silence_after=0.5&minimum_clip_separation=60&search_query=Dystopian+environment&add_keyword_tags=true&generate=false&generate_vertical=false&trigger_generation=false&aspect_ratio=None"{
"status": "success",
"error": "string",
"updated": "2019-08-24T14:15:22Z",
"version_id": "string",
"inventory_id": "string",
"type": "movie",
"data": {
"inventory_id": "string",
"type": "movie",
"vionlabs_id": "string",
"version_id": "string",
"gen_id": "string",
"jitpreview": [
{
"start_time": 0,
"stop_time": 0,
"relevance": 0,
"query_relevance": 0,
"search_query": "string",
"start_frame": 0,
"stop_frame": 0,
"characters": [],
"nudity": 0,
"profanity": 0,
"brightness": 0,
"valence": 0,
"arousal": 0,
"clip_index": 0,
"snapped_start": 0,
"snapped_stop": 0,
"clip_type": "ANY",
"environment": [
{}
],
"keywords": [],
"keyword": {},
"mood": [],
"mood_tag": {},
"start_speech_avoidance": 0,
"end_speech_avoidance": 0,
"type_score": 0,
"vionlabs_id": "string",
"inventory_id": "string",
"fps": 0,
"gen": {
"clip_path": "string",
"large_image_path": "string",
"small_image_path": "string"
},
"vertical_conversion": {
"coordinates": {
"property1": 0,
"property2": 0
},
"blackbars": [
0,
0
]
}
}
]
}
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}Get generated preview clips details for gen id
Get previews generated clips details for asynchronous gen_id
In: query
Path Parameters
Asynchronous gen task identifier
Response Body
curl -X GET "https://loading/results/jitpreviews/v2/gen/string"{
"inventory_id": "string",
"type": "movie",
"vionlabs_id": "string",
"version_id": "string",
"gen_id": "string",
"context": {},
"jitpreview": [
{
"start_time": 0,
"stop_time": 0,
"start_frame": 0,
"stop_frame": 0,
"gen": {
"clip_path": "string",
"large_image_path": "string",
"small_image_path": "string",
"large_image_width": 0,
"large_image_height": 0,
"small_image_width": 0,
"small_image_height": 0
}
}
]
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}Get paginated list of the updated inventory_id items with the previews results statuses ordered by creation/update timestamp
Get paginated list of inventory items with the updated previews results ordered by creation/update timestamp.
In: query
Query Parameters
Specifies start of time window (ISO 8601). If not specified then all results will be returned
date-timeSpecifies end of time window (ISO 8601). If not specified then utcnow() value will be used.It is recommended to fix this argument while looping across pages to establish a fixed time window
date-timeSpecifies a positional number of page with results
00 <= valueSpecifies a max number of results per page
10001 <= valuePreviews version code
Response Body
curl -X GET "https://loading/results/jitpreviews/v2/?from_utcdatetime=2024-03-06T20%3A00%3A00&to_utcdatetime=2024-03-07T20%3A00%3A00&page_num=0&page_size=1000&version=string"{
"page_num": 0,
"page_size": 0,
"total_count": 0,
"data": [
{
"status": "success",
"error": "string",
"updated": "2019-08-24T14:15:22Z",
"version_id": "string",
"inventory_id": "string",
"type": "movie"
}
]
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}