Video

APIs for editing video.

Upload Video

Uploads videos to the Vimmerse platform for use in API requests.

Benefits

  • Store videos securely in the cloud
  • Reference videos by URL in other API calls
  • Access videos from anywhere
  • Manage your media assets efficiently

Supported Formats

  • MP4 (recommended)
  • MOV
  • AVI
  • WebM

Usage

After uploading, you'll receive a URL that can be used with the video_url parameter in other video processing endpoints.

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

Changes the aspect ratio of a video by cropping or reframing.

How It Works

  • Crops the video to match the target aspect ratio
  • Maintains video quality and content
  • Automatically centers content or allows custom positioning

Parameters

  • video_file or video_url: Input video (required)
  • aspect_ratio: Desired aspect ratio (required)
    • Available: '21:9', '16:9', '4:3', '1:1', '3:4', '9:16', '9:21'
  • offset_x: Horizontal offset from top-left corner (optional)
  • offset_y: Vertical offset from top-left corner (optional)

Use Cases

  • Convert between landscape and portrait formats
  • Prepare videos for different social media platforms
  • Adapt content for different screen sizes

Example

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": "9:16",  # Vertical format for TikTok, Instagram Stories
    "offset_x": 0,  # Optional: horizontal crop offset
    "offset_y": 0   # Optional: vertical crop offset
}

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.

webhook_url
string (Webhook Url)
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

Reframes video using AI to reposition and resize content while maintaining quality.

How It Works

Luma AI's reframing technology intelligently adjusts camera position to fit different aspect ratios without losing important content.

Parameters

  • video_file or video_url: Input video (required)
  • aspect_ratio: Target aspect ratio (required)
    • Available: '21:9', '16:9', '4:3', '1:1', '3:4', '9:16', '9:21'
  • prompt: Optional guidance for reframing behavior
  • grid_position_x: X grid position (optional)
  • grid_position_y: Y grid position (optional)
  • x_start, x_end: Horizontal start/end positions (optional)
  • y_start, y_end: Vertical start/end positions (optional)

Best Practices

  • Works best with clear foreground subjects
  • Automatic centering by default
  • Custom positioning available for precise control

Example

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",
    "prompt": "Keep the main subject centered and visible"
}

response = requests.request("POST", url, headers=headers, data=payload, files= precinct)
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: "Make it realistic"
webhook_url
string (Webhook Url)
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

Enhances video quality using AI-powered upscaling and noise reduction.

Enhancement Options

4X

  • Upscales video to 4x resolution
  • Maintains sharp details
  • Best for: Large screen displays, high-resolution exports

2X

  • Upscales video to 2x resolution
  • Faster processing than 4X
  • Best for: General quality improvement

4X&DeepClean

  • Combines 4X upscaling with noise reduction
  • Removes artifacts and imperfections
  • Best for: Old or low-quality footage

2X&DeepClean

  • Combines 2X upscaling with noise reduction
  • Balanced quality and speed
  • Best for: Moderate quality improvements

DeepClean

  • Noise reduction only, no upscaling
  • Removes grain and artifacts
  • Best for: Already high-resolution videos with noise

Parameters

  • video_file or video_url: Input video (required)
  • enhance_mode: Enhancement option (required)
    • Available: '4X', '2X', '4X&DeepClean', '2X&DeepClean', 'DeepClean'
  • compression_scale: Output compression, 0-1 (default: '0.5')

Example

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 = {
    'enhance_mode': '4X&DeepClean',  # Maximum quality enhancement
    'compression_scale': '0.7'       # Higher quality, larger file
}

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.

enhance_mode
string (Enhance Mode)
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.

webhook_url
string (Webhook Url)
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

Adds AI-generated sound effects to silent or noisy videos.

How It Works

  • Analyzes video content to understand the scene
  • Generates appropriate sound effects based on prompt
  • Syncs audio with visual elements
  • Enhances viewer immersion

Parameters

  • video_file or video_url: Input video (required)
  • prompt: Description of desired sound effects (optional but recommended)
    • Examples: "crowd cheering", "ocean waves", "car engine", "footsteps on gravel"

Use Cases

  • Add ambiance to silent videos
  • Enhance product demonstrations
  • Create ASMR-style content
  • Improve video engagement

Example

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 vibrant cafe ambience with coffee brewing and soft chatter'
}

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.

