Skip to main content
POST
/
kyyReactApiServer
/
kyyVideo2
/
asset
/
upload
curl --request POST \
  --url https://zcbservice.aizfw.cn/kyyReactApiServer/kyyVideo2/asset/upload \
  --header 'Authorization: Bearer {{key}}' \
  --header 'Content-Type: application/json' \
  --data '{
    "assetType": "Image",
    "url": "https://example.com/cat.jpg",
    "name": "Cat Image"
  }'
{
  "code": 0,
  "msg": null,
  "data": {
    "assetId": "asset-20260330142158-q75m8"
  }
}

KyyVideo2 Upload Asset

Upload assets to the KyyVideo2 asset library and obtain asset IDs for use in video generation tasks.

Authentication

All requests require a Bearer token in the request header:
Authorization: Bearer {{key}}

Request Parameters

assetType
string
required
Asset type, first letter must be capitalizedAvailable options:
  • Image - Image
  • Video - Video
  • Audio - Audio
  • Document - Document
First letter must be capitalized
url
string
required
Public URL of the assetExample: https://example.com/image.jpg
name
string
Asset name for identification and managementExample: Cat Image

Response Parameters

code
integer
Response status code
  • 0 - Success
  • Other values - Failure
msg
string
Response message, null on success, error message on failure
data
object
Response data object

Asset Type Description

Image

Supported formats: jpeg, png, webp, bmp, tiff, gifUsed for referenceImages, first_image, last_image parameters

Video

Supported resolutions: 480p, 720pUsed for referenceVideos parameter

Audio

Supported formats: wav, mp3Used for referenceAudios parameter

Document

Document type assetsUsed for other scenarios

Usage Flow

1

Upload Asset

Call the upload API to obtain assetId
2

Asset Review

Assets involving faces or virtual avatars need to wait for review approval
3

Use Asset

Reference the asset in video generation tasks using asset://{assetId} format
Advantages of Using Asset IDs:
  1. Assets are reviewed and comply with platform standards
  2. Assets are stored on the platform for faster access
  3. Avoid issues caused by external URL expiration
  4. Can reuse uploaded assets multiple times
Best Practices:
  • Set meaningful names for assets for easier management
  • Upload images involving faces in advance and wait for review
  • Save the assetId for reuse in multiple video generation tasks
  • Ensure asset URLs are accessible during upload
curl --request POST \
  --url https://zcbservice.aizfw.cn/kyyReactApiServer/kyyVideo2/asset/upload \
  --header 'Authorization: Bearer {{key}}' \
  --header 'Content-Type: application/json' \
  --data '{
    "assetType": "Image",
    "url": "https://example.com/cat.jpg",
    "name": "Cat Image"
  }'
{
  "code": 0,
  "msg": null,
  "data": {
    "assetId": "asset-20260330142158-q75m8"
  }
}