Jiniu AIJiniu AI
Docs
VideosVolcano native formatAsset library

Asset library overview

Single endpoint, authentication, response envelope and the action list

The asset library is not a RESTful API. Every operation goes to the same endpoint and is selected with the Action query parameter:

POST https://jiniu.ai/api/material?Action=<action>
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

The body is JSON; actions that take no parameters accept {}.

Actions

CategoryActionPurpose
Asset groupCreateAssetGroupCreate an asset group
Asset groupGetAssetGroupGet an asset group
Asset groupUpdateAssetGroupUpdate an asset group
Asset groupDeleteAssetGroupDelete an asset group
Asset groupListAssetGroupsList asset groups
AssetCreateAssetUpload an asset
AssetGetAssetGet an asset
AssetUpdateAssetUpdate an asset
AssetDeleteAssetDelete an asset
AssetListAssetsList assets
VerificationCreateVisualValidateSessionCreate a liveness session
VerificationGetVisualValidateResultGet the verification result
VerificationCreateRealValidateH5Issue a verification H5 link

Response envelope

The business result is always wrapped in Result:

{
  "ResponseMetadata": { "RequestId": "…", "Action": "CreateAssetGroup" },
  "Result": { "Id": "group-xxxx" }
}

On a business failure Result.Error is set:

{
  "ResponseMetadata": { "RequestId": "…", "Action": "CreateAsset" },
  "Result": { "Error": { "Code": "InvalidParameter", "Message": "AssetType must be one of Image/Video/Audio" } }
}

Gateway-level failures (no available channel, upstream unreachable) use the standard error structure with a 4xx or 5xx status code.

Billing

Asset library calls are pure pass-through: no tokens counted, no charge, no consumption log.

Channel affinity

Assets and asset groups stay on the channel that created them — the gateway matches on the Id in the request body and routes back to the same place. Reaching the same asset with a key from another group may therefore fail, depending on your group configuration.

ListAssetGroups and ListAssets are served from the gateway's local ownership index, scoped to the current user and never forwarded upstream, so they only show records created through this gateway.