Seedance
Tạo nhóm tài sản nhân vật
Tạo nhóm tài sản nhân vật CometAPI cho các tham chiếu Seedance. Nhóm ảo được kích hoạt ngay, còn nhóm người thật cần xác minh.
POST
/
api
/
asset
/
groups
cURL
curl https://api.cometapi.com/api/asset/groups \
-H "Authorization: $COMETAPI_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"my-character","type":"virtual"}'import os
import requests
response = requests.post(
"https://api.cometapi.com/api/asset/groups",
headers={"Authorization": os.environ["COMETAPI_ACCESS_TOKEN"]},
json={"name": "my-character", "type": "virtual"},
timeout=30,
)
response.raise_for_status()
print(response.json())
const response = await fetch("https://api.cometapi.com/api/asset/groups", {
method: "POST",
headers: {
Authorization: process.env.COMETAPI_ACCESS_TOKEN,
"Content-Type": "application/json",
},
body: JSON.stringify({ name: "my-character", type: "virtual" }),
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.json());
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cometapi.com/api/asset/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([
'name' => 'my-character',
'type' => 'virtual'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.cometapi.com/api/asset/groups"
payload := strings.NewReader("{\n \"name\": \"my-character\",\n \"type\": \"virtual\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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.cometapi.com/api/asset/groups")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"my-character\",\n \"type\": \"virtual\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cometapi.com/api/asset/groups")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"my-character\",\n \"type\": \"virtual\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "",
"data": {
"id": "ag-example",
"name": "my-character",
"group_type": "virtual",
"status": "active",
"created_at": 1777385418
}
}Tạo một nhóm trước khi tải hình ảnh nhân vật lên. Gửi mã thông báo truy cập thô trong tiêu đề
Phản hồi lưu ID nhóm CometAPI trong
Với nhóm người thật, hãy tiếp tục bằng Truy xuất nhóm tài sản nhân vật và Kích hoạt xác minh người thật. Với nhóm ảo, hãy tiếp tục bằng Tải lên tài sản nhân vật.
Authorization mà không có tiền tố Bearer.
curl \
https://api.cometapi.com/api/asset/groups \
-H "Authorization: $COMETAPI_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "my-character",
"type": "virtual"
}'
Các trường yêu cầu
| Trường | Kiểu | Mô tả |
|---|---|---|
name | string | Tên nhóm gồm từ 1 đến 64 ký tự. |
type | string | Dùng virtual cho nhân vật ảo hoặc real cho người thật. |
data.id. Nhóm virtual trả về data.status=active. Nhóm real trả về data.status=pending và chứa data.liveness.platform_wrapper_url đã ký.
Các trường phản hồi
| Trường | Mô tả |
|---|---|
data.id | ID nhóm được dùng bởi các endpoint tải lên và nhóm. |
data.group_type | Loại nhóm bạn đã gửi. |
data.status | active, pending hoặc expired. |
data.liveness | Có trong nhóm người thật đang chờ. |
Nội dung
application/json
Lần sửa đổi cuối 1 tháng 12, 2026
⌘I
cURL
curl https://api.cometapi.com/api/asset/groups \
-H "Authorization: $COMETAPI_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"my-character","type":"virtual"}'import os
import requests
response = requests.post(
"https://api.cometapi.com/api/asset/groups",
headers={"Authorization": os.environ["COMETAPI_ACCESS_TOKEN"]},
json={"name": "my-character", "type": "virtual"},
timeout=30,
)
response.raise_for_status()
print(response.json())
const response = await fetch("https://api.cometapi.com/api/asset/groups", {
method: "POST",
headers: {
Authorization: process.env.COMETAPI_ACCESS_TOKEN,
"Content-Type": "application/json",
},
body: JSON.stringify({ name: "my-character", type: "virtual" }),
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.json());
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cometapi.com/api/asset/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([
'name' => 'my-character',
'type' => 'virtual'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.cometapi.com/api/asset/groups"
payload := strings.NewReader("{\n \"name\": \"my-character\",\n \"type\": \"virtual\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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.cometapi.com/api/asset/groups")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"my-character\",\n \"type\": \"virtual\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cometapi.com/api/asset/groups")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"my-character\",\n \"type\": \"virtual\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "",
"data": {
"id": "ag-example",
"name": "my-character",
"group_type": "virtual",
"status": "active",
"created_at": 1777385418
}
}