Skip to main content
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

Single-person scenes from the viggle.ai homepage.
1

Browse templates on viggle.ai

Go to viggle.ai and browse the Hot Picks section.
Viggle homepage showing Hot Picks templates
2

Copy the template ID

Click the copy icon next to the template title.
Template detail page with copy ID button

Importing via the API

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()

Complete example

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

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.
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.