Create Scene
curl --request POST \
--url https://apis.viggle.ai/api/scenes/preprocess \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Dance Sequence' \
--form video='@example-file'import requests
url = "https://apis.viggle.ai/api/scenes/preprocess"
files = { "video": ("example-file", open("example-file", "rb")) }
payload = { "name": "Dance Sequence" }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('name', 'Dance Sequence');
form.append('video', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://apis.viggle.ai/api/scenes/preprocess', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apis.viggle.ai/api/scenes/preprocess",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\nDance Sequence\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"video\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://apis.viggle.ai/api/scenes/preprocess"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\nDance Sequence\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"video\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://apis.viggle.ai/api/scenes/preprocess")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\nDance Sequence\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"video\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://apis.viggle.ai/api/scenes/preprocess")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\nDance Sequence\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"video\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"id": "660e8400-e29b-41d4-a716-446655440000",
"job_id": "scene_660e8400e29b",
"status": "pending",
"credits_reserved": 0,
"message": "Scene preprocessing initiated (6.7s video, 7 chunks). Check status for updates."
}{
"detail": {
"error_code": "CS-UORC01-002",
"message": "Invalid video. Upload an MP4, MOV, AVI, or WebM file within the size and duration limits."
}
}{
"detail": "Invalid or missing API key. Pass it as Authorization: Bearer sk-..."
}{
"detail": {
"error_code": "CS-UORC01-008",
"message": "Insufficient credits. Top up your balance to continue."
}
}Scenes
Create Scene
Upload a driving video to create a reusable scene
POST
/
api
/
scenes
/
preprocess
Create Scene
curl --request POST \
--url https://apis.viggle.ai/api/scenes/preprocess \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Dance Sequence' \
--form video='@example-file'import requests
url = "https://apis.viggle.ai/api/scenes/preprocess"
files = { "video": ("example-file", open("example-file", "rb")) }
payload = { "name": "Dance Sequence" }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('name', 'Dance Sequence');
form.append('video', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://apis.viggle.ai/api/scenes/preprocess', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apis.viggle.ai/api/scenes/preprocess",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\nDance Sequence\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"video\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://apis.viggle.ai/api/scenes/preprocess"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\nDance Sequence\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"video\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://apis.viggle.ai/api/scenes/preprocess")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\nDance Sequence\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"video\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://apis.viggle.ai/api/scenes/preprocess")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\nDance Sequence\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"video\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"id": "660e8400-e29b-41d4-a716-446655440000",
"job_id": "scene_660e8400e29b",
"status": "pending",
"credits_reserved": 0,
"message": "Scene preprocessing initiated (6.7s video, 7 chunks). Check status for updates."
}{
"detail": {
"error_code": "CS-UORC01-002",
"message": "Invalid video. Upload an MP4, MOV, AVI, or WebM file within the size and duration limits."
}
}{
"detail": "Invalid or missing API key. Pass it as Authorization: Bearer sk-..."
}{
"detail": {
"error_code": "CS-UORC01-008",
"message": "Insufficient credits. Top up your balance to continue."
}
}Upload a driving video and we’ll turn it into a reusable scene — it captures the motion you can then apply to any character. Creating a scene is free; you only spend credits when you render.
Video limits: Maximum 10 minutes duration and 100 MB file size.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
video | file | ✅ | Driving video (MP4, MOV, AVI, WebM). Max 10 min / 100 MB. |
name | string | ✅ | Display name for the scene. |
Response
{
"id": "660e8400-e29b-41d4-a716-446655440000",
"job_id": "scene_660e8400e29b",
"status": "pending",
"credits_reserved": 0,
"message": "Scene preprocessing initiated (6.7s video, 7 chunks). Check status for updates."
}
| Field | Description |
|---|---|
id | Scene UUID. Poll Get Scene with it, then use it as scene_id when rendering. |
status | Starts at pending; preprocessing runs in the background. |
credits_reserved | Always 0 — scene creation is free. Credits are charged at render time. |
Example
import requests
url = "https://apis.viggle.ai/api/scenes/preprocess"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
}
files = {
"video": ("driving_video.mp4", open("driving_video.mp4", "rb"), "video/mp4"),
}
data = {
"name": "My Scene",
}
response = requests.post(url, headers=headers, files=files, data=data)
response.raise_for_status()
result = response.json()
print(f"Scene ID: {result['id']}")
print(f"Status: {result['status']}")
const form = new FormData();
form.append("video", new Blob([await fetch("driving_video.mp4").then(r => r.blob())]), "driving_video.mp4");
form.append("name", "My Scene");
const response = await fetch("https://apis.viggle.ai/api/scenes/preprocess", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
},
body: form,
});
const result = await response.json();
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(`Scene ID: ${result.id}`);
console.log(`Status: ${result.status}`);
curl -X POST https://apis.viggle.ai/api/scenes/preprocess \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "video=@driving_video.mp4" \
-F "name=My Scene"
Next Steps
After creating a scene, poll Get Scene every 5 seconds until the status becomesready. Then you can use it in render jobs.
Don’t have a driving video? You can import a template from viggle.ai instead of uploading your own video. Templates include pre-made scenes ready for rendering.
Authorizations
API key passed as Bearer token
Body
multipart/form-data
Response
Scene creation started
Scene UUID
Example:
"660e8400-e29b-41d4-a716-446655440000"
Example:
"scene_660e8400e29b"
Example:
"pending"
Credits reserved for scene preprocessing (always 0 — scene creation is free)
Example:
0
Example:
"Scene preprocessing initiated (6.7s video, 7 chunks). Check status for updates."
⌘I

