curl --request POST \
--url https://api.apimart.ai/v1/seedance2/private-avatar \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"group": {
"name": "virtual-avatar-group",
"description": "demo group"
},
"project_name": "default",
"asset_type": "Image",
"assets": [
{
"url": "https://example.com/avatar-a.png",
"name": "avatar-a"
},
{
"url": "https://example.com/avatar-b.png",
"name": "avatar-b"
}
]
}'
curl --request POST \
--url https://api.apimart.ai/v1/seedance2/private-avatar \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"group_id": "group_xxx",
"project_name": "default",
"asset_type": "Image",
"assets": [
{
"url": "https://example.com/avatar-a.png",
"name": "avatar-a"
}
]
}'
import requests
url = "https://api.apimart.ai/v1/seedance2/private-avatar"
payload = {
"group": {
"name": "virtual-avatar-group",
"description": "demo group"
},
"project_name": "default",
"asset_type": "Image",
"assets": [
{
"url": "https://example.com/avatar-a.png",
"name": "avatar-a"
},
{
"url": "https://example.com/avatar-b.png",
"name": "avatar-b"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
const url = "https://api.apimart.ai/v1/seedance2/private-avatar";
const payload = {
group: {
name: "virtual-avatar-group",
description: "demo group"
},
project_name: "default",
asset_type: "Image",
assets: [
{
url: "https://example.com/avatar-a.png",
name: "avatar-a"
},
{
url: "https://example.com/avatar-b.png",
name: "avatar-b"
}
]
};
const headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
};
fetch(url, {
method: "POST",
headers: headers,
body: JSON.stringify(payload)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
{
"code": 200,
"data": {
"id": "task_01K...",
"object": "seedance.avatar.asset.task",
"status": "processing",
"progress": 10,
"model": "seedance-2.0"
}
}
{
"error": {
"code": 400,
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}
{
"error": {
"code": 401,
"message": "Authentication failed. Please check your API key.",
"type": "authentication_error"
}
}
{
"error": {
"code": 402,
"message": "Insufficient account balance. Please top up and try again.",
"type": "payment_required"
}
}
{
"error": {
"code": 429,
"message": "Too many requests. Please try again later.",
"type": "rate_limit_error"
}
}
{
"error": {
"code": 500,
"message": "Internal server error. Please try again later.",
"type": "server_error"
}
}
seedance-2-0
Assets für virtuelle Avatare
- API zur Einreichung privater Assets virtueller Avatare
- Unterstützt Stapeleinreichung, bis zu 20 Assets pro Anfrage
- Erstellt oder nutzt Asset-Gruppen automatisch; gibt eine Task-ID für die Statusabfrage zurück
- Genehmigte Assets können direkt in der Videogenerierung mit Seedance 2.0 verwendet werden
POST
/
v1
/
seedance2
/
private-avatar
curl --request POST \
--url https://api.apimart.ai/v1/seedance2/private-avatar \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"group": {
"name": "virtual-avatar-group",
"description": "demo group"
},
"project_name": "default",
"asset_type": "Image",
"assets": [
{
"url": "https://example.com/avatar-a.png",
"name": "avatar-a"
},
{
"url": "https://example.com/avatar-b.png",
"name": "avatar-b"
}
]
}'
curl --request POST \
--url https://api.apimart.ai/v1/seedance2/private-avatar \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"group_id": "group_xxx",
"project_name": "default",
"asset_type": "Image",
"assets": [
{
"url": "https://example.com/avatar-a.png",
"name": "avatar-a"
}
]
}'
import requests
url = "https://api.apimart.ai/v1/seedance2/private-avatar"
payload = {
"group": {
"name": "virtual-avatar-group",
"description": "demo group"
},
"project_name": "default",
"asset_type": "Image",
"assets": [
{
"url": "https://example.com/avatar-a.png",
"name": "avatar-a"
},
{
"url": "https://example.com/avatar-b.png",
"name": "avatar-b"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
const url = "https://api.apimart.ai/v1/seedance2/private-avatar";
const payload = {
group: {
name: "virtual-avatar-group",
description: "demo group"
},
project_name: "default",
asset_type: "Image",
assets: [
{
url: "https://example.com/avatar-a.png",
name: "avatar-a"
},
{
url: "https://example.com/avatar-b.png",
name: "avatar-b"
}
]
};
const headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
};
fetch(url, {
method: "POST",
headers: headers,
body: JSON.stringify(payload)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
{
"code": 200,
"data": {
"id": "task_01K...",
"object": "seedance.avatar.asset.task",
"status": "processing",
"progress": 10,
"model": "seedance-2.0"
}
}
{
"error": {
"code": 400,
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}
{
"error": {
"code": 401,
"message": "Authentication failed. Please check your API key.",
"type": "authentication_error"
}
}
{
"error": {
"code": 402,
"message": "Insufficient account balance. Please top up and try again.",
"type": "payment_required"
}
}
{
"error": {
"code": 429,
"message": "Too many requests. Please try again later.",
"type": "rate_limit_error"
}
}
{
"error": {
"code": 500,
"message": "Internal server error. Please try again later.",
"type": "server_error"
}
}
curl --request POST \
--url https://api.apimart.ai/v1/seedance2/private-avatar \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"group": {
"name": "virtual-avatar-group",
"description": "demo group"
},
"project_name": "default",
"asset_type": "Image",
"assets": [
{
"url": "https://example.com/avatar-a.png",
"name": "avatar-a"
},
{
"url": "https://example.com/avatar-b.png",
"name": "avatar-b"
}
]
}'
curl --request POST \
--url https://api.apimart.ai/v1/seedance2/private-avatar \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"group_id": "group_xxx",
"project_name": "default",
"asset_type": "Image",
"assets": [
{
"url": "https://example.com/avatar-a.png",
"name": "avatar-a"
}
]
}'
import requests
url = "https://api.apimart.ai/v1/seedance2/private-avatar"
payload = {
"group": {
"name": "virtual-avatar-group",
"description": "demo group"
},
"project_name": "default",
"asset_type": "Image",
"assets": [
{
"url": "https://example.com/avatar-a.png",
"name": "avatar-a"
},
{
"url": "https://example.com/avatar-b.png",
"name": "avatar-b"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
const url = "https://api.apimart.ai/v1/seedance2/private-avatar";
const payload = {
group: {
name: "virtual-avatar-group",
description: "demo group"
},
project_name: "default",
asset_type: "Image",
assets: [
{
url: "https://example.com/avatar-a.png",
name: "avatar-a"
},
{
url: "https://example.com/avatar-b.png",
name: "avatar-b"
}
]
};
const headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
};
fetch(url, {
method: "POST",
headers: headers,
body: JSON.stringify(payload)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
{
"code": 200,
"data": {
"id": "task_01K...",
"object": "seedance.avatar.asset.task",
"status": "processing",
"progress": 10,
"model": "seedance-2.0"
}
}
{
"error": {
"code": 400,
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}
{
"error": {
"code": 401,
"message": "Authentication failed. Please check your API key.",
"type": "authentication_error"
}
}
{
"error": {
"code": 402,
"message": "Insufficient account balance. Please top up and try again.",
"type": "payment_required"
}
}
{
"error": {
"code": 429,
"message": "Too many requests. Please try again later.",
"type": "rate_limit_error"
}
}
{
"error": {
"code": 500,
"message": "Internal server error. Please try again later.",
"type": "server_error"
}
}
Authentifizierung
string
erforderlich
Alle Anfragen erfordern eine Bearer-Token-AuthentifizierungHolen Sie Ihren API Key:Besuchen Sie die Seite zur API-Key-Verwaltung, um Ihren API Key zu erhaltenFügen Sie den folgenden Header zu jeder Anfrage hinzu:
Authorization: Bearer YOUR_API_KEY
Anfrageparameter
object
Informationen zur Asset-GruppeWenn
group_id nicht angegeben ist, erstellt der Server automatisch eine AIGC-Asset-Gruppe basierend auf diesem FeldBeispiel:{
"group": {
"name": "virtual-avatar-group",
"description": "demo group"
}
}
Schließt sich mit
group_id gegenseitig aus — geben Sie nicht beide gleichzeitig anstring
ID einer bestehenden Asset-GruppeWenn angegeben, wird die Gruppenerstellung übersprungen und die Assets werden direkt an die angegebene Gruppe gesendet
Schließt sich mit
group gegenseitig aus — geben Sie nicht beide gleichzeitig anstring
Standard:"default"
ProjektnameStandard:
defaultstring
Standard:"Image"
Asset-TypOptionen:
Image— Bild-Asset (Standard)Video— Video-AssetAudio— Audio-Asset
Imagearray
Asset-Liste, unterstützt die Einreichung mehrerer Assets in einer Anfrage
Beispiel:
Maximal 20 Assets pro Einreichung
Anzeigen Felder
Anzeigen Felder
{
"assets": [
{
"url": "https://example.com/avatar-a.png",
"name": "avatar-a"
},
{
"url": "https://example.com/avatar-b.png",
"name": "avatar-b"
}
]
}
string
Kurzform für ein einzelnes Asset: Asset-URL
Verwenden Sie entweder das Array
assets oder dieses Feld — nicht beide. Geeignet zum Einreichen eines einzelnen Assets.string
Kurzform für ein einzelnes Asset: Asset-Name
Verwenden Sie entweder das Array
assets oder dieses Feld — nicht beide. Geeignet zum Einreichen eines einzelnen Assets.Antwort
integer
Antwortstatuscode, 200 bei Erfolg
object
Aufgabeninformationen
Beispiele
Beispiel 1: Stapeleinreichung (Gruppe automatisch erstellen)
Wenngroup_id nicht angegeben ist, erstellt der Server vor der Einreichung automatisch eine AIGC-Asset-Gruppe.
{
"group": {
"name": "virtual-avatar-group",
"description": "demo group"
},
"project_name": "default",
"asset_type": "Image",
"assets": [
{
"url": "https://example.com/avatar-a.png",
"name": "avatar-a"
},
{
"url": "https://example.com/avatar-b.png",
"name": "avatar-b"
}
]
}
Beispiel 2: Assets zu einer bestehenden Gruppe hinzufügen
Geben Siegroup_id an, um die Gruppenerstellung zu überspringen und direkt einzureichen.
{
"group_id": "group_xxx",
"project_name": "default",
"asset_type": "Image",
"assets": [
{
"url": "https://example.com/avatar-a.png",
"name": "avatar-a"
}
]
}
Beispiel 3: Kurzform für ein einzelnes Asset
Verwenden Sie für ein einzelnes Asset direkt die Felderurl und name auf oberster Ebene.
{
"group_id": "group_xxx",
"url": "https://example.com/avatar.png",
"asset_type": "Image",
"name": "avatar-1"
}
Prüfergebnis abfragen
Die Asset-Einreichung ist eine asynchrone Aufgabe. Verwenden Sie den Endpunkt Aufgabenstatus abrufen zur Abfrage:GET /v1/tasks/{id}
Alle genehmigt
{
"code": 200,
"data": {
"id": "task_01K...",
"status": "completed",
"progress": 100,
"result": {
"assets": [
{
"asset_id": "asset_a",
"asset_url": "asset://asset_a",
"status": "Active"
},
{
"asset_id": "asset_b",
"asset_url": "asset://asset_b",
"status": "Active"
}
],
"usable_assets": [
{
"asset_id": "asset_a",
"asset_url": "asset://asset_a",
"status": "Active"
},
{
"asset_id": "asset_b",
"asset_url": "asset://asset_b",
"status": "Active"
}
],
"failed_assets": []
}
}
}
Teilweiser Fehler
Wenn ein Asset die Prüfung nicht besteht, wird der Aufgabenstatus zufailed. Erfolgreich genehmigte Assets bleiben nutzbar und erscheinen in result.usable_assets.
{
"code": 200,
"data": {
"id": "task_01K...",
"status": "failed",
"progress": 100,
"result": {
"assets": [
{
"asset_id": "asset_a",
"asset_url": "asset://asset_a",
"status": "Active"
},
{
"asset_id": "asset_b",
"asset_url": "asset://asset_b",
"status": "Failed"
}
],
"usable_assets": [
{
"asset_id": "asset_a",
"asset_url": "asset://asset_a",
"status": "Active"
}
],
"failed_assets": [
{
"asset_id": "asset_b",
"asset_url": "asset://asset_b",
"status": "Failed"
}
]
},
"error": {
"code": "task_failed",
"message": "Some assets failed review"
}
}
}
result.usable_assets[].asset_urlkann direkt in der Videogenerierung mit Seedance 2.0 verwendet werden- Assets in
result.failed_assetsmüssen ersetzt oder erneut eingereicht werden - Aufgaben mit nur einem Asset geben aus Kompatibilitätsgründen auch
result.asset_urlzurück
Verwendung genehmigter Assets
Übergeben Sie dieasset://...-URL direkt an den Endpunkt Videogenerierung mit Seedance 2.0:
{
"model": "seedance-2.0",
"prompt": "The character walks naturally along a city street",
"image_urls": ["asset://asset_a"],
"duration": 5,
"resolution": "720p"
}
Sobald der Server das Präfix
asset:// erkennt, reicht er die Generierungsaufgabe direkt ein, ohne eine erneute Asset-Prüfung auszulösen.