Cập nhật nhóm tài nguyên vật liệu Seedance
curl --request PUT \
--url https://api.tokenlab.sh/v1/videos/assets/groups/{groupId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"group_name": "Updated references",
"description": "Hình ảnh đã được phê duyệt cho video mùa hè"
}
'import requests
url = "https://api.tokenlab.sh/v1/videos/assets/groups/{groupId}"
payload = {
"group_name": "Updated references",
"description": "Hình ảnh đã được phê duyệt cho video mùa hè"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
group_name: 'Updated references',
description: 'Hình ảnh đã được phê duyệt cho video mùa hè'
})
};
fetch('https://api.tokenlab.sh/v1/videos/assets/groups/{groupId}', 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/{groupId}",
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([
'group_name' => 'Updated references',
'description' => 'Hình ảnh đã được phê duyệt cho video mùa hè'
]),
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/{groupId}"
payload := strings.NewReader("{\n \"group_name\": \"Updated references\",\n \"description\": \"Hình ảnh đã được phê duyệt cho video mùa hè\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.tokenlab.sh/v1/videos/assets/groups/{groupId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"group_name\": \"Updated references\",\n \"description\": \"Hình ảnh đã được phê duyệt cho video mùa hè\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tokenlab.sh/v1/videos/assets/groups/{groupId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"group_name\": \"Updated references\",\n \"description\": \"Hình ảnh đã được phê duyệt cho video mùa hè\"\n}"
response = http.request(request)
puts response.read_body{
"id": "group-20260720123456-vrt01",
"object": "seedance.material_asset_group",
"library_type": "aigc_avatar",
"group_name": "Updated references",
"description": "Hình ảnh đã được phê duyệt cho video mùa hè",
"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": "API key not found",
"type": "invalid_request_error"
}
}{
"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 & tư liệu
Cập nhật Nhóm Tài nguyên Vật liệu
Cập nhật một nhóm vật liệu Seedance thuộc sở hữu của tổ chức hiện tại.
PUT
/
v1
/
videos
/
assets
/
groups
/
{groupId}
Cập nhật nhóm tài nguyên vật liệu Seedance
curl --request PUT \
--url https://api.tokenlab.sh/v1/videos/assets/groups/{groupId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"group_name": "Updated references",
"description": "Hình ảnh đã được phê duyệt cho video mùa hè"
}
'import requests
url = "https://api.tokenlab.sh/v1/videos/assets/groups/{groupId}"
payload = {
"group_name": "Updated references",
"description": "Hình ảnh đã được phê duyệt cho video mùa hè"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
group_name: 'Updated references',
description: 'Hình ảnh đã được phê duyệt cho video mùa hè'
})
};
fetch('https://api.tokenlab.sh/v1/videos/assets/groups/{groupId}', 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/{groupId}",
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([
'group_name' => 'Updated references',
'description' => 'Hình ảnh đã được phê duyệt cho video mùa hè'
]),
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/{groupId}"
payload := strings.NewReader("{\n \"group_name\": \"Updated references\",\n \"description\": \"Hình ảnh đã được phê duyệt cho video mùa hè\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.tokenlab.sh/v1/videos/assets/groups/{groupId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"group_name\": \"Updated references\",\n \"description\": \"Hình ảnh đã được phê duyệt cho video mùa hè\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tokenlab.sh/v1/videos/assets/groups/{groupId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"group_name\": \"Updated references\",\n \"description\": \"Hình ảnh đã được phê duyệt cho video mùa hè\"\n}"
response = http.request(request)
puts response.read_body{
"id": "group-20260720123456-vrt01",
"object": "seedance.material_asset_group",
"library_type": "aigc_avatar",
"group_name": "Updated references",
"description": "Hình ảnh đã được phê duyệt cho video mùa hè",
"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": "API key not found",
"type": "invalid_request_error"
}
}{
"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"
}
}Cập nhật tên hiển thị, mô tả hoặc metadata cho một nhóm vật liệu. Đối với các nhóm người thật được quản lý, việc ánh xạ người đã xác minh sẽ không thay đổi.
project_name tách biệt tài nguyên trong tổ chức đã xác thực. Mặc định là default; dùng cùng một giá trị phân biệt chữ hoa, chữ thường cho nhóm và tài nguyên liên quan. Gửi trong nội dung JSON với POST/PUT và tham số truy vấn với GET/DELETE.
Ví dụ Yêu cầu
curl https://api.tokenlab.sh/v1/videos/assets/groups/group-20260720123456-vrt01 \
-X PUT \
-H "Authorization: Bearer $TOKENLAB_API_KEY" \
-H "Content-Type: application/json" \
-d '{"group_name":"Updated references","description":"Images approved for summer videos","project_name":"default"}'
Ví dụ Phản hồi
{
"id": "group-20260720123456-vrt01",
"object": "seedance.material_asset_group",
"project_name": "default",
"library_type": "aigc_avatar",
"group_name": "Updated references",
"description": "Images approved for summer videos",
"status": "ACTIVE",
"metadata": null,
"created_at": 1782998400000
}
Ủy quyền
Xác thực bằng Khóa API. Tạo hoặc quản lý khóa API trong Dashboard > API > API Keys.
Tham số đường dẫn
Nội dung
application/json
Phản hồi
Nhóm tài nguyên vật liệu đã được cập nhật
ID nhóm tài liệu TokenLab. Sử dụng nó làm group_id khi tải tài liệu lên.
Tùy chọn có sẵn:
seedance.material_asset_group Tùy chọn có sẵn:
aigc_avatar, liveness_face Phạm vi dự án cho nhóm tài liệu này.