Seedance
Crear un grupo de recursos de personaje
Crea un grupo de recursos de personaje de CometAPI para referencias de Seedance. Los grupos virtuales se activan de inmediato. Los grupos de personas reales requieren verificación de presencia.
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 grupo antes de subir una imagen de personaje. Envía el token de acceso sin formato en el encabezado
La respuesta guarda el ID del grupo de CometAPI en
Para un grupo de persona real, continúa con Recuperar un grupo de recursos de personaje y Activar verificación de persona real. Para un grupo virtual, continúa con Subir un recurso de personaje.
Authorization, sin el prefijo 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"
}'
Campos de solicitud
| Campo | Tipo | Descripción |
|---|---|---|
name | string | Nombre del grupo de 1 a 64 caracteres. |
type | string | Usa virtual para un personaje virtual o real para una persona real. |
data.id. Un grupo virtual devuelve data.status=active. Un grupo real devuelve data.status=pending e incluye data.liveness.platform_wrapper_url firmado.
Campos de respuesta
| Campo | Descripción |
|---|---|
data.id | ID del grupo usado por los endpoints de carga y grupos. |
data.group_type | Tipo de grupo enviado. |
data.status | active, pending, or expired. |
data.liveness | Presente para un grupo pendiente de persona real. |
Autorizaciones
Cuerpo
application/json
Última modificación el 1 de diciembre de 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
}
}