Jiniu AIJiniu AI
Docs
VideosVolcano native formatAsset libraryAsset

Upload asset

Register a publicly reachable URL as an asset; upstream downloads and ingests it asynchronously. A successful creation does not mean it is usable — poll GetAsset until the status is Active. Images that are too small or cannot be downloaded are rejected upstream, showing up either as a creation error or as status Failed.

POST
/api/material

Authorization

bearerAuth

AuthorizationBearer <token>

Authorization: Bearer

In: header

Query Parameters

Action*string

Fixed value: CreateAsset

Value in"CreateAsset"

Request Body

application/json

GroupId*string

ID of the asset group this asset belongs to

Name*string

Asset name

AssetType*string

Asset type

Value in"Image" | "Video" | "Audio"
URL*string

Asset URL; must be downloadable by the upstream provider

Response Body

application/json

curl -X POST "https://jiniu.ai/api/material?Action=CreateAsset" \  -H "Content-Type: application/json" \  -d '{    "GroupId": "group-xxxx",    "Name": "主图",    "AssetType": "Image",    "URL": "https://example.com/a.png"  }'
{
  "ResponseMetadata": {
    "RequestId": "…",
    "Action": "CreateAsset"
  },
  "Result": {
    "Id": "asset-xxxx"
  }
}