Media

APIs for create media and get detailed information.

Here are the steps to get a new media generated from your image.

1. Create a new Media

Send a POST request to create a new media. This will return newly created media information. The request should include your API key.

import requests

url = "https://api.vimmerse.net/media"

payload = {
  'title': 'New Media example with image upload',
  'prompt': 'Generate a video that make your idea to life.',
  'sound_effects': 'Yes'
}

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

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

print(response.text)

2. Get Media Processing Status

Send a GET request to get your media processing status.

import requests

url = "https://api.vimmerse.net/media/{MEDIA_ID}/processing-status"

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

response = requests.request("GET", url, headers=headers)

print(response.text)

3. Get Media Detail

Send a GET request to get your media detail.

import requests

url = "https://api.vimmerse.net/media/{MEDIA_ID}"

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

response = requests.request("GET", url, headers=headers)

print(response.text)

Here are API details and examples of Media API.

Media Webhook

By providing us a webhook endpoint you get notified when the request is done as opposed to polling it. You can set webhook URL by giving webhook_url params on Create and Update media.

You will get a response with the customer_id and media_id and status:

{
    "customer_id": "YOUR_CUSTOMER_ID",
    "media_id": "YOUR_NEW_MEDIA_ID",
    "status": "success"
}

Once you get request from webhook, you can use Get Media API to find result videos.

Create Media

This API creates a new media from your image files, image URLs or text prompt. If you upload 2 images or submit with 2 image URLs, those 2 files are considered as start and end frame of the video. If you upload only 1 file or give 1 image URL, a new video will be generated from uploaded image. If you don't upload or give any image, a new video will be generated from the prompt.

Send a POST request to create a new media. This will return newly created media information. The request should include your API key.

Here are examples of how to create a media with each types of data.

Example Code

Create a new Media with two image files.

import requests

url = "https://api.vimmerse.net/media"

payload = {
  'title': 'New Media example with Two images upload'
}

files=[
  ('image_files',('start_frame.png',open('path/to/your/start_frame.png','rb'),'image/png')),
  ('image_files',('end_frame.png',open('path/to/your/end_frame.png','rb'),'image/png')), ## if you omit this line, a new video is generated by referencing only start_frame.png
]
headers = {
  'X-Api-Key': 'YOUR_API_KEY'
}

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

print(response.text)

Create a new Media with image URLs and motion type.

import requests

url = "https://api.vimmerse.net/media"

payload = {
  'title': 'New Media example with 2 image URLs, generate 2 video with motion type.',
  'image_urls': [
      'https://example.com/path/to/your/start_frame.png',
      'https://example.com/path/to/your/end_frame.png',
    ],
  'motion_type': 'KlingAI',
  'quantity': 2
}

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

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

print(response.text)

Create a new Media with text prompt and add sound effect.

import requests

url = "https://api.vimmerse.net/media"

payload = {
  'title': 'New Media example with text prompt and sound effects.',
  'prompt': "Generate a video that bunny jumps into the forest.",
  'sound_effects': 'Yes'
}

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
title
string (Title)
Default: ""
description
string (Description)
Default: ""
visibility_status
string (Visibility Status)
Default: "1"

Visibility Status:

Number Status
0 Private
1 Unlisted
2 Public
image_files
Array of strings <binary> (Image Files)
Default: []

Images to upload. If you upload a single image, an auto motion video will be created from that image. If you upload two images, the second image will be treated as the final frame of the video, resulting in motion transitions between the two images. The most recently uploaded image will be considered the last frame.

image_urls
Array of strings (Image URLs)
Default: []

If you upload image files, this field will be ignored.

media_items
string (JSON dump of media items.)

To extend your existing video, you can use this field. 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 (Text prompt)
Default: ""

Description to generate video.

motion_type
string (Motion Type)
Default: "Auto"

Defines the type of motion. Available values are: Auto, LumaAI, LumaRay2, KlingAI, Kling2, MinimaxHailuo, Seedance, Hunyuan, RunwayML, Wan, Pixverse, Veo, VeoFast and TryOnVideo.

camera_control
string (Camera Path)
Default: "HorizontalArc"

Defines the camera path of the bullet video.Available values are 'HorizontalArc', 'VerticalArc', 'StepIn', 'Cross', 'Circular', 'StepD', 'StepU', 'StepL' and 'StepR'

quantity
integer (Quantity) [ 1 .. 4 ]
Default: 1
duration
integer (Duration of video) [ 1 .. 10 ]
Default: 5
loop
integer (The number of repetitions of the same motion.) [ 1 .. 6 ]
Default: 1
motion_range
integer (The amount of motion, ranging from 1 to 10. Default value is 5.) [ 1 .. 10 ]
Default: 5
sound_effects
string (Sound Effects)
Default: "No"

Defines if the generated video will include sound effects or not. Available values are: Yes and No(default).

extend_video
string (Extend Video)
Default: "No"

Defines if the uploaded video will be extended or not. Available values are: Yes and No(default).

character_animate
string (Character Animate)
Default: "No"

Defines if the uploaded video will be animated as character animate. Available values are: Yes and No(default).

model
string (Model)

Defines how a video will be animated. Available values are: 'S2V' for Character Animate, 'FashnTryOn' or 'ViduTryOn' or 'KlingTryOn' for TryOnVideo