webhook_url
string (Webhook Url)
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

Creates lip-sync videos using pre-designed avatars with customizable voices.

How It Works

  • Select from a library of professional avatars
  • Choose from multiple voice options
  • Add background images and music
  • Generate realistic talking videos

Parameters

  • avatar_id: Avatar ID (required)
    • Get available avatars from: https://api.vimmerse.net/video/avatars/avatars
  • voice_id: Voice ID (required)
    • Get available voices from: https://api.vimmerse.net/video/avatars/voices
  • prompt: Speech text (required)
  • bg_image_file or bg_image_url: Background image (optional)
  • audio_file or audio_url: Background music (optional)
  • aspect_ratio: Video format - '1:1', '16:9', '9:16' (default: '16:9')
  • show_caption: Enable captions - 'On' or 'Off' (default: 'On')

Use Cases

  • Create professional spokesperson videos
  • Generate educational content
  • Create marketing videos
  • Produce accessible content with captions

Example

import requests

url = "https://api.vimmerse.net/video/avatars/lip-sync"

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

payload = {
    'avatar_id': 'avatar_123',  # Get from avatars endpoint
    'voice_id': 'voice_456',    # Get from voices endpoint
    'prompt': 'Introducing our new product line',
    'bg_image_url': 'https://example.com/background.jpg',
    'aspect_ratio': '9:16',
    'show_caption': 'On'
}

response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
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.

webhook_url
string (Webhook Url)
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

Generates lip-sync videos by making faces speak audio or text prompts.

How It Works

  • Accepts image, video, audio, or text as input
  • Synchronizes lip movement with speech
  • Generates realistic talking video

Input Requirements

You need at least one visual input AND one audio input:

Visual Input:

  • image_file or image_url: Static image of a person
  • video_file or video_url: Video with a person

Audio Input:

  • audio_file or audio_url: Existing audio file
  • prompt + voice: Text-to-speech conversion

Parameters

  • prompt: Speech text (required if no audio)
  • voice: Voice selection (required if using prompt)
    • Available: "Aria", "Roger", "Sarah", "Laura", "Charlie", "George", "Callum", "River", "Liam", "Charlotte", "Alice", "Matilda", "Will", "Jessica", "Eric", "Chris", "Brian", "Daniel", "Lily", "Bill"
  • option: Lip-sync method
    • "Auto": Automatically selects best method
    • "Sync", "HummingBird": For video input
    • "Hedra", "OminHuman": For image input

Use Cases

  • Create talking avatars
  • Add voiceovers to videos
  • Generate spokesperson videos
  • Create personalized messages

Example

import requests

url = "https://api.vimmerse.net/video/lip-sync"

files=[
    ('image_file', ('person.jpg', open('/path/to/person.jpg', 'rb'), 'image/jpeg'))
]
headers = {
    'X-Api-Key': 'YOUR_API_KEY'
}

payload = {
    'prompt': 'Welcome to our product launch event!',
    'voice': 'Sarah',
    'option': 'Auto'
}

response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.text)
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: "AutoLipSync"

Available values are AutoLipSync, SyncLipSync, HummingBird, NewportLipSync, KlingAvatar and NewportDreamAvatar.

voice
string (Voice)
Default: "Rachel"

The voice used for the narration. Available voices are "Aria", "Roger", "Sarah", "Laura", "Charlie", "George", "Callum", "River", "Liam", "Charlotte", "Alice", "Matilda", "Will", "Jessica", "Eric", "Chris", "Brian", "Daniel", "Lily" and "Bill". The default narrator 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

Generates video effects by animating images with specified effects.

Supported Effects and Tools

PikaEffects

Available effects: Explode, Zoom in, Zoom out, Pan left, Pan right, etc.

KlingEffects

Creative animation effects for images.

WanEffects

AI-powered video effects with aspect ratio control.

ViduEffects

Video generation effects with temporal consistency.

PixverseEffects

Style-preserving video effects.

Parameters

  • image_file or image_url: Base image (required)
  • ref_image_file or ref_image_url: Additional image for specific effects (optional)
  • effect: Description of desired effect (required)
    • Examples: "explode", "zoom in", "rotate", "fade", etc.
  • option: Effect tool (required)
    • Available: "PikaEffects", "KlingEffects", "WanEffects", "ViduEffects", "PixverseEffects"
  • aspect_ratio: Video aspect ratio (optional)
  • quantity: Number of variations (1-4, default: 1)

