Seedance
Crea un gruppo di risorse del personaggio
Crea un gruppo di risorse del personaggio CometAPI per i riferimenti Seedance. I gruppi virtuali diventano attivi subito. I gruppi di persone reali richiedono la verifica di presenza.
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
}
}Crea un gruppo prima di caricare un’immagine del personaggio. Invia il token di accesso grezzo nell’header
La risposta memorizza l’ID del gruppo CometAPI in
Per un gruppo di persone reali, continua con Recupera un gruppo di risorse del personaggio, quindi Attiva la verifica della persona reale. Per un gruppo virtuale, continua con Carica una risorsa del personaggio.
Authorization, senza prefisso 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"
}'
Campi della richiesta
| Campo | Tipo | Descrizione |
|---|---|---|
name | string | Nome del gruppo da 1 a 64 caratteri. |
type | string | Usa virtual per un personaggio virtuale o real per una persona reale. |
data.id. Un gruppo virtual restituisce data.status=active. Un gruppo real restituisce data.status=pending e include data.liveness.platform_wrapper_url firmato.
Campi della risposta
| Campo | Descrizione |
|---|---|
data.id | ID del gruppo usato dagli endpoint di caricamento e gruppo. |
data.group_type | Tipo di gruppo inviato. |
data.status | active, pending, or expired. |
data.liveness | Presente per un gruppo di persona reale in attesa. |
Autorizzazioni
Corpo
application/json
Ultima modifica il 1 dicembre 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
}
}