aspect_ratio
string (Aspect ratio)

Available values are '16:9', '4:3', '1:1', '3:4' and '9:16'

webhook_url
string (Webhook URL)

a 'POST' request will be made to your webhook URL after media is fully generated.

Responses
200

New Media

402

Insufficient Credit

404

Not Found

422

Validation Error

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

Get Media Processing Status

This API retrieves media processing status in percentage.

Send a GET request to get media processing status.

Example Code

Get processing status of the media.

import requests

url = "https://api.vimmerse.net/media/{MEDIA_ID}/processing-status"

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

response = requests.request("GET", url, headers=headers)

print(response.text)
Responses
200

Media progress percentage

404

Not Found

422

Validation Error

get/media/{media_id}/processing-status
Request samples
Response samples
application/json
{
  • "data": {
    }
}

Get Media

This API retrieves a media object.

Send a GET request to get your media.

Example Code

Read Media example.

import requests

url = "http://api.vimmerse.net/media/{MEDIA_ID}"

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

response = requests.request("GET", url, headers=headers)

print(response.text)
SecurityAPIKeyHeader
Responses
200

Media Object

404

Media Not Found

422

Validation Error

get/media/{media_id}
Request samples
Response samples
application/json
{
  • "data": {
    }
}

Update Media

This API updates media and resubmit again if you update any of prompt, motion_type, quantity, duration, loop, aspect_ratio and sound_effects. If media is processed again, it will reduce your credit.

Send a PUT request to update your media. This will return updated media. The request should include your API key.

Example Code

Update Media without resubmitting example

import requests

url = "http://api.vimmerse.net/media/{MEDIA_ID}/edit"

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

payload = {
    'title': 'New Updated Title',
    'rating: '5',
    'visibility_status': '2'
}

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

print(response.text)

Update Media with resubmitting example

import requests

url = "http://api.vimmerse.net/media/{MEDIA_ID}/edit"

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

payload = {
    'title': 'New Updated Title',
    'motion_type: 'RunwayML',
    'duration': 9
}

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

print(response.text)
SecurityAPIKeyHeader
Request
Request Body schema: multipart/form-data
title
string (Title)
description
string (Description)
image_files
Array of strings <binary> (Image Files)
Default: []

Images to upload. If you upload a single image, an auto motion video will be created from that image. If you upload two images, the second image will be treated as the final frame of the video, resulting in motion transitions between the two images. The most recently uploaded image will be considered the last frame.

image_urls
Array of strings (Image URLs)
Default: []

If you upload image files, this field will be ignored.

rating
string (Rating)
visibility_status
string (Visibility Status)

Visibility Status:

Number Status
0 Private
1 Unlisted
2 Public
prompt
string (Text prompt)

Description to generate video.

camera_control
string (Camera Path)

Defines the camera path of the bullet video. Available values are 'HorizontalArc', 'VerticalArc', 'StepIn', 'Cross', 'Circular', 'StepD', 'StepU', 'StepL' and 'StepR'

motion_range
integer (The amount of motion, ranging from 1 to 10. Default value is 5.) [ 1 .. 10 ]
motion_type
string (Motion Type)

Defines the type of motion. Available values are: Auto, LumaAI, LumaRay2, KlingAI, Kling2, MinimaxHailuo, Seedance, Hunyuan, RunwayML, Wan, Pixverse, Veo, VeoFast and TryOnVideo.

quantity
integer (Quantity) [ 1 .. 4 ]
duration
integer (Duration of video) [ 1 .. 10 ]
loop
integer (The number of repetitions of the same motion.) [ 1 .. 6 ]
model
string (Model)

Defines how a video will be animated. Available values are: 'S2V' for Character Animate, 'FashnTryOn' or 'ViduTryOn' or 'KlingTryOn' for TryOnVideo

aspect_ratio
string (Aspect ratio)

Available values are '16:9', '4:3', '1:1', '3:4' and '9:16'

sound_effects
string (Sound Effects)

Defines if the generated video will include sound effects or not. Available values are: Yes and No(default).

extend_video
string (Extend Video)

Defines if the uploaded video will be extended or not. Available values are: Yes and No(default).

webhook_url
string (Webhook URL)

a 'POST' request will be made to your webhook URL after media is generated.

Responses
200

Media Object

400

Bad Request

402

Insufficient Credit

404

Not Found

422

Validation Error

put/media/{media_id}/edit
Request samples
Response samples
application/json
{
  • "data": {
    }
}

Download File

Downloads file from media.

Example Code

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)
SecurityAPIKeyHeader
Responses
200

Return bullet video, gif or source files.

400

Bad Request

422

Validation Error

get/media/{media_id}/download
Request samples
Response samples
null

Process Media

This API resubmit to generate a bullet video.

Example Code

Send a POST request without body to resubmit your media.

import requests

url = "https://api.vimmerse.net/media/{MEDIA_ID}/process"

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

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

print(response.text)
SecurityAPIKeyHeader
Request
Request Body schema: application/json
required
object (Req)
Responses
200

Media Object

400

Bad Request

402

Insufficient Credit

404

Not Found

422

Validation Error

post/media/{media_id}/process
Request samples
Response samples
application/json
{
  • "data": { }
}