Example

import requests

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

files=[
    ('image_file', ('image.png', open('/path/to/image.png', 'rb'), 'image/png'))
]
headers = {
    'X-Api-Key': 'YOUR_API_KEY'
}

payload = {
    'effect': 'zoom out slowly while rotating',
    'option': 'PikaEffects',
    'aspect_ratio': '16:9',
    'quantity': 2
}

response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.text)
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: "HiggsfieldEffects"

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

effect
string (Effect)
Default: "BulletTime"

Select the effect to apply on the image.

prompt
string (Prompt)
Default: ""

Describe what changes to make to the image.

aspect_ratio
string (Aspect Ratio)

Specifies the aspect ratio of the generated video.

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

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

webhook_url
string (Webhook Url)
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

Replaces the background of a video with another video or image.

How It Works

  • Extracts the foreground object from the video using advanced AI
  • Replaces the background with your chosen video or image
  • Supports chroma key (green screen) masking for precise control

Parameters

  • video_file or video_url: Input video with background to replace (required)
  • bg_video_file or bg_video_url: Background video (optional)
  • bg_image_file or bg_image_url: Background image (optional)
  • chroma_key_color: HTML color code for green screen removal (default: 'origin')
    • Use 'origin' for regular foreground masking
    • Use HTML codes like '#00FF00' for green, '#FFFFFF' for white
  • chroma_tolerance: Color matching tolerance, 0-1 (default: '0.1')
  • overlay_scale: Scale of foreground, 0-1 (default: '0.6666')
  • alignment: Foreground alignment - 'center', 'left', 'right' (default: 'center')
  • start_time: Start timestamp for video background (default: 0)
  • crop_to_content: Crop video to content (default: True)
  • x_offset: Horizontal offset for foreground (default: 0)
  • y_offset: Vertical offset for foreground (default: 0)

Use Cases

  • Product showcase videos
  • Remove studio backgrounds
  • Add dynamic video backgrounds
  • Green screen compositing

Example: Video Background Replacement

import requests

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

payload = {
    'video_url': 'https://example.com/main_video.mp4',
    'bg_video_url': 'https://example.com/background_video.mp4',
    'chroma_key_color': 'origin',  # or '#00FF00' for green screen
    'alignment': 'center'
}

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

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

Example: Image Background Replacement

import requests

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

payload = {
    'video_url': 'https://example.com/main_video.mp4',
    'bg_image_url': 'https://example.com/background_image.jpg'
}

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
webhook_url
string (Webhook Url)
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": {
    }
}

Reference to Video

Generates videos by animating multiple element images with prompts.

How It Works

  • Upload multiple images representing elements
  • Provide a prompt describing the desired animation
  • AI generates a cohesive video with all elements

Parameters

  • image_files or image_urls: List of element images (required)
  • prompt: Description of desired video (required)
  • aspect_ratio: Output video ratio (optional)
  • webhook_url: URL to receive completion notification (optional)

Use Cases

  • Product showcases with multiple items
  • Character animation
  • Multi-element storytelling
  • Interactive demonstrations

Example

import requests

url = "https://api.vimmerse.net/video/reference-to-video"

files=[
    ('image_files', ('character1.png', open('/path/to/char1.png', 'rb'), 'image/png')),
    ('image_files', ('character2.png', open('/path/to/char2.png', 'rb'), 'image/png'))
]
headers = {
    'X-Api-Key': 'YOUR_API_KEY'
}

