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 batch_id
and status
:
{
"customer_id": "YOUR_CUSTOMER_ID",
"batch_id": "YOUR_BATCH_ID",
"status": "success"
}
Once you get request from webhook, you can use Get Batch Detail API to retrieve batch details.
This API creates a new Batch object and process all given images.
Send a POST request to create a new Batch.
Create a new Batch with uploading image files.
import requests
url = "https://api.vimmerse.net/batch"
payload = {
'title': 'New batch example with uploading 4 images.',
'sound_effects': 'Yes',
'motion_type': 'KlingAI'
}
files=[
('image_files',('image1.png',open('path/to/your/image1.png','rb'),'image/png')),
('image_files',('image2.png',open('path/to/your/image2.png','rb'),'image/png')),
('image_files',('image3.png',open('path/to/your/image3.png','rb'),'image/png')),
('image_files',('image4.png',open('path/to/your/image4.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)
Create a new Batch with image URLs
import requests
url = "https://api.vimmerse.net/batch"
payload = {
'title': 'New batch example with image URLs.',
'aspect_ratio': '9:16',
'image_urls': [
"https://media.vimmerse.net/image/url/1.jpg",
"https://media.vimmerse.net/image/url/2.jpg",
"https://media.vimmerse.net/image/url/3.jpg",
"https://media.vimmerse.net/image/url/4.jpg",
]
}
headers = {
'X-Api-Key': 'YOUR_API_KEY'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
New Batch Object
Bad Request
Insufficient Credit
Validation Error
{- "data": {
- "id": "BATCH_ID",
- "email": "",
- "manager_id": "user_id",
- "customer_id": "customer_id",
- "title": "New Batch Example",
- "description": "",
- "visibility_status": "1",
- "idea": "",
- "storyboard": { },
- "scenes": [ ],
- "message": "",
- "note": "",
- "feedback": "",
- "is_transition": "No",
- "filenames": [ ],
- "files": [ ],
- "medias": [
- {
- "media_id": "media_id",
- "item": "item_key"
}, - {
- "media_id": "media_id",
- "item": "item_key"
}
], - "upload_urls": { },
- "finished_medias": [ ],
- "failed_medias": [ ],
- "pose_preset": [
- {
- "MotionType": "Auto",
- "Params": "Prompt=|CameraPath=|Quantity=1|MotionAmount=5|MotionLength=5|Loop=1"
}
], - "submit_params": {
- "scale_factor": "1",
- "pipeline_preset": "Fast",
- "file_size": "",
- "sound_effects": "Yes"
}, - "progress_percentage": 0,
- "status": "processing",
- "generate_type": "GENERATE_VIDEO",
- "version": "2",
- "created_at": "2025-04-02 16:21:42.465259+00:00",
- "updated_at": "2025-04-02 16:21:42.465259+00:00"
}
}
This API retrieves a Batch object.
status
field shows current progressing status of this Batch.
if Batch is finished, you can get composed video from video_url
.
Get a new Batch example
import requests
url = "http://api.vimmerse.net/batch/{BATCH_ID}"
headers = {
'X-Api-Key': 'YOUR_API_KEY'
}
response = requests.request("GET", url, headers=headers)
print(response.text)
Batch Object
Bad Request
Insufficient Credit
Not Found
Validation Error
{- "data": {
- "id": "BATCH_ID",
- "email": "",
- "manager_id": "user_id",
- "customer_id": "customer_id",
- "title": "New Batch Example",
- "description": "",
- "visibility_status": "1",
- "idea": "",
- "storyboard": { },
- "scenes": [ ],
- "message": "",
- "note": "",
- "feedback": "",
- "is_transition": "No",
- "filenames": [ ],
- "files": [ ],
- "medias": [
- {
- "media_id": "media_id",
- "item": "item_key"
}, - {
- "media_id": "media_id",
- "item": "item_key"
}
], - "upload_urls": { },
- "finished_medias": [ ],
- "failed_medias": [ ],
- "pose_preset": [
- {
- "MotionType": "Auto",
- "Params": "Prompt=|CameraPath=|Quantity=1|MotionAmount=5|MotionLength=5|Loop=1"
}
], - "submit_params": {
- "scale_factor": "1",
- "pipeline_preset": "Fast",
- "file_size": "",
- "sound_effects": "Yes"
}, - "progress_percentage": 0,
- "status": "processing",
- "generate_type": "GENERATE_VIDEO",
- "version": "2",
- "created_at": "2025-04-02 16:21:42.465259+00:00",
- "updated_at": "2025-04-02 16:21:42.465259+00:00"
}
}
This API updates batch and resubmit again if you update any of prompt
, motion_type
, quantity
, duration
, loop
, aspect_ratio
and sound_effects
.
If batch is processed again, it will reduce your credit.
Send a PUT request to update your batch. This will return updated batch. The request should include your API key.
Update Batch without resubmitting example
import requests
url = "http://api.vimmerse.net/batch/{BATCH_ID}/edit"
headers = {
'X-Api-Key': 'YOUR_API_KEY',
}
payload = {
'title': 'New Updated Title',
'description': 'New updated description',
'rating: '5',
'visibility_status': '2'
}
response = requests.request("PUT", url, headers=headers, data=payload)
print(response.text)
Update Batch with resubmitting example
import requests
url = "http://api.vimmerse.net/batch/{BATCH_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)
Batch Object
Bad Request
Insufficient Credit
Not Found
Validation Error
{- "data": {
- "id": "BATCH_ID",
- "email": "",
- "manager_id": "user_id",
- "customer_id": "customer_id",
- "title": "New Batch Example",
- "description": "",
- "visibility_status": "1",
- "idea": "",
- "storyboard": { },
- "scenes": [ ],
- "message": "",
- "note": "",
- "feedback": "",
- "is_transition": "No",
- "filenames": [ ],
- "files": [ ],
- "medias": [
- {
- "media_id": "media_id",
- "item": "item_key"
}, - {
- "media_id": "media_id",
- "item": "item_key"
}
], - "upload_urls": { },
- "finished_medias": [ ],
- "failed_medias": [ ],
- "pose_preset": [
- {
- "MotionType": "Auto",
- "Params": "Prompt=|CameraPath=|Quantity=1|MotionAmount=5|MotionLength=5|Loop=1"
}
], - "submit_params": {
- "scale_factor": "1",
- "pipeline_preset": "Fast",
- "file_size": "",
- "sound_effects": "Yes"
}, - "progress_percentage": 0,
- "status": "processing",
- "generate_type": "GENERATE_VIDEO",
- "version": "2",
- "created_at": "2025-04-02 16:21:42.465259+00:00",
- "updated_at": "2025-04-02 16:21:42.465259+00:00"
}
}
This API requests to compose all videos from batch. You can get composed video from video_url
after videos are composed.
Send a POST request with empty body.
import requests
url = "http://api.vimmerse.net/batch/{BATCH_ID}/concat"
headers = {
'X-Api-Key': 'YOUR_API_KEY',
}
response = requests.request("POST", url, headers=headers)
print(response.text)
Batch Object
Bad Request
Insufficient Credit
Not Found
Validation Error
{ }