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"
}
}Atualizar Ativo de Material
Atualiza um ativo de material Seedance pertencente à organização atual.
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 isola recursos dentro da organização autenticada. O padrão é default; use o mesmo valor, diferenciando maiúsculas e minúsculas, para grupos e ativos relacionados. Envie-o no corpo JSON para POST/PUT e na consulta para GET/DELETE.
Exemplo de Requisição
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"}'
Exemplo de Resposta
{
"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 caminho
ID do ativo de material TokenLab.
Corpo
URL de substituição do ativo de material acessível publicamente.
Nome de exibição atualizado armazenado com o ativo de material.
1 - 128Image, Video, Audio 1 - 128Metadados do cliente atualizados armazenados com o ativo de material.
Resposta
Ativo de material atualizado
ID do ativo de material do TokenLab. Use isto como material_asset_id após o ativo se tornar ACTIVE.
seedance.material_asset aigc_avatar, liveness_face Image, Video, Audio PROCESSING, ACTIVE, FAILED, DELETED True quando o ativo está ativo e não excluído.
ID do grupo de materiais do TokenLab que possui este ativo de material.
Escopo do projeto para este ativo de material.
Erro de processamento terminal seguro para exibição pública. Falhas permanentes de validação de origem incluem a restrição de dimensão rejeitada.
Timestamp Unix de quando o registro do ativo de material foi criado.
Timestamp Unix de quando o registro do ativo de material foi atualizado pela última vez.