payload = {
    'prompt': 'Two friends walking together through a sunny park',
    '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
image_files
Array of strings <binary> (Reference Images)
Default: []
image_urls
Array of strings (Reference Image URLs)
Default: []
elements
Array of strings (List of Element Items (each has up to 4 image URLs))
Default: []
aspect_ratio
string (Aspect Ratio)
Default: "16:9"

Specifies the aspect ratio of the generated video

prompt
string (Prompt)
Default: ""

Prompt to generate video.

webhook_url
string (Webhook Url)
quantity
integer (Quantity) [ 1 .. 4 ]
Default: 1
option
any (Option)
Default: "KlingElements"

The AI tool to use for the video generation

duration
integer (Duration) [ 1 .. 10 ]
Default: 5
Responses
200

Video

400

Bad Request

402

Insufficient Credit

422

Validation Error

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

Video to Video

Modifies existing videos by applying changes guided by prompts and reference images.

How It Works

  • Uses Luma AI's video editing technology
  • Requires both video and image inputs
  • Applies changes based on text prompts
  • Controls creativity level for editing strength

Parameters

  • video_file or video_url: Input video to modify (required)
  • image_file or image_url: Reference image for modifications (required)
  • prompt: Description of desired modifications (required)
    • Examples: "Make the character jump higher", "Change the sky to sunset", "Add more motion"
  • creativity_strength: Editing intensity, 1-10 (default: 4)
    • Lower values: Stay closer to original
    • Higher values: More creative changes
  • option: Modification method (default: "LumaModify")

Use Cases

  • Fix or enhance video content
  • Apply style changes
  • Modify specific elements
  • Create video variations

Example

import requests

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

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

payload = {
    'prompt': 'Make the character jump higher and add more energy',
    'creativity_strength': 6
}

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.

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.

webhook_url
string (Webhook Url)
option
string (Option)
Default: "KlingO"

The AI tool to use for the video modification

Responses
200

Video to Video

400

Bad Request

402

Insufficient Credit

422

Validation Error

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

Attach Audio

Attaches audio tracks to videos with multiple synchronization options.

Attachment Modes

MatchVideo

  • Trims or loops audio to match video length
  • Best for: Background music that needs to fit video duration

PadAudio

  • Pads audio with silence to match video length
  • Best for: Short audio that needs to cover longer videos

MatchAudio

  • Trims video to match audio length
  • Best for: Keeping full audio and adjusting video

SpeedAdjust

  • Adjusts video playback speed to match audio duration
  • Best for: Dramatic effect with speed changes

Strict

  • Requires audio and video to have the same duration
  • Best for: Exact synchronization needs

Parameters

  • video_file or video_url: Input video (required)
  • audio_file or audio_url: Audio file to attach (required)
  • attach_mode: Synchronization method (required)
  • webhook_url: Completion notification URL (optional)

Example

import requests

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

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

payload = {
    'attach_mode': 'MatchVideo',  # Audio will loop to match video length
}

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.

audio_file
string <binary> (Audio input file)

Input audio file.

audio_url
string (Audio input URL)
Default: ""

Input audio URL.

attach_mode
string (Attach Mode)
Default: "MatchVideo"

Available values are MatchVideo, PadAudio, MatchAudio, SpeedAdjust and Strict.

webhook_url
string (Webhook Url)
Responses
200

Video with Audio

400

Bad Request

402

Insufficient Credit

422

Validation Error

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

Text/Image to Video

Generate video from text prompt and optional images. Supports various AI models including LumaAI, RunwayML, KlingAI, Veo, Sora, and more.

SecurityAPIKeyHeader
Request
Request Body schema: application/x-www-form-urlencoded
title
string (Title)
Default: ""
description
string (Description)
Default: ""
media_items
string (Media Items)

You can add start and/or end input. Here is an example. [{"type":"image","url": "https://media.vimmerse.net/your/image/file.png", "position": "First"},{"type":"video","url": "https://media.vimmerse.net/your/video/file.mp4", "position": "Last"}].

prompt
string (Prompt)
Default: ""

Text prompt to generate video.

motion_type
string (Motion Type)
Default: "Auto"

AI model to use for video generation. Available values: Auto, LumaAI, LumaRay2, RunwayML, KlingAI, KlingO, MinimaxHailuo, Hunyuan, PicoMotion, StaticMotion, Seedance, SeedanceFast, Veo, VeoFast, Skyreels, Wan, Pixverse, Sora, SoraPro.

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

Aspect ratio of the generated video. Available values: 21:9, 16:9, 4:3, 1:1, 3:4, 9:16, 9:21.

duration
integer (Duration) [ 1 .. 10 ]
Default: 5

Duration of the video in seconds.

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

Number of videos to generate.

audio_option
string (Audio Option)

Audio configuration options for media generation. See media API documentation for details.

seed
integer (Seed)
Default: 0

Random seed for video generation. Use 0 for random.

model
string (Model)
Default: ""

Specific model variant to use (if applicable).

webhook_url
string (Webhook Url)
Responses
200

Generated video from text prompt and/or images (first and last frame).

422

Validation Error

post/video/text-image-to-video
Request samples
Response samples
application/json
{ }