Skip to content

Assets API

Register media file URLs into the platform asset library and get an asset_url for use in video generation requests.

Overview

MethodPathDescription
POST/v1/assetsRegister an asset
GET/v1/assets/:idGet a signed download URL for an asset

POST /v1/assets

Registers a publicly accessible file URL into the asset library and returns an asset_url that can be referenced in video generation requests.

Request

http
POST /v1/assets
Authorization: Bearer sk-xxx
Content-Type: application/json
json
{
  "url": "https://example.com/tea-ad.mp4",
  "asset_type": "Video",
  "name": "Tea ad reference video"
}
FieldTypeRequiredDescription
urlstringYesPublicly accessible file URL
asset_typestringYesAsset type: Image / Video / Audio (case-sensitive)
namestringNoOptional asset name

Response

json
{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "asset_url": "asset://asset-20260710150403-hx4hf",
  "asset_type": "Video",
  "name": "Tea ad reference video",
  "created_at": "2026-07-10T15:04:03Z"
}
FieldDescription
idInternal record ID
asset_urlReference address used in video generation requests
asset_typeAsset type
nameAsset name
created_atCreation timestamp

Using asset_url

Once registered, reference the asset in the content array of a video generation request:

json
{
  "type": "video_url",
  "video_url": {"url": "asset://asset-20260710150403-hx4hf"},
  "role": "reference_video"
}

Errors

HTTP StatusDescription
400Missing required field or invalid asset_type
502Upstream asset registration failed
500No credential available or internal error

GET /v1/assets/:id

Retrieves a signed download URL for a registered asset by its external ID. Used for previewing or downloading the underlying file.

Request

http
GET /v1/assets/asset-20260710150403-hx4hf
Authorization: Bearer sk-xxx
ParameterLocationDescription
idpathThe external ID (the part after asset:// in asset_url)

Response

json
{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "external_id": "asset-20260710150403-hx4hf",
  "asset_url": "asset://asset-20260710150403-hx4hf",
  "status": "Active",
  "asset_type": "Video",
  "name": "Tea ad reference video",
  "download_url": "https://cdn.example.com/...?X-Tos-Expires=43200",
  "created_at": "2026-07-10T15:04:03Z"
}
FieldDescription
asset_urlReference address for video generation (permanent)
statusAsset status: Active / Processing / Failed
download_urlFile download URL (valid for 12 hours; call this endpoint again to refresh)

Errors

HTTP StatusDescription
404Asset not found or does not belong to your organization
502Upstream query failed

Notes

Important

  • asset_url has the format asset://{external_id} and never expires — use it to reference the asset in video generation requests
  • download_url is a signed URL for downloading/previewing the file only, and expires after 12 hours
  • asset_type is case-sensitive: Image / Video / Audio
  • The submitted URL must be publicly accessible (the platform needs to be able to fetch it)
  • Recommended size limits: images < 5MB, video/audio < 50MB