Create Animation
curl --request POST \
--url https://apis.viggle.ai/v1/animations \
--header 'Authorization: Bearer <token>'import requests
url = "https://apis.viggle.ai/v1/animations"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://apis.viggle.ai/v1/animations', 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/v1/animations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://apis.viggle.ai/v1/animations"
req, _ := http.NewRequest("POST", url, nil)
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/v1/animations")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apis.viggle.ai/v1/animations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body3D Conversion
Create Animation
Create an asynchronous video-to-3D animation conversion.
POST
/
v1
/
animations
Create Animation
curl --request POST \
--url https://apis.viggle.ai/v1/animations \
--header 'Authorization: Bearer <token>'import requests
url = "https://apis.viggle.ai/v1/animations"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://apis.viggle.ai/v1/animations', 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/v1/animations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://apis.viggle.ai/v1/animations"
req, _ := http.NewRequest("POST", url, nil)
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/v1/animations")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apis.viggle.ai/v1/animations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyPOST /v1/animations starts a 3D Animation conversion. This is a conversion operation, not a reusable Motion asset.
Request parameters
Sendmultipart/form-data.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
video | file | Yes | — | Motion-source video used to generate the 3D animation. |
Response parameters
Returns200 OK with a conversion object.
| Field | Type | Always present | Description |
|---|---|---|---|
id | string | Yes | Public Animation ID beginning with anim_. |
status | string | Yes | queued, processing, ready, or failed. |
model_url | string or null | Yes | Downloadable 3D result when ready. |
created_at | string or null | Yes | ISO 8601 creation timestamp when available. |
updated_at | string or null | Yes | ISO 8601 most-recent update timestamp when available. |
error | object or null | Yes | Structured failure details when status is failed. |
{"id":"anim_456def","status":"queued","model_url":null,"created_at":null,"updated_at":null,"error":null}
Examples
file, err := os.Open("dance.mp4")
if err != nil { panic(err) }
defer file.Close()
body := &bytes.Buffer{}
writer := multipart.NewWriter(body)
part, _ := writer.CreateFormFile("video", "dance.mp4")
io.Copy(part, file)
writer.Close()
req, _ := http.NewRequest("POST", "https://apis.viggle.ai/v1/animations", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("VIGGLE_API_KEY"))
req.Header.Set("Content-Type", writer.FormDataContentType())
resp, err := http.DefaultClient.Do(req)
if err != nil { panic(err) }
defer resp.Body.Close()
const form=new FormData(); form.append("video",videoFile); const response=await fetch("https://apis.viggle.ai/v1/animations",{method:"POST",headers:{Authorization:`Bearer ${process.env.VIGGLE_API_KEY}`},body:form}); const animation=await response.json();
import os, requests
with open("dance.mp4","rb") as video: response=requests.post("https://apis.viggle.ai/v1/animations",headers={"Authorization":f"Bearer {os.environ['VIGGLE_API_KEY']}"},files={"video":video})
response.raise_for_status(); animation=response.json()
curl -X POST "https://apis.viggle.ai/v1/animations" -H "Authorization: Bearer $VIGGLE_API_KEY" -F "[email protected]"
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Response
200
Animation
⌘I

