Upload an asset
Upload an image, video, or audio asset for a video generation task.
Important: Assets are deleted from time to time. Do not use the asset API as long-term storage. Keep the original files and upload them again if an asset expires.
Endpoint
Endpoint: POST https://api-ai.xiaoku.ai/ark/v1/assets
Request parameters
| Field | Type | Required | Description |
|---|---|---|---|
URL | string | Yes | Public URL of the asset. URL only; Base64 is not supported. |
Name | string | No | Asset name, up to 64 characters. Used only for fuzzy search in the asset list. It is not sent to the model. |
AssetType | string | Yes | Image, Video, or Audio |
ProjectName | string | No | Project name. Default default. |
Asset limits
| Type | Format | Duration | Size |
|---|---|---|---|
| Image | jpeg, png, webp, bmp, tiff, gif, heic, heif | - | Aspect ratio (0.4, 2.5); width and height (300, 6000) px; under 30 MB each |
| Video | mp4, mov | [2, 15] seconds | 480p, 720p, 1080p; aspect ratio [0.4, 2.5]; width and height [300, 6000] px; total pixels [409600, 2086876]; up to 200 MB; frame rate [24, 60] FPS |
| Audio | wav, mp3 | [2, 15] seconds | Up to 15 MB |
Examples
Upload an image
bash
curl -X POST https://api-ai.xiaoku.ai/ark/v1/assets \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"URL": "https://example.com/image.jpg",
"Name": "Sample image",
"AssetType": "Image",
"ProjectName": "default"
}'Upload a video
bash
curl -X POST https://api-ai.xiaoku.ai/ark/v1/assets \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"URL": "https://example.com/video.mp4",
"Name": "Sample video",
"AssetType": "Video",
"ProjectName": "default"
}'Upload audio
bash
curl -X POST https://api-ai.xiaoku.ai/ark/v1/assets \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"URL": "https://example.com/audio.mp3",
"Name": "Sample audio",
"AssetType": "Audio",
"ProjectName": "default"
}'Response fields
| Field | Type | Description |
|---|---|---|
Id | string | Asset ID |
Response
json
{
"Id": "asset-20250101000000-0000"
}Next
Review runs asynchronously after the asset is created. Call Query an asset until Status is terminal (Active or Failed).
After review succeeds, use the asset ID in a video task as asset:// + asset ID, for example asset://asset-20250101000000-0000.
Notes
- Assets are deleted from time to time. Do not use the asset API as long-term storage.
- Upload by URL only. Base64 is not supported.
- The URL must be reachable from the public internet.
- Review takes time.
- Keep source files in stable object storage.
