curl --request PUT \
--url https://api.tokenlab.sh/v1/videos/assets/{assetId} \
--header 'Content-Type: application/json' \
--data '
{
"asset_name": "Front view approved",
"metadata": {
"approved_by": "creative-team"
}
}
'import requests
url = "https://api.tokenlab.sh/v1/videos/assets/{assetId}"
payload = {
"asset_name": "Front view approved",
"metadata": { "approved_by": "creative-team" }
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({asset_name: 'Front view approved', metadata: {approved_by: 'creative-team'}})
};
fetch('https://api.tokenlab.sh/v1/videos/assets/{assetId}', 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/{assetId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'asset_name' => 'Front view approved',
'metadata' => [
'approved_by' => 'creative-team'
]
]),
CURLOPT_HTTPHEADER => [
"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/{assetId}"
payload := strings.NewReader("{\n \"asset_name\": \"Front view approved\",\n \"metadata\": {\n \"approved_by\": \"creative-team\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
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.put("https://api.tokenlab.sh/v1/videos/assets/{assetId}")
.header("Content-Type", "application/json")
.body("{\n \"asset_name\": \"Front view approved\",\n \"metadata\": {\n \"approved_by\": \"creative-team\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tokenlab.sh/v1/videos/assets/{assetId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"asset_name\": \"Front view approved\",\n \"metadata\": {\n \"approved_by\": \"creative-team\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "asset-20260720123456-qn7wr",
"object": "seedance.material_asset",
"group_id": "group-20260720123456-vrt01",
"library_type": "aigc_avatar",
"asset_name": "Front view approved",
"asset_type": "Image",
"status": "ACTIVE",
"ready": true,
"error_message": null,
"metadata": {
"approved_by": "creative-team"
},
"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": "API key not found",
"type": "invalid_request_error"
}
}{
"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": "Image width must be between 300px and 6000px.",
"type": "invalid_request_error",
"code": "seedance_material_source_invalid",
"param": "asset_url"
}
}{
"error": {
"message": "Seedance material library request failed",
"type": "server_error",
"code": "seedance_material_library_request_failed"
}
}Actualizar activo de material
Actualiza un activo de material de Seedance propiedad de la organización actual.
curl --request PUT \
--url https://api.tokenlab.sh/v1/videos/assets/{assetId} \
--header 'Content-Type: application/json' \
--data '
{
"asset_name": "Front view approved",
"metadata": {
"approved_by": "creative-team"
}
}
'import requests
url = "https://api.tokenlab.sh/v1/videos/assets/{assetId}"
payload = {
"asset_name": "Front view approved",
"metadata": { "approved_by": "creative-team" }
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({asset_name: 'Front view approved', metadata: {approved_by: 'creative-team'}})
};
fetch('https://api.tokenlab.sh/v1/videos/assets/{assetId}', 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/{assetId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'asset_name' => 'Front view approved',
'metadata' => [
'approved_by' => 'creative-team'
]
]),
CURLOPT_HTTPHEADER => [
"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/{assetId}"
payload := strings.NewReader("{\n \"asset_name\": \"Front view approved\",\n \"metadata\": {\n \"approved_by\": \"creative-team\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
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.put("https://api.tokenlab.sh/v1/videos/assets/{assetId}")
.header("Content-Type", "application/json")
.body("{\n \"asset_name\": \"Front view approved\",\n \"metadata\": {\n \"approved_by\": \"creative-team\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tokenlab.sh/v1/videos/assets/{assetId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"asset_name\": \"Front view approved\",\n \"metadata\": {\n \"approved_by\": \"creative-team\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "asset-20260720123456-qn7wr",
"object": "seedance.material_asset",
"group_id": "group-20260720123456-vrt01",
"library_type": "aigc_avatar",
"asset_name": "Front view approved",
"asset_type": "Image",
"status": "ACTIVE",
"ready": true,
"error_message": null,
"metadata": {
"approved_by": "creative-team"
},
"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": "API key not found",
"type": "invalid_request_error"
}
}{
"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": "Image width must be between 300px and 6000px.",
"type": "invalid_request_error",
"code": "seedance_material_source_invalid",
"param": "asset_url"
}
}{
"error": {
"message": "Seedance material library request failed",
"type": "server_error",
"code": "seedance_material_library_request_failed"
}
}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/asset-20260720123456-qn7wr \
-X PUT \
-H "Authorization: Bearer $TOKENLAB_API_KEY" \
-H "Content-Type: application/json" \
-d '{"asset_name":"Front view approved","metadata":{"approved_by":"creative-team"},"project_name":"default"}'
Ejemplo de respuesta
{
"id": "asset-20260720123456-qn7wr",
"object": "seedance.material_asset",
"project_name": "default",
"group_id": "group-20260720123456-vrt01",
"library_type": "aigc_avatar",
"asset_name": "Front view approved",
"asset_type": "Image",
"status": "ACTIVE",
"ready": true,
"error_message": null,
"metadata": {"approved_by": "creative-team"},
"created_at": 1782998400000
}
Parámetros de ruta
ID de activo de material de TokenLab.
Cuerpo
URL del activo de material de reemplazo accesible públicamente.
Nombre para mostrar actualizado almacenado con el activo de material.
1 - 128Image, Video, Audio 1 - 128Metadatos del cliente actualizados almacenados con el activo de material.
Respuesta
Activo de material actualizado
ID de activo de material de TokenLab. Utilice esto como material_asset_id después de que el activo se vuelva ACTIVE.
seedance.material_asset aigc_avatar, liveness_face Image, Video, Audio PROCESSING, ACTIVE, FAILED, DELETED True cuando el activo está activo y no eliminado.
ID de grupo de materiales de TokenLab que posee este activo de material.
Alcance del proyecto para este activo de material.
Error de procesamiento terminal seguro para el público. Los fallos permanentes de validación de origen incluyen la restricción de dimensión rechazada.
Marca de tiempo Unix de cuando se creó el registro del activo de material.
Marca de tiempo Unix de cuando se actualizó por última vez el registro del activo de material.