Seedance 2.0 Material Library
Create reusable image, video or audio materials, then use the returned uri in a Seedance video request.
All requests use https://api.uniall.ai and Authorization: Bearer $UNIAI_API_KEY.
1. Create a material
POST /v1/materials requires an Idempotency-Key header and a JSON body:
| Parameter | Type | Required | Description |
|---|---|---|---|
url | string | Yes | Public HTTP(S) media URL, up to 4,096 characters. |
type | string | Yes | image, video or audio; must match the media. |
name | string | No | Material name, up to 64 characters. |
curl "https://api.uniall.ai/v1/materials" \
-H "Authorization: Bearer $UNIAI_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: product-reference-001" \
-d '{
"url": "https://cdn.example.com/product.png",
"type": "image",
"name": "Product reference"
}'
HTTP 202 response:
{
"id": "mat_EXAMPLE",
"object": "material",
"name": "Product reference",
"type": "image",
"status": "processing",
"uri": null,
"preview_url": null,
"created_at": "2026-10-29T10:00:00Z",
"available_at": null,
"expires_at": null
}
- Use a key of 1–200 visible ASCII characters without spaces. Retrying the same request with the same key returns the same material; changed parameters return HTTP
409(material_idempotency_conflict). After a timeout, retry with the original key. - Keep the URL publicly reachable during processing, without login, cookies or custom headers. The current website's Create Material form takes a source URL; this API accepts JSON URLs, not multipart files or Base64. For a local file, first make it available at a public HTTP(S) URL.
Images and videos of people use the same creation request. Follow any additional verification instructions returned by the API.
2. Wait until available
Query the returned id every 3–5 seconds until status is available:
curl "https://api.uniall.ai/v1/materials/mat_EXAMPLE" \
-H "Authorization: Bearer $UNIAI_API_KEY"
Example response; timestamps are illustrative:
{
"id": "mat_EXAMPLE",
"object": "material",
"name": "Product reference",
"type": "image",
"status": "available",
"uri": "asset://asset-EXAMPLE",
"preview_url": "https://cdn.example.com/preview.png",
"created_at": "2026-10-29T10:00:00Z",
"available_at": "2026-10-29T10:01:00Z",
"expires_at": "2026-10-30T12:00:00Z"
}
Use the exact uri returned by the API. mat_* is the ID for querying and deleting a material; do not construct an asset:// URI from it. The expiry time is expires_at; use the material before that time.
| Status | Action |
|---|---|
creating, processing | Continue querying. |
available | The returned uri is ready to use. |
failed | Read error.code and error.message. To create a new material, use a new idempotency key. |
delete_pending, deleted | Stop using the material. |
3. Generate a video with the URI
Replace asset://asset-EXAMPLE below with the uri from your available image material:
curl "https://api.uniall.ai/v1/videos" \
-H "Authorization: Bearer $UNIAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "seedance2.0-fast",
"resolution": "480p",
"duration": 4,
"aspect_ratio": "16:9",
"generate_audio": false,
"content": [
{
"type": "text",
"text": "Keep the product appearance consistent as the camera slowly moves around it."
},
{
"type": "image_url",
"image_url": {"url": "asset://asset-EXAMPLE"},
"role": "reference_image"
}
]
}'
Put the URI in a structured media field such as image_url.url, not in the prompt. For video or audio materials, use the matching video_url or audio_url field. Use materials owned by the same UniAI user and still available and unexpired.
Use the returned video task ID to query the video and retrieve its result.
List materials
curl "https://api.uniall.ai/v1/materials?type=image&status=available&limit=20" \
-H "Authorization: Bearer $UNIAI_API_KEY"
The response contains data, has_more and next_cursor. Filters: type, status; limit is 1–100, default 50. Pass a returned next_cursor unchanged as after for the next page. Expired and deleted materials are not listed.
Delete a material
curl -X DELETE "https://api.uniall.ai/v1/materials/mat_EXAMPLE" \
-H "Authorization: Bearer $UNIAI_API_KEY"
HTTP 200 with status: "deleted" means deletion is complete; HTTP 202 with status: "delete_pending" means it is still processing. Repeating DELETE is safe. A completed deletion removes the material from the list, and its detail endpoint returns 404 material_not_found.
Request errors
| Error code | What to check |
|---|---|
invalid_idempotency_key | Include a valid Idempotency-Key when creating a material. |
invalid_material_request | Check the URL, media type and name length. |
material_idempotency_conflict | Reuse the original request with that key, or use a new key for a different material. |
material_not_found | Check the ID and current user; the material may be deleted or expired. |
material_not_available | Wait for available and check expires_at. |
material_not_managed | Copy the returned uri from your material instead of constructing one. |
See the Seedance 2.0 Series Guide for generation parameters.