Documentation Index
Fetch the complete documentation index at: https://docs.viggle.ai/llms.txt
Use this file to discover all available pages before exploring further.
Import pre-made templates from viggle.ai instead of uploading your own videos.
- Video templates — single-person scenes for single-character rendering
- Multi-person templates — tracked segments for multi-character rendering
Finding template IDs
Video templates
Multi-person templates
Single-person scenes from the viggle.ai homepage.Browse templates on viggle.ai
Go to viggle.ai and browse the Hot Picks section. Copy the template ID
Click the copy icon next to the template title. Tracked segments for multi-character rendering.Watch how to use the editor to create a multi-character template:Open Multi-Track
Click Multi-Track in the left sidebar. Switch to Legacy Editor
Click Editor under “Legacy Version” in the top-right. Create or select a template
Click Create for a new template, or select from My Templates. Copy the template ID
Click Copy ID below the video preview.
Importing via the API
Single-person
Multi-person
import requests
API_KEY, BASE = "YOUR_API_KEY", "https://apis.viggle.ai"
headers = {"Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json"}
scene = requests.post(f"{BASE}/api/scenes/import", headers=headers,
json={"template_id": "YOUR_TEMPLATE_ID", "name": "My Imported Scene"}).json()
scene_id = scene["id"]
Render with the imported scene:job = requests.post(f"{BASE}/api/render",
headers={"Authorization": f"Bearer {API_KEY}"},
data={"character_id": "YOUR_CHARACTER_ID", "scene_id": scene_id}).json()
import requests, json
API_KEY, BASE = "YOUR_API_KEY", "https://apis.viggle.ai"
headers = {"Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json"}
scene = requests.post(f"{BASE}/api/scenes/import", headers=headers,
json={"template_id": "YOUR_MULTI_TEMPLATE_ID", "name": "Group Dance"}).json()
scene_id = scene["id"]
for segment in scene["segments"]:
print(f" Person: {segment['uuid']} (type: {segment['type']})")
Map each person to a character, then render:character_mapping = {}
for segment in scene["segments"]:
character_mapping[segment["uuid"]] = "YOUR_CHARACTER_ID"
job = requests.post(f"{BASE}/api/render",
headers={"Authorization": f"Bearer {API_KEY}"},
data={"scene_id": scene_id, "character_mapping": json.dumps(character_mapping)}).json()
Complete example
End-to-end multi-person workflow
import requests, json, time
API_KEY, BASE = "YOUR_API_KEY", "https://apis.viggle.ai"
headers = {"Authorization": f"Bearer {API_KEY}"}
scene = requests.post(f"{BASE}/api/scenes/import",
headers={**headers, "Content-Type": "application/json"},
json={"template_id": "TEMPLATE_ID_FROM_VIGGLE"}).json()
scene_id, segments = scene["id"], scene["segments"]
my_characters = ["char_alice_id", "char_bob_id", "char_carol_id"]
character_mapping = {seg["uuid"]: my_characters[i]
for i, seg in enumerate(segments) if i < len(my_characters)}
job = requests.post(f"{BASE}/api/render", headers=headers, data={
"scene_id": scene_id, "character_mapping": json.dumps(character_mapping),
}).json()
while True:
status = requests.get(f"{BASE}/api/render/{job['job_id']}").json()
if status["status"] == "complete": break
elif status["status"] == "failed": raise Exception(status.get("error_message"))
time.sleep(3)
video = requests.get(status["cdn_url"])
open("output.mp4", "wb").write(video.content)
Tips
Video template vs multi-person template
If segments is empty, it’s a video template — use with character_id. If segments has entries, it’s multi-person — use with character_mapping.
Partial character mapping
You don’t need to map every person. Unmapped people keep their original appearance.
Once imported, scenes are saved to your account and reusable across renders.