Video

APIs for editing video.

Upload Video

This api lets you upload your video on assets and use URL for your video input.

SecurityAPIKeyHeader
Request
Request Body schema: multipart/form-data
video_file
string <binary> (Video input file)

Input video file.

video_url
string (Video input URL)
Default: ""

Input video URL.

Responses
200

Uploaded Video

400

Bad Request

402

Insufficient Credit

422

Validation Error

post/video
Request samples
Response samples
application/json
{
  • "data": {
    }
}

Crop Video

You can change aspect ratio of your input video.

Example Code

import requests

url = "https://api.vimmerse.net/video/crop-to-aspect-ratio"

files=[
  ('video_file', ('video.mp4', open('/path/to/video.mp4','rb'), 'video.mp4'))
]
headers = {
  'X-Api-Key': 'YOUR_API_KEY'
}

payload={
  "aspect_ratio": "16:9"
}

response = requests.request("POST", url, headers=headers, data=payload, files=files)

print(response.text)
SecurityAPIKeyHeader
Request
Request Body schema: multipart/form-data
video_file
string <binary> (Video input file)

Input video file.

video_url
string (Video input URL)
Default: ""

Input video URL.

aspect_ratio
string (Aspect Ratio)
Default: "16:9"

Aspect ratio of your new video. Example: '1:1', '16:9', '9:16'.

offset_x
integer (X-Axis Offset)

Offset X-Axis to top left conner from your input video that can be cropped. This value is optional and if you don't give any value, video will be cropped from center.

offset_y
integer (Y-Axis Offset)

Offset Y-Axis to top left conner from your input video that can be cropped. This value is optional and if you don't give any value, video will be cropped from center.

Responses
200

Change Video Aspect Ratio

400

Bad Request

402

Insufficient Credit

422

Validation Error

post/video/crop-to-aspect-ratio
Request samples
Response samples
application/json
{
  • "data": {
    }
}

Reframe Video

You can reframe your input video. Please reference this URL for more details.

Example Code

import requests

url = "https://api.vimmerse.net/video/reframe"

files=[
  ('video_file', ('video.mp4', open('/path/to/video.mp4','rb'), 'video.mp4'))
]
headers = {
  'X-Api-Key': 'YOUR_API_KEY'
}

payload={
  "aspect_ratio": "16:9"
}

response = requests.request("POST", url, headers=headers, data=payload, files=files)

print(response.text)
SecurityAPIKeyHeader
Request
Request Body schema: multipart/form-data
video_file
string <binary> (Video input file)

Input video file.

video_url
string (Video input URL)
Default: ""

Input video URL.

aspect_ratio
string (Aspect Ratio)
Default: "16:9"

Available values are '21:9','16:9','4:3','1:1','3:4','9:16','9:21'.

prompt
string (Prompt)
Default: ""
grid_position_x
integer (Grid X Position)
grid_position_y
integer (Grid Y Position)
x_start
integer (Start X Position)
x_end
integer (Start Y Position)
y_start
integer (End X Position)
y_end
integer (End Y Position)
Responses
200

Reframed Video

400

Bad Request

402

Insufficient Credit

422

Validation Error

post/video/reframe
Request samples
Response samples
application/json
{
  • "data": {
    }
}

Enhance Video

You can get upscaled or better quality video.

Example Code

import requests

url = "https://api.vimmerse.net/video/enhance"

files=[
  ('video_file', ('video.mp4', open('/path/to/video.mp4','rb'), 'video.mp4'))
]
headers = {
  'X-Api-Key': 'YOUR_API_KEY'
}

payload={
  'option': '4X&DeepClean'
}

response = requests.request("POST", url, headers=headers, data=payload, files=files)

print(response.text)
SecurityAPIKeyHeader
Request
Request Body schema: multipart/form-data
video_file
string <binary> (Video input file)

Input video file.

video_url
string (Video input URL)
Default: ""

Input video URL.

option
string (Option)
Default: "4X&DeepClean"

Available values are 4X, 2X, 4X&DeepClean and 2X&DeepClean and DeepClean.

compression_scale
string (Compression Scale)
Default: "0.5"

Compression scale of the video. Range is (0 - 1) and the default value is 0.5.

Responses
200

Enhance video

400

Bad Request

402

Insufficient Credit

422

Validation Error

