Skip to content

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 ​

FieldTypeRequiredDescription
URLstringYesPublic URL of the asset. URL only; Base64 is not supported.
NamestringNoAsset name, up to 64 characters. Used only for fuzzy search in the asset list. It is not sent to the model.
AssetTypestringYesImage, Video, or Audio
ProjectNamestringNoProject name. Default default.

Asset limits ​

TypeFormatDurationSize
Imagejpeg, png, webp, bmp, tiff, gif, heic, heif-Aspect ratio (0.4, 2.5); width and height (300, 6000) px; under 30 MB each
Videomp4, mov[2, 15] seconds480p, 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
Audiowav, mp3[2, 15] secondsUp 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 ​

FieldTypeDescription
IdstringAsset 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 ​

  1. Assets are deleted from time to time. Do not use the asset API as long-term storage.
  2. Upload by URL only. Base64 is not supported.
  3. The URL must be reachable from the public internet.
  4. Review takes time.
  5. Keep source files in stable object storage.