Crear grupo de activos de material Seedance
curl --request POST \
--url https://api.tokenlab.sh/v1/videos/assets/groups \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"library_type": "aigc_avatar",
"group_name": "Product references",
"description": "Tomas de producto reutilizables"
}
'import requests
url = "https://api.tokenlab.sh/v1/videos/assets/groups"
payload = {
"library_type": "aigc_avatar",
"group_name": "Product references",
"description": "Tomas de producto reutilizables"
}
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({
library_type: 'aigc_avatar',
group_name: 'Product references',
description: 'Tomas de producto reutilizables'
})
};
fetch('https://api.tokenlab.sh/v1/videos/assets/groups', 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://api.tokenlab.sh/v1/videos/assets/groups",
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([
'library_type' => 'aigc_avatar',
'group_name' => 'Product references',
'description' => 'Tomas de producto reutilizables'
]),
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://api.tokenlab.sh/v1/videos/assets/groups"
payload := strings.NewReader("{\n \"library_type\": \"aigc_avatar\",\n \"group_name\": \"Product references\",\n \"description\": \"Tomas de producto reutilizables\"\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://api.tokenlab.sh/v1/videos/assets/groups")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"library_type\": \"aigc_avatar\",\n \"group_name\": \"Product references\",\n \"description\": \"Tomas de producto reutilizables\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tokenlab.sh/v1/videos/assets/groups")
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 \"library_type\": \"aigc_avatar\",\n \"group_name\": \"Product references\",\n \"description\": \"Tomas de producto reutilizables\"\n}"
response = http.request(request)
puts response.read_body{
"id": "group-20260720123456-vrt01",
"object": "seedance.material_asset_group",
"library_type": "aigc_avatar",
"group_name": "Product references",
"description": "Tomas de producto reutilizables",
"status": "ACTIVE",
"metadata": null,
"created_at": 1782998400000
}{
"error": {
"message": "model: Model is required",
"type": "invalid_request_error",
"param": "model"
},
"validation_errors": [
{
"field": "model",
"message": "Model is required"
}
]
}{
"error": {
"message": "Invalid API key provided",
"type": "invalid_api_key"
}
}{
"error": {
"message": "<string>",
"type": "unauthorized",
"code": "<string>",
"param": "<string>",
"model": "<string>",
"did_you_mean": "<string>",
"suggestions": [
{
"id": "<string>"
}
],
"alternatives": [
{
"id": "<string>",
"status": "<string>",
"tags": [
"<string>"
]
}
],
"hint": "<string>",
"retry_after": 123,
"retryable": true,
"balance_usd": 123,
"estimated_cost_usd": 123,
"supported_operations": [
"<string>"
],
"supported_parameters": [
"<string>"
],
"required_selectors": [
"<string>"
],
"optional_selectors": [
"<string>"
],
"allowed_resolutions": [
"<string>"
],
"allowed_durations": [
"<string>"
],
"allowed_aspect_ratios": [
"<string>"
],
"prompt_max_characters": 123,
"recommended_request": {},
"request_endpoint": "<string>",
"request_shape_mode": "<string>",
"status_mode": "<string>",
"request_id": "<string>"
}
}{
"error": {
"message": "An internal error occurred",
"type": "server_error"
}
}{
"error": {
"message": "Seedance material library request failed",
"type": "server_error",
"code": "seedance_material_library_request_failed"
}
}Video y recursos
Crear grupo de activos de material
Crea un grupo de material de avatar virtual de Seedance.
POST
/
v1
/
videos
/
assets
/
groups
Crear grupo de activos de material Seedance
curl --request POST \
--url https://api.tokenlab.sh/v1/videos/assets/groups \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"library_type": "aigc_avatar",
"group_name": "Product references",
"description": "Tomas de producto reutilizables"
}
'import requests
url = "https://api.tokenlab.sh/v1/videos/assets/groups"
payload = {
"library_type": "aigc_avatar",
"group_name": "Product references",
"description": "Tomas de producto reutilizables"
}
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({
library_type: 'aigc_avatar',
group_name: 'Product references',
description: 'Tomas de producto reutilizables'
})
};
fetch('https://api.tokenlab.sh/v1/videos/assets/groups', 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://api.tokenlab.sh/v1/videos/assets/groups",
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([
'library_type' => 'aigc_avatar',
'group_name' => 'Product references',
'description' => 'Tomas de producto reutilizables'
]),
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://api.tokenlab.sh/v1/videos/assets/groups"
payload := strings.NewReader("{\n \"library_type\": \"aigc_avatar\",\n \"group_name\": \"Product references\",\n \"description\": \"Tomas de producto reutilizables\"\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://api.tokenlab.sh/v1/videos/assets/groups")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"library_type\": \"aigc_avatar\",\n \"group_name\": \"Product references\",\n \"description\": \"Tomas de producto reutilizables\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tokenlab.sh/v1/videos/assets/groups")
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 \"library_type\": \"aigc_avatar\",\n \"group_name\": \"Product references\",\n \"description\": \"Tomas de producto reutilizables\"\n}"
response = http.request(request)
puts response.read_body{
"id": "group-20260720123456-vrt01",
"object": "seedance.material_asset_group",
"library_type": "aigc_avatar",
"group_name": "Product references",
"description": "Tomas de producto reutilizables",
"status": "ACTIVE",
"metadata": null,
"created_at": 1782998400000
}{
"error": {
"message": "model: Model is required",
"type": "invalid_request_error",
"param": "model"
},
"validation_errors": [
{
"field": "model",
"message": "Model is required"
}
]
}{
"error": {
"message": "Invalid API key provided",
"type": "invalid_api_key"
}
}{
"error": {
"message": "<string>",
"type": "unauthorized",
"code": "<string>",
"param": "<string>",
"model": "<string>",
"did_you_mean": "<string>",
"suggestions": [
{
"id": "<string>"
}
],
"alternatives": [
{
"id": "<string>",
"status": "<string>",
"tags": [
"<string>"
]
}
],
"hint": "<string>",
"retry_after": 123,
"retryable": true,
"balance_usd": 123,
"estimated_cost_usd": 123,
"supported_operations": [
"<string>"
],
"supported_parameters": [
"<string>"
],
"required_selectors": [
"<string>"
],
"optional_selectors": [
"<string>"
],
"allowed_resolutions": [
"<string>"
],
"allowed_durations": [
"<string>"
],
"allowed_aspect_ratios": [
"<string>"
],
"prompt_max_characters": 123,
"recommended_request": {},
"request_endpoint": "<string>",
"request_shape_mode": "<string>",
"status_mode": "<string>",
"request_id": "<string>"
}
}{
"error": {
"message": "An internal error occurred",
"type": "server_error"
}
}{
"error": {
"message": "Seedance material library request failed",
"type": "server_error",
"code": "seedance_material_library_request_failed"
}
}Cree un grupo de material con
library_type: "aigc_avatar". Utilice este endpoint para avatares virtuales, productos, estilos y otras referencias reutilizables que no requieran verificación de persona real.
Los nuevos grupos de material de personas reales se crean a través de la Crear sesión de validación visual y no pueden crearse directamente con este endpoint.
project_name aísla recursos dentro de la organización autenticada. El valor predeterminado es default; use el mismo valor, respetando mayúsculas y minúsculas, para los grupos y activos relacionados. Envíelo en el cuerpo JSON para POST/PUT y en la consulta para GET/DELETE.
Ejemplo de solicitud
curl https://api.tokenlab.sh/v1/videos/assets/groups \
-H "Authorization: Bearer $TOKENLAB_API_KEY" \
-H "Content-Type: application/json" \
-d '{"library_type":"aigc_avatar","group_name":"Product references","description":"Reusable product shots","project_name":"default"}'
Ejemplo de respuesta
{
"id": "group-20260720123456-vrt01",
"object": "seedance.material_asset_group",
"project_name": "default",
"library_type": "aigc_avatar",
"group_name": "Product references",
"description": "Reusable product shots",
"status": "ACTIVE",
"metadata": null,
"created_at": 1782998400000
}
Autorizaciones
Autenticación con API Key. Cree o gestione API keys en Dashboard > API > API Keys.
Cuerpo
application/json
Nombre para mostrar opcional para el grupo de material.
Required string length:
1 - 128Maximum string length:
500Clase de biblioteca de materiales. La creación directa admite aigc_avatar. Cree grupos liveness_face a través de CreateVisualValidateSession seguido de GetVisualValidateResult.
Opciones disponibles:
aigc_avatar, liveness_face Alcance del proyecto para el grupo de material.
Required string length:
1 - 128Respuesta
Grupo de activos de material creado
ID del grupo de material de TokenLab. Úselo como group_id al cargar materiales.
Opciones disponibles:
seedance.material_asset_group Opciones disponibles:
aigc_avatar, liveness_face Alcance del proyecto para este grupo de material.