post/video/enhance
Request samples
Response samples
application/json
{
  • "data": {
    }
}

Add Sound Effect

You can add sound effect to video.

Example Code

import requests

url = "https://api.vimmerse.net/video/sound-effect"

files=[
  ('video_file', ('video.mp4', open('/path/to/video.mp4','rb'), 'video.mp4'))
]
headers = {
  'X-Api-Key': 'YOUR_API_KEY'
}

payload={
  'prompt': 'Add ringtone from the phone.'
}

response = requests.request("POST", url, headers=headers, data=payload, files=files)

print(response.text)
SecurityAPIKeyHeader
Request
Request Body schema: multipart/form-data
video_file
string <binary> (Video input file)

Input video file.

video_url
string (Video input URL)
Default: ""

Input video URL.

prompt
string (Prompt)
Default: ""

Prompt that describes the sound effect.

Responses
200

Video with sound effect

400

Bad Request

402

Insufficient Credit

422

Validation Error

post/video/sound-effect
Request samples
Response samples
application/json
{
  • "data": {
    }
}

Avatar Lip-Sync Video

You can generate Lip-Sync video from selected avatar and voice.

SecurityAPIKeyHeader
Request
Request Body schema: multipart/form-data
avatar_id
string (Avatar ID)
Default: ""

You can get list of avatars from 'https://api.vimmerse.net/video/avatars/avatars?age_range=adult&gender=m&location=indoor' endpoint. You can also update or remove query parameters to filter avatars.

voice_id
string (Voice ID)
Default: ""

You can get list of voices from 'https://api.vimmerse.net/video/avatars/voices' endpoint.

prompt
string (Prompt)
Default: ""

Prompt of the speech.

bg_image_file
string <binary> (Background Image)
bg_image_url
string (Background Image URL)
Default: ""
audio_file
string <binary> (Background Audio)
audio_url
string (Background Audio URL)
Default: ""
aspect_ratio
string (Aspect Ratio)
Default: "16:9"

Aspect ratio of your video. Available values are '1:1', '16:9' and '9:16'.

show_caption
string (Show Caption)
Default: "On"

Available values are On and Off.

Responses
200

Lip Sync Video

400

Bad Request

402

Insufficient Credit

422

Validation Error

post/video/avatars/lip-sync
Request samples
Response samples
application/json
{
  • "data": {
    }
}

Lip-Sync Video

You can generate Lip-Sync video from image, video, audio and prompt.

You need to upload any of image, image_url or video, video_url to generate Lip-Sync Video. You also need to upload any of prompt, audio or audio_url to generate Lip-Sync Audio.

SecurityAPIKeyHeader
Request
Request Body schema: multipart/form-data
image_file
string <binary> (Image input file)

Input image file.

image_url
string (Image input URL)
Default: ""

Input image URL.

video_file
string <binary> (Video input file)

Input video file.

video_url
string (Video input URL)
Default: ""

Input video URL.

audio_file
string <binary> (Audio input file)

Input audio file.

audio_url
string (Audio input URL)
Default: ""

Input audio URL.

prompt
string (Prompt)
Default: ""

Prompt of the speech.

option
string (Option)
Default: "Auto"

Available values are Auto, Sync and HummingBird for video input, Auto, Hedra and OminHuman for image input.

voice
string (Voice)
Default: "Rachel"

Voice of the speech. Available voices are "Aria", "Roger", "Sarah", "Laura", "Charlie", "George", "Callum", "River", "Liam", "Charlotte", "Alice", "Matilda", "Will", "Jessica", "Eric", "Chris", "Brian", "Daniel", "Lily" and "Bill". Default is "Rachel".

Responses
200

Lip Sync Video

400

Bad Request

402

Insufficient Credit

422

Validation Error

post/video/lip-sync
Request samples
Response samples
application/json
{
  • "data": {
    }
}

Video Effects

You can generate video effect from image(s) and effect prompt.

You need to upload any of image, image_url and select teh desired effect to generate video accordingly.

SecurityAPIKeyHeader
Request
Request Body schema: multipart/form-data
image_file
string <binary> (Base or human image)

Base or human image that you want to use for the video effect.

image_url
string (Base or human image URL)
Default: ""

Base or human image URL that you want to use for the video effect.

ref_image_file
string <binary> (Additional Image(Optional))

