APIs for creating and managing media (animated videos) with comprehensive control over generation parameters.
Upload one image to generate an animated video with AI-generated motion. The system automatically creates natural movement based on the image content.
Upload two images (start and end frames) to create a transition video. The system generates smooth morphing animations between the frames.
Provide a text description to generate a video entirely from scratch. No images required - pure AI generation.
Use the media_items parameter to specify complex input configurations with multiple images, videos, and precise positioning.
Creates a new media object and initiates video generation from images, text prompts, or a combination of both.
Once submitted, the API:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
title |
string | No | "" | Media title for organization |
description |
string | No | "" | Media description |
visibility_status |
string | No | "1" | Access control: "0" (private), "1" (unlisted), "2" (public) |
image_files |
array[file] | No* | [] | Image files to upload (multipart/form-data). Deprecated - use media_items instead. |
image_urls |
array[string] | No* | [] | Public image URLs. Deprecated - use media_items instead. |
media_items |
string (JSON) | No* | null | Advanced input configuration. JSON array with type, url, and position fields. |
prompt |
string | No* | "" | Text description for video generation. Required if no images provided. |
motion_type |
string | No | "Auto" | AI model for motion: Auto, KlingAI, LumaAI, RunwayML |
quantity |
integer | No | 1 | Number of video variations to generate (1-4) |
duration |
integer | No | 5 | Video length in seconds (1-10) |
loop |
integer | No | 1 | Number of times to repeat motion (1-6). Ignored when narration is used. |
audio_option |
string (JSON) | No | null | Audio configuration (see Audio Options below) |
character_animate |
boolean | No | false | Enable character animation mode |
model |
string | No | null | Try-on model: SeedreamTryOn, NanoBananaProTryOn, FashnTryOn, ViduTryOn, KlingTryOn |
aspect_ratio |
string | No | null | Video dimensions: 16:9, 4:3, 1:1, 3:4, 9:16 |
webhook_url |
string | No | null | URL for completion notification |
Either prompt, image_files, image_urls, or media_items must be provided.
import requests
BASE_URL = "https://api.vimmerse.net"
API_KEY = "YOUR_API_KEY"
url = f"{BASE_URL}/media"
headers = {"X-Api-Key": API_KEY}
# Prepare image files
files = [
("image_files", ("start_frame.png", open("path/to/start_frame.png", "rb"), "image/png")),
("image_files", ("end_frame.png", open("path/to/end_frame.png", "rb"), "image/png"))
]
payload = {
"title": "Morph Animation",
"description": "Transition between two scenes",
"motion_type": "Auto",
"duration": 5,
"aspect_ratio": "16:9"
}
try:
response = requests.post(url, headers=headers, data=payload, files=files, timeout=60)
response.raise_for_status()
result = response.json()
media_data = result["data"]
print(f"Media created! ID: {media_data['id']}")
print(f"Status: {media_data['processing_status']}")
# Close file handles
for _, f in files:
if hasattr(f[1], 'close'):
f[1].close()
except requests.exceptions.RequestException as e:
print(f"Error: {e}")
# Ensure files are closed on error
for _, f in files:
if hasattr(f[1], 'close'):
f[1].close()
import requests
import json
BASE_URL = "https://api.vimmerse.net"
API_KEY = "YOUR_API_KEY"
url = f"{BASE_URL}/media"
headers = {"X-Api-Key": API_KEY}
payload = {
"title": "Product Showcase",
"prompt": "Smooth camera movement showcasing the product",
"media_items": json.dumps([
{
"type": "image",
"url": "https://example.com/product-front.png",
"position": "First"
},
{
"type": "image",
"url": "https://example.com/product-back.png",
"position": "Last"
}
]),
"motion_type": "KlingAI",
"quantity": 2,
"duration": 8,
"camera_control": "HorizontalArc",
"audio_option": json.dumps({
"narrator": "Sarah",
"narration": "Introducing our revolutionary product",
"bg_music_prompt": "Upbeat, modern background music"
}),
"aspect_ratio": "9:16",
"webhook_url": "https://your-domain.com/webhook/media-complete"
}
try:
response = requests.post(url, headers=headers, data=payload, timeout=60)
response.raise_for_status()
result = response.json()
print(f"Media created: {result['data']['id']}")
except requests.exceptions.RequestException as e:
print(f"Error: {e}")
import requests
import json
BASE_URL = "https://api.vimmerse.net"
API_KEY = "YOUR_API_KEY"
url = f"{BASE_URL}/media"
headers = {"X-Api-Key": API_KEY}
payload = {
"title": "AI Generated Video",
"prompt": "A cute bunny jumping through a magical forest with sparkling fairy dust and glowing mushrooms",
"motion_type": "Auto",
"duration": 5,
"aspect_ratio": "16:9",
"audio_option": json.dumps({
"narrator": "Rachel",
"narration": "In a magical forest, a bunny discovers wonder and adventure",
"bg_music_prompt": "Gentle, magical background music with chimes and soft melodies"
}),
"webhook_url": "https://your-domain.com/webhook/media-complete"
}
try:
response = requests.post(url, headers=headers, data=payload, timeout=60)
response.raise_for_status()
result = response.json()
media_data = result["data"]
print(f"Media created! ID: {media_data['id']}")
print(f"Status: {media_data['processing_status']}")
except requests.exceptions.HTTPError as e:
print(f"HTTP Error: {e}")
if e.response is not None:
print(f"Response: {e.response.text}")
except requests.exceptions.RequestException as e:
print(f"Request failed: {e}")
This complete example creates media, polls for completion, and downloads the final video:
import requests
import json
import time
BASE_URL = "https://api.vimmerse.net"
API_KEY = "YOUR_API_KEY"
# Step 1: Create media
url = f"{BASE_URL}/media"
headers = {"X-Api-Key": API_KEY}
payload = {
"title": "Product Animation",
"prompt": "Smooth camera movement showcasing a sleek smartphone",
"motion_type": "Auto",
"duration": 5,
"aspect_ratio": "16:9",
"audio_option": json.dumps({
"narrator": "Sarah",
"narration": "Introducing our latest innovation",
"bg_music_prompt": "Modern, upbeat background music"
})
}
print("Creating media...")
try:
response = requests.post(url, headers=headers, data=payload, timeout=60)
response.raise_for_status()
result = response.json()
media_data = result["data"]
media_id = media_data["id"]
print(f"✓ Media created successfully!")
print(f" Media ID: {media_id}")
print(f" Status: {media_data['processing_status']}")
except requests.exceptions.HTTPError as e:
print(f"✗ HTTP Error: {e}")
if e.response is not None:
print(f" Response: {e.response.text}")
exit(1)
except requests.exceptions.RequestException as e:
print(f"✗ Request failed: {e}")
exit(1)
# Step 2: Poll for completion
print("\nPolling for media completion...")
max_attempts = 120 # Maximum 60 minutes
attempt = 0
poll_interval = 30 # Check every 30 seconds
def get_media_status(media_id):
"""Retrieve the current status of a media."""
url = f"{BASE_URL}/media/{media_id}/processing-status"
headers = {"X-Api-Key": API_KEY}
try:
response = requests.get(url, headers=headers, timeout=30)
response.raise_for_status()
return response.json()["data"]
except requests.exceptions.RequestException as e:
print(f" Warning: Error retrieving status: {e}")
return None
while attempt < max_attempts:
status_data = get_media_status(media_id)
if not status_data:
print(f" Attempt {attempt + 1}/{max_attempts}: Failed to retrieve status, retrying...")
time.sleep(poll_interval)
attempt += 1
continue
status = status_data.get("processing_status")
progress = status_data.get("progress_percentage", 0)
print(f" Attempt {attempt + 1}/{max_attempts}: Status={status}, Progress={progress}%")
if status == "success":
print(f"\n✓ Media completed successfully!")
# Get full media details
url = f"{BASE_URL}/media/{media_id}"
response = requests.get(url, headers=headers)
media_data = response.json()["data"]
# Download video
download_url = f"{BASE_URL}/media/{media_id}/download"
print("\nDownloading video...")
try:
video_response = requests.get(download_url, headers=headers, stream=True, timeout=60)
video_response.raise_for_status()
output_path = "media_video.mp4"
total_size = int(video_response.headers.get('content-length', 0))
downloaded = 0
with open(output_path, "wb") as f:
for chunk in video_response.iter_content(chunk_size=8192):
if chunk:
f.write(chunk)
downloaded += len(chunk)
if total_size > 0:
percent = (downloaded / total_size) * 100
print(f" Download progress: {percent:.1f}%", end="\r")
print(f"\n✓ Video downloaded successfully!")
print(f" Saved to: {output_path}")
print(f" File size: {downloaded / (1024 * 1024):.2f} MB")
except Exception as e:
print(f"\n✗ Error downloading video: {e}")
break
elif status == "fail":
print(f"\n✗ Media generation failed.")
print(f" Media ID: {media_id}")
exit(1)
time.sleep(poll_interval)
attempt += 1
if attempt >= max_attempts:
print(f"\n⚠ Timeout: Media generation is taking longer than expected.")
print(f" Media ID: {media_id}")
print(f" Please check the status later using: GET {BASE_URL}/media/{media_id}/processing-status")
The API may return the following HTTP status codes:
200 - Success. Media creation initiated.400 - Bad Request. Invalid parameters or missing required fields.402 - Payment Required. Insufficient credits in your account.404 - Not Found. Resource not found.429 - Too Many Requests. Rate limit exceeded.500 - Internal Server Error. Please retry or contact support.| title | string (Media Title) Default: "" Optional title for your media. Used for organization and display purposes. | ||||||||||||||||||||||||
| description | string (Media Description) Default: "" Optional description of your media. Used for documentation and search purposes. | ||||||||||||||||||||||||
| visibility_status | string (Visibility Status) Default: "1" Visibility Status:
| ||||||||||||||||||||||||
| image_files | Array of strings <binary> (Image Files) Deprecated Default: [] ⚠️ Deprecated: Image files to upload. Use | ||||||||||||||||||||||||
| image_urls | Array of strings (Image URLs) Deprecated Default: [] ⚠️ Deprecated: Array of publicly accessible image URLs. Use | ||||||||||||||||||||||||
| media_items | string (Media Items) Advanced input configuration as a JSON string. Array of media items with | ||||||||||||||||||||||||
| prompt | string (Text Prompt) Default: "" Text description for video generation. Required if no images are provided via | ||||||||||||||||||||||||
| motion_type | string (Motion Type) Default: "Auto" AI model for motion generation. Available values: Auto, AutoT3, KlingAI, KlingT4, LumaAI, LumaRay2, VeoFast, Veo, RunwayML, MinimaxHailuo, Seedance, SeedanceFast, Hunyuan, Pixverse, PixverseT3, PicoMotion, StaticMotion, Wan, Sora, SoraPro, TryOnVideo. Default is 'Auto'. | ||||||||||||||||||||||||
| camera_control | string (Camera Control) Default: "" Camera path/movement for the video. Defines how the camera moves through the scene. | ||||||||||||||||||||||||
| quantity | integer (Quantity) [ 1 .. 4 ] Default: 1 Number of video variations to generate. Range: 1-4. Default is 1. Each variation may use different seeds or parameters. | ||||||||||||||||||||||||
| duration | integer (Video Duration) [ 1 .. 10 ] Default: 5 Duration of the generated video in seconds. Range: 1-10. Default is 5. Longer durations may require more processing time and credits. | ||||||||||||||||||||||||
| loop | integer (Motion Loop Count) [ 1 .. 6 ] Default: 1 Number of times the same motion is repeated. Range: 1-6. Default is 1. This setting is ignored when narration is used, as the video duration matches the narration length. | ||||||||||||||||||||||||
| audio_option | string (Audio Configuration) Audio configuration options for media generation. Configure narration, background music, and audio settings using a JSON string. ⚠️ Important: These options are ignored if Audio Parameters
Usage ExamplesExample 1: Text-to-Speech Narration
Example 2: Pre-recorded Narration
Example 3: AI-Generated Background Music
Example 4: Combined Narration and Background Music
Example 5: External Music File
Best Practices
Format Requirements
| ||||||||||||||||||||||||
| character_animate | boolean (Character Animation) Default: false If | ||||||||||||||||||||||||
| model | string (Try-On Model) Model used for try-on video generation. Available values: 'SeedreamTryOn', 'NanoBananaProTryOn', 'FashnTryOn', 'ViduTryOn', 'KlingTryOn'. Only applicable for try-on video use cases. | ||||||||||||||||||||||||
| aspect_ratio | string (Aspect Ratio) Video aspect ratio. Available values: '16:9' (landscape), '4:3' (standard), '1:1' (square), '3:4' (portrait), '9:16' (vertical/mobile). If not specified, uses default or detected from input images. | ||||||||||||||||||||||||
| webhook_url | string (Webhook URL) URL endpoint to receive a POST request notification when media generation completes. Your endpoint must respond with a 2xx status code within 10 seconds. The webhook payload contains 'customer_id', 'media_id', and 'status' fields. |
New Media
Insufficient Credit
Not Found
Validation Error
{- "data": {
- "id": "abc123-def456-ghi789",
- "title": "Example Media",
- "description": "Media description",
- "rating": "",
- "customer_id": "customer123",
- "batch_id": "",
- "is_transition": "No",
- "duration_time": "0",
- "progress_percentage": 20,
- "processing_status": "queue_bullet",
- "visibility_status": "1",
- "file_map": [
- {
- "FileType": "Texture",
- "FileName": "filename.jpg"
}
], - "submit_params": {
- "native_audio": true,
- "pipeline_preset": "Fast",
- "file_size": "",
- "scale_factor": "1"
}, - "pose_preset": {
- "MotionType": "Auto",
- "Params": "Prompt=|CameraPath=|Quantity=1|MotionAmount=5|MotionLength=5|Loop=1"
}, - "bullet_version": "0",
- "video_history": [ ],
- "result": [ ],
- "webhook_url": "",
- "nsfw": "0",
- "created_at": "2025-04-01 18:57:37.355064+00:00",
- "updated_at": "2025-04-01 18:57:55.502020+00:00",
- "version": "2"
}
}Retrieves the current processing status and progress percentage of a media object.
This lightweight endpoint is optimized for frequent polling and provides minimal response data for efficient status checking.
| Field | Type | Description |
|---|---|---|
progress_percentage |
integer | Processing progress (0-100) |
processing_status |
string | Current processing state |
| Status | Meaning | Action |
|---|---|---|
queue_bullet |
Waiting in queue | Keep polling |
processing_bullet |
Video generation in progress | Keep polling |
success |
Video ready | Download or retrieve results |
fail |
Processing failed | Check error logs or retry |
cancel |
Processing cancelled | No further action needed |
import requests
BASE_URL = "https://api.vimmerse.net"
MEDIA_ID = "your-media-id-here"
url = f"{BASE_URL}/media/{MEDIA_ID}/processing-status"
headers = {"X-Api-Key": "YOUR_API_KEY"}
try:
response = requests.get(url, headers=headers, timeout=30)
response.raise_for_status()
result = response.json()
status_data = result["data"]
print(f"Progress: {status_data['progress_percentage']}%")
print(f"Status: {status_data['processing_status']}")
except requests.exceptions.RequestException as e:
print(f"Error: {e}")
import requests
import time
BASE_URL = "https://api.vimmerse.net"
MEDIA_ID = "your-media-id-here"
API_KEY = "YOUR_API_KEY"
def check_media_status(media_id):
"""Check media processing status."""
url = f"{BASE_URL}/media/{media_id}/processing-status"
headers = {"X-Api-Key": API_KEY}
try:
response = requests.get(url, headers=headers, timeout=30)
response.raise_for_status()
return response.json()["data"]
except requests.exceptions.RequestException as e:
print(f"Error checking status: {e}")
return None
# Poll until complete
max_attempts = 120 # Maximum 60 minutes
attempt = 0
while attempt < max_attempts:
status_data = check_media_status(MEDIA_ID)
if not status_data:
print(f"Attempt {attempt + 1}/{max_attempts}: Failed to retrieve status")
time.sleep(30)
attempt += 1
continue
progress = status_data.get("progress_percentage", 0)
status = status_data.get("processing_status")
print(f"Attempt {attempt + 1}/{max_attempts}: Status={status}, Progress={progress}%")
if status == "success":
print("\n✓ Media completed successfully!")
break
elif status == "fail":
print("\n✗ Media generation failed.")
break
time.sleep(30) # Check every 30 seconds
attempt += 1
if attempt >= max_attempts:
print("\n⚠ Timeout: Processing is taking longer than expected.")
Media progress percentage
Not Found
Validation Error
{- "data": {
- "progress_percentage": "100",
- "processing_status": "success"
}
}Retrieves detailed information about a specific media object, including processing status, generated videos, and metadata.
| Field | Type | Description |
|---|---|---|
id |
string | Unique media identifier |
title |
string | Media title |
description |
string | Media description |
processing_status |
string | Current processing state (see Status Values below) |
progress_percentage |
integer | Processing progress (0-100) |
result |
array | Array of generated video objects with URLs |
video_history |
array | Processing history with details of each generation |
base_url |
string | Base URL for accessing media files |
bullet_version |
integer | Version number of the generated video |
created_at |
string | ISO 8601 timestamp of creation |
updated_at |
string | ISO 8601 timestamp of last update |
queue_bullet - Waiting in queue for processingprocessing_bullet - Currently being processedsuccess - Completed successfullyfail - Failed to processcancel - Processing was cancelledimport requests
BASE_URL = "https://api.vimmerse.net"
MEDIA_ID = "your-media-id-here"
url = f"{BASE_URL}/media/{MEDIA_ID}"
headers = {"X-Api-Key": "YOUR_API_KEY"}
try:
response = requests.get(url, headers=headers, timeout=30)
response.raise_for_status()
result = response.json()
media_data = result["data"]
print(f"Media ID: {media_data['id']}")
print(f"Status: {media_data['processing_status']}")
print(f"Progress: {media_data.get('progress_percentage', 0)}%")
if media_data['processing_status'] == 'success':
# Access generated videos
if media_data.get("result"):
print(f"Generated {len(media_data['result'])} video(s)")
for idx, video in enumerate(media_data["result"], 1):
print(f"Video {idx}: {video.get('url', 'N/A')}")
else:
# Download URL available
download_url = f"{BASE_URL}/media/{MEDIA_ID}/download"
print(f"Download URL: {download_url}")
elif media_data['processing_status'] == 'fail':
print("Media generation failed. Check error details.")
except requests.exceptions.HTTPError as e:
if e.response.status_code == 404:
print("Media not found. Please verify the media ID.")
else:
print(f"HTTP Error: {e}")
except requests.exceptions.RequestException as e:
print(f"Request failed: {e}")
fields query parameter to retrieve specific fields onlyMedia Object
Media Not Found
Validation Error
{- "data": {
- "data": {
- "id": "xyz789-abc123-def456",
- "title": "Product Showcase",
- "description": "Animated product video",
- "rating": "5",
- "customer_id": "customer123",
- "batch_id": "batch456",
- "is_transition": "No",
- "duration_time": "5.0",
- "progress_percentage": 100,
- "processing_status": "success",
- "visibility_status": "1",
- "file_map": [
- {
- "FileType": "Texture",
- "FileName": "uploaded_file1.png"
}
], - "submit_params": {
- "native_audio": true,
- "pipeline_preset": "Fast",
- "file_size": "",
- "scale_factor": "1"
}, - "pose_preset": {
- "MotionType": "Auto",
- "Params": "Prompt=|CameraPath=|Quantity=1|MotionAmount=5|MotionLength=5|Loop=1|AspectRatio=16:9"
}, - "bullet_version": "1",
- "video_history": [
- {
- "pose_preset": {
- "MotionType": "Auto",
- "Params": "Prompt=|CameraPath=|Quantity=1|MotionAmount=5|MotionLength=5|Loop=1|AspectRatio=16:9"
}, - "file_map": [
- {
- "FileType": "Texture",
- "FileName": "uploaded_file1.png"
}
], - "service_name": "RunwayML",
- "service_seeds": [
- 6305
], - "created_at": "2025-04-01 13:20:36.607637+00:00",
- "service_version": "gen3a_turbo:2024-11-06",
- "bullet_version": "1",
- "resolution": [
- 1280,
- 704
], - "submit_params": {
- "native_audio": true,
- "pipeline_preset": "Fast",
- "file_size": "",
- "scale_factor": "1"
}
}
], - "result": [ ],
- "nsfw": "0",
- "service_name": "RunwayML",
- "service_version": "gen3a_turbo:2024-11-06",
- "created_at": "2025-04-01 13:19:10.786297+00:00",
- "updated_at": "2025-04-01 13:20:37.032634+00:00",
- "version": "2"
}
}
}Updates media metadata and optionally regenerates the video with new parameters.
⚠️ Credit Usage: Updating certain fields triggers video regeneration and consumes credits.
prompt - Text descriptionmotion_type - AI model selectionquantity - Number of variationsduration - Video lengthloop - Motion repetition countcamera_control - Camera pathaspect_ratio - Video dimensionsaudio_option - Audio configurationmedia_items - Input media configurationmodel - Try-on model selectiontitle - Media titledescription - Media descriptionrating - User ratingvisibility_status - Access controlwebhook_url - Webhook URLimport requests
BASE_URL = "https://api.vimmerse.net"
MEDIA_ID = "your-media-id-here"
url = f"{BASE_URL}/media/{MEDIA_ID}/edit"
headers = {"X-Api-Key": "YOUR_API_KEY"}
payload = {
"title": "Updated Product Video",
"description": "New description text",
"rating": "5",
"visibility_status": "2" # Make public
}
try:
response = requests.put(url, headers=headers, data=payload, timeout=60)
response.raise_for_status()
result = response.json()
print(f"Media updated: {result['data']['id']}")
except requests.exceptions.RequestException as e:
print(f"Error: {e}")
import requests
import json
BASE_URL = "https://api.vimmerse.net"
MEDIA_ID = "your-media-id-here"
url = f"{BASE_URL}/media/{MEDIA_ID}/edit"
headers = {"X-Api-Key": "YOUR_API_KEY"}
payload = {
"title": "Updated Video",
"motion_type": "RunwayML", # Triggers regeneration
"duration": 9, # Triggers regeneration
"camera_control": "HorizontalArc", # Triggers regeneration
"audio_option": json.dumps({
"narrator": "Sarah",
"narration": "Updated narration text",
"bg_music_prompt": "Energetic background music"
})
}
try:
response = requests.put(url, headers=headers, data=payload, timeout=60)
response.raise_for_status()
result = response.json()
media_data = result["data"]
print(f"Media regeneration started!")
print(f"Media ID: {media_data['id']}")
print(f"Status: {media_data['processing_status']}")
except requests.exceptions.HTTPError as e:
if e.response.status_code == 402:
print("Insufficient credits for regeneration")
else:
print(f"HTTP Error: {e}")
except requests.exceptions.RequestException as e:
print(f"Error: {e}")
400 - Bad Request. Invalid parameters or media not found.402 - Payment Required. Insufficient credits for regeneration.404 - Not Found. Media not found or access denied.| title | string (Media Title) Default: "" New title for the media. If provided, updates the media title. Does not trigger regeneration. | ||||||||||||||||||||||||
| description | string (Media Description) Default: "" New description for the media. If provided, updates the media description. Does not trigger regeneration. | ||||||||||||||||||||||||
| visibility_status | string (Visibility Status) Default: "1" Visibility Status:
| ||||||||||||||||||||||||
| rating | string (Rating) User rating for the media (typically 1-5). Does not trigger regeneration. | ||||||||||||||||||||||||
| media_items | string (Media Items) Updated media items configuration as a JSON string. If provided, triggers regeneration. Format: [{"type":"image","url": "https://example.com/image.png", "position": "First"}]. See Create Media API for detailed format. | ||||||||||||||||||||||||
| prompt | string (Text Prompt) Default: "" Updated text description for video generation. If provided, triggers regeneration and consumes credits. | ||||||||||||||||||||||||
| motion_type | string (Motion Type) Updated AI model for motion generation. If provided, triggers regeneration. Available values: Auto, AutoT3, KlingAI, KlingT4, LumaAI, LumaRay2, VeoFast, Veo, RunwayML, MinimaxHailuo, Seedance, SeedanceFast, Hunyuan, Pixverse, PixverseT3, PicoMotion, StaticMotion, Wan, Sora, SoraPro, TryOnVideo. | ||||||||||||||||||||||||
| camera_control | string (Camera Control) Default: "" Updated camera path/movement. If provided, triggers regeneration. Available values: [{'label': 'Auto', 'prompt': '', 'value': ''}, {'label': 'Static', 'prompt': 'Camera static and steady', 'value': 'Static'}, {'label': 'Crane up', 'prompt': 'Camera crane up', 'value': 'Crane up'}, {'label': 'Crane down', 'prompt': 'Camera crane down', 'value': 'Crane down'}, {'label': 'Tilt up', 'prompt': 'Camera tilt up', 'value': 'Tilt up'}, {'label': 'Tilt down', 'prompt': 'Camera tilt down', 'value': 'Tilt down'}, {'label': 'Pan right', 'prompt': 'Camera pan right', 'value': 'Pan right'}, {'label': 'Pan left', 'prompt': 'Camera pan left', 'value': 'Pan left'}, {'label': 'Roll right', 'prompt': 'Camera roll right', 'value': 'Roll right'}, {'label': 'Roll left', 'prompt': 'Camera roll left', 'value': 'Roll left'}, {'label': 'Orbit right', 'prompt': 'Camera orbit right', 'value': 'Orbit right'}, {'label': 'Orbit left', 'prompt': 'Camera orbit left', 'value': 'Orbit left'}, {'label': 'Rotate 360', 'prompt': 'Camera move in 360-degree rotation around', 'value': 'Rotate 360'}, {'label': 'Dolly zoom', 'prompt': 'Camera dolly zoom', 'value': 'Dolly zoom'}, {'label': 'Zoom in', 'prompt': 'Camera zoom in', 'value': 'Zoom in'}, {'label': 'Zoom out', 'prompt': 'Camera zoom out', 'value': 'Zoom out'}, {'label': 'Aerial', 'prompt': 'Camera aerial as FPV drone shot', 'value': 'Aerial'}] | ||||||||||||||||||||||||
| quantity | integer (Quantity) [ 1 .. 4 ] Updated number of video variations (1-4). If provided, triggers regeneration and consumes credits. | ||||||||||||||||||||||||
| duration | integer (Video Duration) [ 1 .. 10 ] Updated video duration in seconds (1-10). If provided, triggers regeneration and consumes credits. | ||||||||||||||||||||||||
| loop | integer (Motion Loop Count) [ 1 .. 6 ] Updated number of times to repeat motion (1-6). If provided, triggers regeneration. Ignored when narration is used. | ||||||||||||||||||||||||
| audio_option | string (Audio Configuration) Audio configuration options for media generation. Configure narration, background music, and audio settings using a JSON string. ⚠️ Important: These options are ignored if Audio Parameters
Usage ExamplesExample 1: Text-to-Speech Narration
Example 2: Pre-recorded Narration
Example 3: AI-Generated Background Music
Example 4: Combined Narration and Background Music
Example 5: External Music File
Best Practices
Format Requirements
| ||||||||||||||||||||||||
| model | string (Try-On Model) Updated try-on model. If provided, triggers regeneration. Available values: 'SeedreamTryOn', 'NanoBananaProTryOn', 'FashnTryOn', 'ViduTryOn', 'KlingTryOn'. | ||||||||||||||||||||||||
| aspect_ratio | string (Aspect Ratio) Updated video aspect ratio. If provided, triggers regeneration. Available values: '16:9', '4:3', '1:1', '3:4', '9:16'. | ||||||||||||||||||||||||
| webhook_url | string (Webhook URL) Updated webhook URL for completion notifications. Does not trigger regeneration. Your endpoint must respond with a 2xx status code within 10 seconds. |
Media Object
Bad Request
Insufficient Credit
Not Found
Validation Error
{- "data": {
- "id": "xyz789-abc123-def456",
- "title": "Product Showcase",
- "description": "Animated product video",
- "rating": "5",
- "customer_id": "customer123",
- "batch_id": "batch456",
- "is_transition": "No",
- "duration_time": "5.0",
- "progress_percentage": 100,
- "processing_status": "success",
- "visibility_status": "1",
- "file_map": [
- {
- "FileType": "Texture",
- "FileName": "uploaded_file1.png"
}
], - "submit_params": {
- "native_audio": true,
- "pipeline_preset": "Fast",
- "file_size": "",
- "scale_factor": "1"
}, - "pose_preset": {
- "MotionType": "Auto",
- "Params": "Prompt=|CameraPath=|Quantity=1|MotionAmount=5|MotionLength=5|Loop=1|AspectRatio=16:9"
}, - "bullet_version": "1",
- "video_history": [
- {
- "pose_preset": {
- "MotionType": "Auto",
- "Params": "Prompt=|CameraPath=|Quantity=1|MotionAmount=5|MotionLength=5|Loop=1|AspectRatio=16:9"
}, - "file_map": [
- {
- "FileType": "Texture",
- "FileName": "uploaded_file1.png"
}
], - "service_name": "RunwayML",
- "service_seeds": [
- 6305
], - "created_at": "2025-04-01 13:20:36.607637+00:00",
- "service_version": "gen3a_turbo:2024-11-06",
- "bullet_version": "1",
- "resolution": [
- 1280,
- 704
], - "submit_params": {
- "native_audio": true,
- "pipeline_preset": "Fast",
- "file_size": "",
- "scale_factor": "1"
}
}
], - "result": [ ],
- "nsfw": "0",
- "service_name": "RunwayML",
- "service_version": "gen3a_turbo:2024-11-06",
- "created_at": "2025-04-01 13:19:10.786297+00:00",
- "updated_at": "2025-04-01 13:20:37.032634+00:00",
- "version": "2"
}
}Updates media metadata and optionally regenerates the video with new parameters.
⚠️ Credit Usage: Updating certain fields triggers video regeneration and consumes credits.
prompt - Text descriptionmotion_type - AI model selectionquantity - Number of variationsduration - Video lengthloop - Motion repetition countcamera_control - Camera pathaspect_ratio - Video dimensionsaudio_option - Audio configurationmedia_items - Input media configurationmodel - Try-on model selectiontitle - Media titledescription - Media descriptionrating - User ratingvisibility_status - Access controlwebhook_url - Webhook URLimport requests
BASE_URL = "https://api.vimmerse.net"
MEDIA_ID = "your-media-id-here"
url = f"{BASE_URL}/media/{MEDIA_ID}/edit"
headers = {"X-Api-Key": "YOUR_API_KEY"}
payload = {
"title": "Updated Product Video",
"description": "New description text",
"rating": "5",
"visibility_status": "2" # Make public
}
try:
response = requests.put(url, headers=headers, data=payload, timeout=60)
response.raise_for_status()
result = response.json()
print(f"Media updated: {result['data']['id']}")
except requests.exceptions.RequestException as e:
print(f"Error: {e}")
import requests
import json
BASE_URL = "https://api.vimmerse.net"
MEDIA_ID = "your-media-id-here"
url = f"{BASE_URL}/media/{MEDIA_ID}/edit"
headers = {"X-Api-Key": "YOUR_API_KEY"}
payload = {
"title": "Updated Video",
"motion_type": "RunwayML", # Triggers regeneration
"duration": 9, # Triggers regeneration
"camera_control": "HorizontalArc", # Triggers regeneration
"audio_option": json.dumps({
"narrator": "Sarah",
"narration": "Updated narration text",
"bg_music_prompt": "Energetic background music"
})
}
try:
response = requests.put(url, headers=headers, data=payload, timeout=60)
response.raise_for_status()
result = response.json()
media_data = result["data"]
print(f"Media regeneration started!")
print(f"Media ID: {media_data['id']}")
print(f"Status: {media_data['processing_status']}")
except requests.exceptions.HTTPError as e:
if e.response.status_code == 402:
print("Insufficient credits for regeneration")
else:
print(f"HTTP Error: {e}")
except requests.exceptions.RequestException as e:
print(f"Error: {e}")
400 - Bad Request. Invalid parameters or media not found.402 - Payment Required. Insufficient credits for regeneration.404 - Not Found. Media not found or access denied.| title | string (Media Title) Default: "" New title for the media. If provided, updates the media title. Does not trigger regeneration. | ||||||||||||||||||||||||
| description | string (Media Description) Default: "" New description for the media. If provided, updates the media description. Does not trigger regeneration. | ||||||||||||||||||||||||
| visibility_status | string (Visibility Status) Default: "1" Visibility Status:
| ||||||||||||||||||||||||
| rating | string (Rating) User rating for the media (typically 1-5). Does not trigger regeneration. | ||||||||||||||||||||||||
| media_items | string (Media Items) Updated media items configuration as a JSON string. If provided, triggers regeneration. Format: [{"type":"image","url": "https://example.com/image.png", "position": "First"}]. See Create Media API for detailed format. | ||||||||||||||||||||||||
| prompt | string (Text Prompt) Default: "" Updated text description for video generation. If provided, triggers regeneration and consumes credits. | ||||||||||||||||||||||||
| motion_type | string (Motion Type) Updated AI model for motion generation. If provided, triggers regeneration. Available values: Auto, AutoT3, KlingAI, KlingT4, LumaAI, LumaRay2, VeoFast, Veo, RunwayML, MinimaxHailuo, Seedance, SeedanceFast, Hunyuan, Pixverse, PixverseT3, PicoMotion, StaticMotion, Wan, Sora, SoraPro, TryOnVideo. | ||||||||||||||||||||||||
| camera_control | string (Camera Control) Default: "" Updated camera path/movement. If provided, triggers regeneration. Available values: [{'label': 'Auto', 'prompt': '', 'value': ''}, {'label': 'Static', 'prompt': 'Camera static and steady', 'value': 'Static'}, {'label': 'Crane up', 'prompt': 'Camera crane up', 'value': 'Crane up'}, {'label': 'Crane down', 'prompt': 'Camera crane down', 'value': 'Crane down'}, {'label': 'Tilt up', 'prompt': 'Camera tilt up', 'value': 'Tilt up'}, {'label': 'Tilt down', 'prompt': 'Camera tilt down', 'value': 'Tilt down'}, {'label': 'Pan right', 'prompt': 'Camera pan right', 'value': 'Pan right'}, {'label': 'Pan left', 'prompt': 'Camera pan left', 'value': 'Pan left'}, {'label': 'Roll right', 'prompt': 'Camera roll right', 'value': 'Roll right'}, {'label': 'Roll left', 'prompt': 'Camera roll left', 'value': 'Roll left'}, {'label': 'Orbit right', 'prompt': 'Camera orbit right', 'value': 'Orbit right'}, {'label': 'Orbit left', 'prompt': 'Camera orbit left', 'value': 'Orbit left'}, {'label': 'Rotate 360', 'prompt': 'Camera move in 360-degree rotation around', 'value': 'Rotate 360'}, {'label': 'Dolly zoom', 'prompt': 'Camera dolly zoom', 'value': 'Dolly zoom'}, {'label': 'Zoom in', 'prompt': 'Camera zoom in', 'value': 'Zoom in'}, {'label': 'Zoom out', 'prompt': 'Camera zoom out', 'value': 'Zoom out'}, {'label': 'Aerial', 'prompt': 'Camera aerial as FPV drone shot', 'value': 'Aerial'}] | ||||||||||||||||||||||||
| quantity | integer (Quantity) [ 1 .. 4 ] Updated number of video variations (1-4). If provided, triggers regeneration and consumes credits. | ||||||||||||||||||||||||
| duration | integer (Video Duration) [ 1 .. 10 ] Updated video duration in seconds (1-10). If provided, triggers regeneration and consumes credits. | ||||||||||||||||||||||||
| loop | integer (Motion Loop Count) [ 1 .. 6 ] Updated number of times to repeat motion (1-6). If provided, triggers regeneration. Ignored when narration is used. | ||||||||||||||||||||||||
| audio_option | string (Audio Configuration) Audio configuration options for media generation. Configure narration, background music, and audio settings using a JSON string. ⚠️ Important: These options are ignored if Audio Parameters
Usage ExamplesExample 1: Text-to-Speech Narration
Example 2: Pre-recorded Narration
Example 3: AI-Generated Background Music
Example 4: Combined Narration and Background Music
Example 5: External Music File
Best Practices
Format Requirements
| ||||||||||||||||||||||||
| model | string (Try-On Model) Updated try-on model. If provided, triggers regeneration. Available values: 'SeedreamTryOn', 'NanoBananaProTryOn', 'FashnTryOn', 'ViduTryOn', 'KlingTryOn'. | ||||||||||||||||||||||||
| aspect_ratio | string (Aspect Ratio) Updated video aspect ratio. If provided, triggers regeneration. Available values: '16:9', '4:3', '1:1', '3:4', '9:16'. | ||||||||||||||||||||||||
| webhook_url | string (Webhook URL) Updated webhook URL for completion notifications. Does not trigger regeneration. Your endpoint must respond with a 2xx status code within 10 seconds. |
Media Object
Bad Request
Insufficient Credit
Not Found
Validation Error
{- "data": {
- "id": "xyz789-abc123-def456",
- "title": "Product Showcase",
- "description": "Animated product video",
- "rating": "5",
- "customer_id": "customer123",
- "batch_id": "batch456",
- "is_transition": "No",
- "duration_time": "5.0",
- "progress_percentage": 100,
- "processing_status": "success",
- "visibility_status": "1",
- "file_map": [
- {
- "FileType": "Texture",
- "FileName": "uploaded_file1.png"
}
], - "submit_params": {
- "native_audio": true,
- "pipeline_preset": "Fast",
- "file_size": "",
- "scale_factor": "1"
}, - "pose_preset": {
- "MotionType": "Auto",
- "Params": "Prompt=|CameraPath=|Quantity=1|MotionAmount=5|MotionLength=5|Loop=1|AspectRatio=16:9"
}, - "bullet_version": "1",
- "video_history": [
- {
- "pose_preset": {
- "MotionType": "Auto",
- "Params": "Prompt=|CameraPath=|Quantity=1|MotionAmount=5|MotionLength=5|Loop=1|AspectRatio=16:9"
}, - "file_map": [
- {
- "FileType": "Texture",
- "FileName": "uploaded_file1.png"
}
], - "service_name": "RunwayML",
- "service_seeds": [
- 6305
], - "created_at": "2025-04-01 13:20:36.607637+00:00",
- "service_version": "gen3a_turbo:2024-11-06",
- "bullet_version": "1",
- "resolution": [
- 1280,
- 704
], - "submit_params": {
- "native_audio": true,
- "pipeline_preset": "Fast",
- "file_size": "",
- "scale_factor": "1"
}
}
], - "result": [ ],
- "nsfw": "0",
- "service_name": "RunwayML",
- "service_version": "gen3a_turbo:2024-11-06",
- "created_at": "2025-04-01 13:19:10.786297+00:00",
- "updated_at": "2025-04-01 13:20:37.032634+00:00",
- "version": "2"
}
}Downloads file from media.
This code shows an example of how to download Bullet Video from Auto motion.
import requests
url = "https://api.vimmerse.net/media/{MEDIA_ID}/download?object_type=bullet_video_mp4&motion_type=Auto"
headers = {
'X-Api-Key': 'YOUR_API_KEY'
}
response = requests.request("GET", url, headers=headers)
print(response.text)
This code shows an example of how to download Bullet Video with custom settings
import requests
url = "https://api.vimmerse.net/media/{MEDIA_ID}/download?object_type=bullet_video_mp4&motion_type=Auto&width=1080&file_size=4"
headers = {
'X-Api-Key': 'YOUR_API_KEY'
}
response = requests.request("GET", url, headers=headers)
print(response.text)
Return bullet video, gif or source files.
Bad Request
Validation Error
nullResubmits a media object for video generation using existing parameters.
⚠️ Important: This endpoint consumes credits each time it's called, even if the media was previously processed successfully.
The endpoint uses the existing media configuration (prompt, motion_type, duration, etc.) and resubmits it for processing. All parameters from the original media creation are preserved.
import requests
BASE_URL = "https://api.vimmerse.net"
MEDIA_ID = "your-media-id-here"
url = f"{BASE_URL}/media/{MEDIA_ID}/process"
headers = {"X-Api-Key": "YOUR_API_KEY"}
try:
# Send POST request with empty body
response = requests.post(url, headers=headers, timeout=60)
response.raise_for_status()
result = response.json()
print("Media resubmitted successfully")
except requests.exceptions.HTTPError as e:
if e.response.status_code == 402:
print("Insufficient credits for resubmission")
elif e.response.status_code == 404:
print("Media not found")
else:
print(f"HTTP Error: {e}")
except requests.exceptions.RequestException as e:
print(f"Error: {e}")
400 - Bad Request. Media not found or invalid state.402 - Payment Required. Insufficient credits.404 - Not Found. Media not found or access denied.500 - Internal Server Error. Please retry or contact support.Media Object
Bad Request
Insufficient Credit
Not Found
Validation Error
{- "data": { }
}