curl --request POST \
--url https://apis.viggle.ai/v1/motions/import \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"template_id": "<string>",
"template_uuid": "<string>",
"name": "<string>",
"model": "V3_Preview"
}
'import requests
url = "https://apis.viggle.ai/v1/motions/import"
payload = {
"template_id": "<string>",
"template_uuid": "<string>",
"name": "<string>",
"model": "V3_Preview"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
template_id: '<string>',
template_uuid: '<string>',
name: '<string>',
model: 'V3_Preview'
})
};
fetch('https://apis.viggle.ai/v1/motions/import', 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/motions/import",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'template_id' => '<string>',
'template_uuid' => '<string>',
'name' => '<string>',
'model' => 'V3_Preview'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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/v1/motions/import"
payload := strings.NewReader("{\n \"template_id\": \"<string>\",\n \"template_uuid\": \"<string>\",\n \"name\": \"<string>\",\n \"model\": \"V3_Preview\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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/motions/import")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"template_id\": \"<string>\",\n \"template_uuid\": \"<string>\",\n \"name\": \"<string>\",\n \"model\": \"V3_Preview\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apis.viggle.ai/v1/motions/import")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"template_id\": \"<string>\",\n \"template_uuid\": \"<string>\",\n \"name\": \"<string>\",\n \"model\": \"V3_Preview\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"status": "queued",
"name": "<string>",
"progress": 50,
"capabilities": [
"<string>"
],
"created_at": "<string>",
"completed_at": "<string>",
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
},
"type": "render",
"vsplat": {
"status": "queued",
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
},
"glb": {
"status": "queued",
"skeletons": [
"mixamo"
],
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}
}{
"error": {
"code": "authentication_required",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "authentication_required",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "authentication_required",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "authentication_required",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "authentication_required",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "authentication_required",
"message": "<string>",
"request_id": "<string>"
}
}导入动作
从 Viggle 官方动作模板创建可复用动作。
curl --request POST \
--url https://apis.viggle.ai/v1/motions/import \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"template_id": "<string>",
"template_uuid": "<string>",
"name": "<string>",
"model": "V3_Preview"
}
'import requests
url = "https://apis.viggle.ai/v1/motions/import"
payload = {
"template_id": "<string>",
"template_uuid": "<string>",
"name": "<string>",
"model": "V3_Preview"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
template_id: '<string>',
template_uuid: '<string>',
name: '<string>',
model: 'V3_Preview'
})
};
fetch('https://apis.viggle.ai/v1/motions/import', 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/motions/import",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'template_id' => '<string>',
'template_uuid' => '<string>',
'name' => '<string>',
'model' => 'V3_Preview'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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/v1/motions/import"
payload := strings.NewReader("{\n \"template_id\": \"<string>\",\n \"template_uuid\": \"<string>\",\n \"name\": \"<string>\",\n \"model\": \"V3_Preview\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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/motions/import")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"template_id\": \"<string>\",\n \"template_uuid\": \"<string>\",\n \"name\": \"<string>\",\n \"model\": \"V3_Preview\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apis.viggle.ai/v1/motions/import")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"template_id\": \"<string>\",\n \"template_uuid\": \"<string>\",\n \"name\": \"<string>\",\n \"model\": \"V3_Preview\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"status": "queued",
"name": "<string>",
"progress": 50,
"capabilities": [
"<string>"
],
"created_at": "<string>",
"completed_at": "<string>",
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
},
"type": "render",
"vsplat": {
"status": "queued",
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
},
"glb": {
"status": "queued",
"skeletons": [
"mixamo"
],
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}
}{
"error": {
"code": "authentication_required",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "authentication_required",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "authentication_required",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "authentication_required",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "authentication_required",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "authentication_required",
"message": "<string>",
"request_id": "<string>"
}
}template_id 指定的官方模板复制为当前调用者拥有的动作素材。
请求参数
使用 JSON 请求体。| 参数 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
template_id | string | 二选一 | — | 要复制的 Viggle 官方动作模板 ID,新接入推荐使用。与 template_uuid 二选一。 |
template_uuid | string | 二选一 | — | template_id 的向后兼容别名,不要同时传入两个字段。 |
name | string | 否 | Imported: 加模板 ID 的前 8 个字符 | 导入动作的可选名称。省略时根据模板 ID 自动生成。 |
model | string | 否 | V3_Preview | 关联的渲染模型:V3_Preview 或 V4_BaseSG。兼容旧别名 V4_Preview,其等同于 V4_BaseSG。 |
template_id,未知字段会被忽略。
响应参数
返回200 OK。此响应只有 id 和 status 提供有效信息;name 和 created_at 请通过获取动作读取。完整 Motion 字段定义见创建动作。
{"id":"mot_550e8400-e29b-41d4-a716-446655440000","status":"queued","name":"","progress":0,"capabilities":[],"created_at":null,"completed_at":null,"error":null,"type":"render","vsplat":null,"glb":null}
示例
payload := strings.NewReader(`{"template_id":"YOUR_TEMPLATE_ID","name":"Campaign dance"}`)
req, _ := http.NewRequest("POST", "https://apis.viggle.ai/v1/motions/import", payload)
req.Header.Set("Authorization", "Bearer "+os.Getenv("VIGGLE_API_KEY")); req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req); if err != nil { panic(err) }; defer resp.Body.Close()
const response = await fetch("https://apis.viggle.ai/v1/motions/import", {method:"POST", headers:{Authorization:`Bearer ${process.env.VIGGLE_API_KEY}`,"Content-Type":"application/json"}, body:JSON.stringify({template_id:"YOUR_TEMPLATE_ID",name:"Campaign dance"})});
const motion = await response.json();
import os, requests
response = requests.post("https://apis.viggle.ai/v1/motions/import", headers={"Authorization":f"Bearer {os.environ['VIGGLE_API_KEY']}"}, json={"template_id":"YOUR_TEMPLATE_ID","name":"Campaign dance"})
response.raise_for_status(); motion = response.json()
curl -X POST "https://apis.viggle.ai/v1/motions/import" -H "Authorization: Bearer $VIGGLE_API_KEY" -H "Content-Type: application/json" -d '{"template_id":"YOUR_TEMPLATE_ID","name":"Campaign dance"}'
Authorizations
服务端 SDK 使用项目 API 密钥,Remote MCP 使用 OAuth 访问令牌。不要在浏览器代码中暴露项目密钥。
Headers
可选的调用者自定义关联 ID,最长 128 字符。服务会在响应头返回实际使用的值,便于追踪和支持排查。
1 - 128可选来源标签,最长 128 字符,用于识别 SDK、集成、产品入口或内部工作流。
1 - 128Body
- Option 1
- Option 2
template_uuid 是 template_id 的兼容别名,二选一,未知属性忽略。按模板时长 1 积分/秒计费,最低 1 积分。
要复制的 Viggle 官方动作模板 ID,新接入推荐使用。与 template_uuid 二选一。
1template_id 的向后兼容别名,不要同时传入两个字段。
1导入动作的可选名称。省略时根据模板 ID 自动生成。
关联的渲染模型:V3_Preview 或 V4_BaseSG。兼容旧别名 V4_Preview,其等同于 V4_BaseSG。
V3_Preview, V4_BaseSG, V4_Preview Response
请求成功。
角色和动作共用的资源结构。列表中的 progress 为 null,顶层 error 当前始终为 null,失败请检查 status。角色 type 为 render、vsplat、all,动作为 render、glb、all,旧资源默认报告 render。vsplat/glb 仅包含提取状态,下载链接通过角色或动作的 /export 获取。未请求提取时对应字段为 null。all 需等 2D 与 3D 均就绪才为 ready;任一失败则顶层 failed,子对象状态可用于定位。
素材公开 ID。角色通常以 char_ 开头,动作通常以 mot_ 开头。
1素材整体生命周期。所需能力就绪后才能用于渲染或导出。
queued, processing, ready, failed, cancelled 创建时提供或导入时生成的显示名称;不支持名称的流程可能返回空字符串。
详情中尽可能提供 0–100 的处理百分比,列表中或不可用时为 null。
0 <= x <= 100素材具备的能力。就绪且可渲染时包含 video_render。
带 UTC 偏移的 ISO 8601 时间,例如 2026-07-31T09:15:22+00:00。
所有请求处理进入终态时的 ISO 8601 时间,带 UTC 偏移;处理中为 null。
保留的顶层错误详情,目前始终为 null。通过 status 判断失败,并在适用时检查提取子对象。
Show child attributes
Show child attributes
创建时请求的输出。render 为可渲染的 2D 素材,vsplat/glb 为 3D 输出,all 同时请求两种支持的输出。
render, vsplat, glb, all 角色 vsplat 提取状态。动作及 type=render 的角色为 null。这里只返回状态,不回显 model_precision 等创建参数。
Show child attributes
Show child attributes
动作 3D 动画提取或生成状态。角色及 type=render 的动作为 null。
Show child attributes
Show child attributes