Additional image for specific effect e.g. hug.

ref_image_url
string (Additional Image URL(Optional))
Default: ""

Additional image URL for specific effect e.g. hug.

option
string (Option)
Default: "PikaEffects"

Select the effects tool option. Accepted values are: PikaEffects, KlingEffects, WanEffects, ViduEffects, PixverseEffects

effect
string (Effect)
Default: ""

Describe what changes to make to the image.

aspect_ratio
string (Aspect Ratio)

Aspect ratio of the video.

quantity
integer (Quantity) [ 1 .. 4 ]
Default: 1

Number of images to generate. This field will be ignored if ref_image is given.

Responses
200

Video

400

Bad Request

402

Insufficient Credit

422

Validation Error

post/video/video-effects
Request samples
Response samples
application/json
{
  • "data": {
    }
}

Replace Background

This api replaces video background with another video or image.

Example Code

import requests

url = "https://api.vimmerse.net/video/replace-background"

payload = {
    'video_url': 'https://path.to.your/main/video_file.mp4',
    'bg_video_url': 'https://path.to.your/background/video_file.mp4'}

headers = {
    'X-Api-Key': 'YOUR_API_KEY',
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
SecurityAPIKeyHeader
Request
Request Body schema: multipart/form-data
video_file
string <binary> (Video input file)

Input video file.

video_url
string (Video input URL)
Default: ""

Input video URL.

bg_image_file
string <binary> (Image input file)

Input image file.

bg_image_url
string (Image input URL)
Default: ""

Input image URL.

bg_video_file
string <binary> (Background video file)

Input video file.

bg_video_url
string (Background video URL)
Default: ""

Input video URL.

chroma_key_color
string (Chroma key color)
Default: "origin"

HTML color code of chroma key, use #FFFFFF for white, #80FF80 for green, #000000 for black, more codes can be found on https://htmlcolorcodes.com/. When set to 'origin', regular foreground masking is applied instead of chroma masking

chroma_tolerance
string (Chroma tolerance)
Default: "0.1"

Tolerance percentage for the chroma color variations. A float string value between 0 and 1.

overlay_scale
string (Overlay Scale)
Default: "0.6666"

The scale of the overlay with respect to the background. Should be a float string which is between 0 and 1

alignment
string (Alignment)
Default: "center"

Overlay Alignment. Available values are center, left and right.

start_time
string (Start Time)
Default: 0

The timestamp of the BG video to start the overlay on the it

crop_to_content
boolean (Crop to content.)
Default: true

Crop the overlay video to its contents.

x_offset
integer (X Offset)
Default: 0
y_offset
integer (Y Offset)
Default: 0
Responses
200

Replace Video Background.

400

Bad Request

402

Insufficient Credit

422

Validation Error

post/video/replace-background
Request samples
Response samples
application/json
{
  • "data": {
    }
}

Video Elements

You can generate video from element images and prompt.

SecurityAPIKeyHeader
Request
Request Body schema: multipart/form-data
image_files
Array of strings <binary> (Element Images)
Default: []
image_urls
Array of strings (Element Image URLs)
Default: []
aspect_ratio
string (Aspect Ratio)
Default: "16:9"

Aspect ratio of the video

prompt
string (Prompt)
Default: ""

Prompt to generate video.

Responses
200

Video

400

Bad Request

402

Insufficient Credit

422

Validation Error

post/video/elements
Request samples
Response samples
application/json
{
  • "data": {
    }
}

Modify Video

This API modifies a video with image and prompt-based editing

SecurityAPIKeyHeader
Request
Request Body schema: multipart/form-data
video_file
string <binary> (Video input file)

Input video file.

video_url
string (Video input URL)
Default: ""

Input video URL.

image_file
string <binary> (Image input file)

Input image file.

image_url
string (Image input URL)
Default: ""

Input image URL.

prompt
string (Prompt)
Default: ""

Explain what to modify from the video.

creativity_strength
integer (Creativity Strength) [ 1 .. 10 ]
Default: 4

Lower creativity_strength selects mode that generates close to source video. Higher creativity_strength outputs much more loosely to the source video.

Responses
200

Modify Video

400

Bad Request

402

Insufficient Credit

422

Validation Error

post/video/modify
Request samples
Response samples
application/json
{
  • "data": {
    }
}