curl --request POST \
--url https://api.tokenlab.sh/v1/videos/assets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"asset_url": "https://example.com/reference.png",
"asset_name": "Front view",
"asset_type": "Image",
"library_type": "aigc_avatar",
"group_id": "group-20260720123456-vrt01"
}
'{
"id": "asset-20260720123456-qn7wr",
"object": "seedance.material_asset",
"group_id": "group-20260720123456-vrt01",
"library_type": "aigc_avatar",
"asset_name": "Front view",
"asset_type": "Image",
"status": "PROCESSING",
"ready": false,
"error_message": null,
"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": "<string>",
"type": "unauthorized",
"code": "<string>",
"param": "<string>",
"model": "<string>",
"did_you_mean": "<string>",
"suggestions": [
{
"id": "<string>"
}
],
"alternatives": [
{
"id": "<string>",
"status": "<string>",
"tags": [
"<string>"
]
}
],
"hint": "<string>",
"retry_after": 123,
"retryable": true,
"balance_usd": 123,
"estimated_cost_usd": 123,
"supported_operations": [
"<string>"
],
"supported_parameters": [
"<string>"
],
"required_selectors": [
"<string>"
],
"optional_selectors": [
"<string>"
],
"allowed_resolutions": [
"<string>"
],
"allowed_durations": [
"<string>"
],
"allowed_aspect_ratios": [
"<string>"
],
"prompt_max_characters": 123,
"recommended_request": {},
"request_endpoint": "<string>",
"request_shape_mode": "<string>",
"status_mode": "<string>",
"request_id": "<string>"
}
}{
"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"
}
}Create Material Asset
Uploads a Seedance material asset into a TokenLab material group.
curl --request POST \
--url https://api.tokenlab.sh/v1/videos/assets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"asset_url": "https://example.com/reference.png",
"asset_name": "Front view",
"asset_type": "Image",
"library_type": "aigc_avatar",
"group_id": "group-20260720123456-vrt01"
}
'{
"id": "asset-20260720123456-qn7wr",
"object": "seedance.material_asset",
"group_id": "group-20260720123456-vrt01",
"library_type": "aigc_avatar",
"asset_name": "Front view",
"asset_type": "Image",
"status": "PROCESSING",
"ready": false,
"error_message": null,
"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": "<string>",
"type": "unauthorized",
"code": "<string>",
"param": "<string>",
"model": "<string>",
"did_you_mean": "<string>",
"suggestions": [
{
"id": "<string>"
}
],
"alternatives": [
{
"id": "<string>",
"status": "<string>",
"tags": [
"<string>"
]
}
],
"hint": "<string>",
"retry_after": 123,
"retryable": true,
"balance_usd": 123,
"estimated_cost_usd": 123,
"supported_operations": [
"<string>"
],
"supported_parameters": [
"<string>"
],
"required_selectors": [
"<string>"
],
"optional_selectors": [
"<string>"
],
"allowed_resolutions": [
"<string>"
],
"allowed_durations": [
"<string>"
],
"allowed_aspect_ratios": [
"<string>"
],
"prompt_max_characters": 123,
"recommended_request": {},
"request_endpoint": "<string>",
"request_shape_mode": "<string>",
"status_mode": "<string>",
"request_id": "<string>"
}
}{
"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"
}
}id for generation, not the source URL.
For library_type: "aigc_avatar", group_id is optional; TokenLab uses or creates the organization default virtual-avatar group. For library_type: "liveness_face", group_id is required and must be the TokenLab group returned by Get Visual Validation Result.
| Type | Supported input |
|---|---|
| Image | jpeg, jpg, png, webp, bmp, tiff, gif, heic, heif; ≤30 MiB; width and height [300, 6000] px; aspect ratio [0.4, 2.5]. |
| Video | mp4, mov; ≤200 MiB. |
| Audio | aac, wav, mp3; ≤15 MiB. |
ACTIVE and inspect error_message if processing fails. Other media and face requirements are evaluated during processing.
Creation is asynchronous. Poll Get Material Asset until status is ACTIVE. For real-person groups, one group maps to one verified person; uploads with multiple faces or a face that does not match the verified person can fail.
project_name isolates resources within the authenticated organization. It defaults to default; use the same case-sensitive value for related groups and assets. Send it in the JSON body for POST/PUT and in the query string for GET/DELETE.
Example Request
curl https://api.tokenlab.sh/v1/videos/assets \
-H "Authorization: Bearer $TOKENLAB_API_KEY" \
-H "Content-Type: application/json" \
-d '{"library_type":"aigc_avatar","group_id":"group-20260720123456-vrt01","asset_url":"https://example.com/reference.png","asset_type":"Image","asset_name":"Front view","project_name":"default"}'
Example Response
{
"id": "asset-20260720123456-qn7wr",
"object": "seedance.material_asset",
"project_name": "default",
"group_id": "group-20260720123456-vrt01",
"library_type": "aigc_avatar",
"asset_name": "Front view",
"asset_type": "Image",
"status": "PROCESSING",
"ready": false,
"error_message": null,
"metadata": null,
"created_at": 1782998400000
}
Authorizations
API Key authentication. Create or manage API keys in Dashboard > API > API Keys.
Body
Publicly reachable source URL to import. TokenLab stores the material for later use; do not rely on this URL as the long-term material address.
Optional display name stored with the material asset.
1 - 128Image, Video, Audio Material library class. aigc_avatar is for virtual-avatar materials. liveness_face is for verified real-person materials.
aigc_avatar, liveness_face TokenLab material group ID. Required for liveness_face materials; optional for aigc_avatar.
Project scope for the material asset. Assets and groups are isolated by project inside the authenticated organization.
1 - 128Optional client metadata stored with the material asset.
Response
Material asset created
TokenLab material asset ID. Use this as material_asset_id after the asset becomes ACTIVE.
seedance.material_asset aigc_avatar, liveness_face Image, Video, Audio PROCESSING, ACTIVE, FAILED, DELETED True when the asset is active and not deleted.
TokenLab material group ID that owns this material asset.
Project scope for this material asset.
Public-safe terminal processing error. Permanent source validation failures include the rejected dimension constraint.
Unix timestamp when the material asset record was created.
Unix timestamp when the material asset record was last updated.