Skip to content

Volcano Ark Compatible API Reference ​

tokenhub provides an API surface compatible with the Volcano Ark interface format, so users can adapt to tokenhub without changing their existing Volcano calling conventions. All endpoints share a single entry point, distinguished by the Action query parameter. Responses follow the Volcano style (all ids in Result are Volcano ids).

Quick Start ​

Get AK/SK

Log in to the ai-tokenhub console, go to Token Management, select AK/SK, and click Issue.

  • Access Key ID (AK): starts with pak
  • Secret Key (SK): starts with psk
  • Important: SK is shown only once when generated. Keep it safe.

General Notes ​

  • Base URL: https://ai-tokenhub.com
  • Entry point: POST /ark?Action=<OperationName>&Version=2024-01-01
  • Authentication: All endpoints use tokenhub personal access credentials (AK/SK), passed via the Authorization header:
    Authorization: Bearer pak_XXX:psk_XXX
    The tenant that owns the credential is the calling tenant — no tenant ID is required in the request.
  • Request body: application/json, Volcano-style PascalCase fields (GetModerationResult is the exception, using id/type).
  • ProjectName field: Volcano interfaces commonly carry this field. The compatible surface ignores the supplied value and uses the platform-configured value (default) — optional.
  • Common response envelope (except CreateVisualValidateSession and GetVisualValidateResult):
    • Success: {"ResponseMetadata": {RequestId, Action, Version, Service, Region}, "Result": {...}}
    • Failure: {"ResponseMetadata": {...}, "ResponseError": {"Code": "...", "Message": "..."}}
    • ResponseMetadata fields: RequestId (request identifier), Action (operation name), Version (2024-01-01), Service (ark), Region (cn-beijing).
  • Status enum (asset Status): Active (ready), Processing (in progress), Failed (failed).
  • About ids: Id/GroupId in responses are Volcano ids (asset group group-..., asset Asset-...), which can be used directly as inputs to subsequent endpoints, forming a closed loop.

POST https://ai-tokenhub.com/ark?Action=CreateVisualValidateSession&Version=2024-01-01

Get the real-person verification H5 link. A successful response to this endpoint is NOT wrapped in the ResponseMetadata/Result envelope — it returns the fields below directly.

Request

FieldTypeRequiredDescription
CallbackURLstringYesAccessible URL to redirect to after verification
ProjectNamestringNoProject name of the resource (ignored, uses configured default)

Response (returned directly, no envelope)

FieldTypeDescription
BytedTokenstringVerification token
H5LinkstringH5 verification link
CallbackURLstringCallback URL

Example

bash
curl -X POST "https://ai-tokenhub.com/ark?Action=CreateVisualValidateSession&Version=2024-01-01" \
  -H "Authorization: Bearer pak_XXX:psk_XXX" \
  -H "Content-Type: application/json" \
  -d '{"CallbackURL":"https://www.example.com/callback","ProjectName":"default"}'

Response example

json
{
  "BytedToken": "bt_abc123def456",
  "H5Link": "https://ark.volcengine.com/region:c",
  "CallbackURL": "https://www.example.com/callback"
}

2. Get Real-Person Verification Result ​

POST https://ai-tokenhub.com/ark?Action=GetVisualValidateResult&Version=2024-01-01

Use the BytedToken returned by CreateVisualValidateSession to query the real-person verification result, which returns a Volcano asset group id. A successful response to this endpoint is NOT wrapped in the ResponseMetadata/Result envelope — it returns the fields below directly (consistent with Volcano's interface for this endpoint, same as CreateVisualValidateSession). When real-person verification is not yet complete, GroupId is an empty string and the caller can keep polling.

Request

FieldTypeRequiredDescription
BytedTokenstringYesVerification token returned by CreateVisualValidateSession

Response (returned directly, no envelope)

FieldTypeDescription
GroupIdstringVolcano asset group id (group-...); empty string when verification is not complete

Example

bash
curl -X POST "https://ai-tokenhub.com/ark?Action=GetVisualValidateResult&Version=2024-01-01" \
  -H "Authorization: Bearer pak_XXX:psk_XXX" \
  -H "Content-Type: application/json" \
  -d '{"BytedToken":"202603311449168C23BA26xxxxxxxxxxxxx"}'

Response example

json
{
  "GroupId": "group-20260331145705-xxxxx"
}

3. Create Virtual Asset Group ​

POST https://ai-tokenhub.com/ark?Action=CreateAssetGroup&Version=2024-01-01

Request

FieldTypeRequiredDescription
NamestringYesAsset group name
DescriptionstringNoAsset group description
GroupTypestringYesAsset group type; only AIGC is currently supported
ProjectNamestringNoIgnored, uses configured default

Response (Result field)

FieldTypeDescription
IdstringAsset group id (Volcano format group-...)

Example

bash
curl -X POST "https://ai-tokenhub.com/ark?Action=CreateAssetGroup&Version=2024-01-01" \
  -H "Authorization: Bearer pak_XXX:psk_XXX" \
  -H "Content-Type: application/json" \
  -d '{"Name":"test","Description":"test","GroupType":"AIGC","ProjectName":"default"}'

Response example

json
{
  "ResponseMetadata": {
    "RequestId": "20260709123000000000000000000000",
    "Action": "CreateAssetGroup",
    "Version": "2024-01-01",
    "Service": "ark",
    "Region": "cn-beijing"
  },
  "Result": {
    "Id": "group-2026abc123-def456"
  }
}

4. List Asset Groups ​

POST https://ai-tokenhub.com/ark?Action=ListAssetGroups&Version=2024-01-01

Request

FieldTypeRequiredDescription
Filter.NamestringNoFuzzy name match
Filter.GroupTypestringNoAsset group type (AIGC)
PageNumberintYesPage number, starting from 1
PageSizeintYesPage size
SortBystringNoIgnored (sorting not supported)
SortOrderstringNoIgnored
ProjectNamestringNoIgnored

Response (Result field)

FieldTypeDescription
TotalCountintTotal count
ItemsarrayAsset group list, see below
PageNumberintCurrent page number
PageSizeintPage size

Items element fields: Id (Volcano group id), Name, Description, GroupType, CreateTime, UpdateTime (RFC3339).

Example

bash
curl -X POST "https://ai-tokenhub.com/ark?Action=ListAssetGroups&Version=2024-01-01" \
  -H "Authorization: Bearer pak_XXX:psk_XXX" \
  -H "Content-Type: application/json" \
  -d '{"Filter":{"Name":"test","GroupType":"AIGC"},"PageNumber":1,"PageSize":10}'

Response example

json
{
  "ResponseMetadata": {"RequestId":"...","Action":"ListAssetGroups","Version":"2024-01-01","Service":"ark","Region":"cn-beijing"},
  "Result": {
    "TotalCount": 1,
    "Items": [
      {
        "Id": "group-2026abc123-def456",
        "Name": "test",
        "Description": "test",
        "GroupType": "AIGC",
        "CreateTime": "2026-07-09T12:00:00Z",
        "UpdateTime": "2026-07-09T12:00:00Z"
      }
    ],
    "PageNumber": 1,
    "PageSize": 10
  }
}

5. Get Asset Group Detail ​

POST https://ai-tokenhub.com/ark?Action=GetAssetGroup&Version=2024-01-01

Request

FieldTypeRequiredDescription
IdstringYesAsset group id (Volcano format group-...)
ProjectNamestringNoIgnored

Response (Result field)

FieldTypeDescription
IdstringVolcano group id
NamestringName
DescriptionstringDescription
GroupTypestringType
CreateTimestringCreation time (RFC3339)
UpdateTimestringUpdate time (RFC3339)

Example

bash
curl -X POST "https://ai-tokenhub.com/ark?Action=GetAssetGroup&Version=2024-01-01" \
  -H "Authorization: Bearer pak_XXX:psk_XXX" \
  -H "Content-Type: application/json" \
  -d '{"Id":"group-2026abc123-def456","ProjectName":"default"}'

Response example

json
{
  "ResponseMetadata": {"RequestId":"...","Action":"GetAssetGroup","Version":"2024-01-01","Service":"ark","Region":"cn-beijing"},
  "Result": {
    "Id": "group-2026abc123-def456",
    "Name": "test",
    "Description": "test",
    "GroupType": "AIGC",
    "CreateTime": "2026-07-09T12:00:00Z",
    "UpdateTime": "2026-07-09T12:00:00Z"
  }
}

6. Update Asset Group ​

POST https://ai-tokenhub.com/ark?Action=UpdateAssetGroup&Version=2024-01-01

Only Description can be modified currently. Passing a Name different from the current value returns 400 UnsupportedField.

Request

FieldTypeRequiredDescription
IdstringYesAsset group id
NamestringNoNot supported (a different value returns UnsupportedField)
DescriptionstringNoNew description
ProjectNamestringNoIgnored

Response (Result field)

FieldTypeDescription
IdstringVolcano group id

Example

bash
curl -X POST "https://ai-tokenhub.com/ark?Action=UpdateAssetGroup&Version=2024-01-01" \
  -H "Authorization: Bearer pak_XXX:psk_XXX" \
  -H "Content-Type: application/json" \
  -d '{"Id":"group-2026abc123-def456","Description":"updated","ProjectName":"default"}'

Response example

json
{
  "ResponseMetadata": {"RequestId":"...","Action":"UpdateAssetGroup","Version":"2024-01-01","Service":"ark","Region":"cn-beijing"},
  "Result": {
    "Id": "group-2026abc123-def456"
  }
}

7. Delete Asset Group ​

POST https://ai-tokenhub.com/ark?Action=DeleteAssetGroup&Version=2024-01-01

Synchronously deletes the resource on the Volcano side.

Request

FieldTypeRequiredDescription
IdstringYesAsset group id
ProjectNamestringNoIgnored

Response: Result is an empty object {}.

Example

bash
curl -X POST "https://ai-tokenhub.com/ark?Action=DeleteAssetGroup&Version=2024-01-01" \
  -H "Authorization: Bearer pak_XXX:psk_XXX" \
  -H "Content-Type: application/json" \
  -d '{"Id":"group-2026abc123-def456","ProjectName":"default"}'

Response example

json
{
  "ResponseMetadata": {"RequestId":"...","Action":"DeleteAssetGroup","Version":"2024-01-01","Service":"ark","Region":"cn-beijing"},
  "Result": {}
}

8. List Assets ​

POST https://ai-tokenhub.com/ark?Action=ListAssets&Version=2024-01-01

Request

FieldTypeRequiredDescription
Filter.GroupIds[]stringNoList of asset group ids; supports cross-group queries
Filter.GroupTypestringNoAsset group type
Filter.Statuses[]stringNoStatus filter (Active/Processing/Failed)
Filter.NamestringNoFuzzy name match
PageNumberintYesPage number
PageSizeintYesPage size
SortBy / SortOrderstringNoIgnored
ProjectNamestringNoIgnored

Response (Result field)

FieldTypeDescription
TotalCountintTotal count
ItemsarrayAsset list, see below
PageNumberintCurrent page number
PageSizeintPage size

Items element fields: Id (Volcano asset id), Name, URL (accessible asset address), GroupId (Volcano group id), AssetType (Image/Video/Audio), Status (Active/Processing/Failed), Error.Code/Error.Message (populated on failure, empty on success), ProjectName, CreateTime, UpdateTime.

Example

bash
curl -X POST "https://ai-tokenhub.com/ark?Action=ListAssets&Version=2024-01-01" \
  -H "Authorization: Bearer pak_XXX:psk_XXX" \
  -H "Content-Type: application/json" \
  -d '{"Filter":{"GroupIds":["group-2026abc123-def456"],"GroupType":"AIGC"},"PageNumber":1,"PageSize":10}'

Response example

json
{
  "ResponseMetadata": {"RequestId":"...","Action":"ListAssets","Version":"2024-01-01","Service":"ark","Region":"cn-beijing"},
  "Result": {
    "TotalCount": 1,
    "Items": [
      {
        "Id": "Asset-2026abc123-def456",
        "Name": "test",
        "URL": "https://example.com/image.jpg",
        "GroupId": "group-2026abc123-def456",
        "AssetType": "Image",
        "Status": "Active",
        "Error": {"Code": "", "Message": ""},
        "ProjectName": "default",
        "CreateTime": "2026-07-09T12:00:00Z",
        "UpdateTime": "2026-07-09T12:00:00Z"
      }
    ],
    "PageNumber": 1,
    "PageSize": 10
  }
}

9. Upload Asset ​

POST https://ai-tokenhub.com/ark?Action=CreateAsset&Version=2024-01-01

Synchronous upload: the response returns the Volcano asset id directly (no polling/backfill needed). URL must be a publicly accessible address; otherwise registration on the Volcano side will fail.

Request

FieldTypeRequiredDescription
GroupIdstringYesAsset group id
URLstringYesPublicly accessible address of the asset
NamestringYesAsset name
AssetTypestringYesAsset type (Image/Video/Audio)
ProjectNamestringNoIgnored

Response (Result field)

FieldTypeDescription
IdstringVolcano asset id (Asset-...)

Example

bash
curl -X POST "https://ai-tokenhub.com/ark?Action=CreateAsset&Version=2024-01-01" \
  -H "Authorization: Bearer pak_XXX:psk_XXX" \
  -H "Content-Type: application/json" \
  -d '{"GroupId":"group-2026abc123-def456","URL":"https://example.com/image.jpg","Name":"test","AssetType":"Image","ProjectName":"default"}'

Response example

json
{
  "ResponseMetadata": {"RequestId":"...","Action":"CreateAsset","Version":"2024-01-01","Service":"ark","Region":"cn-beijing"},
  "Result": {
    "Id": "Asset-2026abc123-def456"
  }
}

10. Get Asset Detail ​

POST https://ai-tokenhub.com/ark?Action=GetAsset&Version=2024-01-01

Request

FieldTypeRequiredDescription
IdstringYesAsset id (Volcano format Asset-...)
ProjectNamestringNoIgnored

Response (Result field)

FieldTypeDescription
IdstringVolcano asset id
NamestringName
URLstringAccessible asset address
GroupIdstringOwning Volcano group id
AssetTypestringType
StatusstringActive/Processing/Failed
Error.CodestringFailure error code (empty on success)
Error.MessagestringFailure error message (empty on success)
ProjectNamestringProject name
CreateTimestringCreation time (RFC3339)
UpdateTimestringUpdate time (RFC3339)

Example

bash
curl -X POST "https://ai-tokenhub.com/ark?Action=GetAsset&Version=2024-01-01" \
  -H "Authorization: Bearer pak_XXX:psk_XXX" \
  -H "Content-Type: application/json" \
  -d '{"Id":"Asset-2026abc123-def456","ProjectName":"default"}'

Response example

json
{
  "ResponseMetadata": {"RequestId":"...","Action":"GetAsset","Version":"2024-01-01","Service":"ark","Region":"cn-beijing"},
  "Result": {
    "Id": "Asset-2026abc123-def456",
    "Name": "test",
    "URL": "https://example.com/image.jpg",
    "GroupId": "group-2026abc123-def456",
    "AssetType": "Image",
    "Status": "Active",
    "Error": {"Code": "", "Message": ""},
    "ProjectName": "default",
    "CreateTime": "2026-07-09T12:00:00Z",
    "UpdateTime": "2026-07-09T12:00:00Z"
  }
}

11. Update Asset ​

POST https://ai-tokenhub.com/ark?Action=UpdateAsset&Version=2024-01-01

Request

FieldTypeRequiredDescription
IdstringYesAsset id
NamestringNoNew name
ProjectNamestringNoIgnored

Response (Result field)

FieldTypeDescription
IdstringVolcano asset id

Example

bash
curl -X POST "https://ai-tokenhub.com/ark?Action=UpdateAsset&Version=2024-01-01" \
  -H "Authorization: Bearer pak_XXX:psk_XXX" \
  -H "Content-Type: application/json" \
  -d '{"Id":"Asset-2026abc123-def456","Name":"test-renamed","ProjectName":"default"}'

Response example

json
{
  "ResponseMetadata": {"RequestId":"...","Action":"UpdateAsset","Version":"2024-01-01","Service":"ark","Region":"cn-beijing"},
  "Result": {
    "Id": "Asset-2026abc123-def456"
  }
}

12. Delete Asset ​

POST https://ai-tokenhub.com/ark?Action=DeleteAsset&Version=2024-01-01

Request

FieldTypeRequiredDescription
IdstringYesAsset id
ProjectNamestringNoIgnored

Response: Result is an empty object {}.

Example

bash
curl -X POST "https://ai-tokenhub.com/ark?Action=DeleteAsset&Version=2024-01-01" \
  -H "Authorization: Bearer pak_XXX:psk_XXX" \
  -H "Content-Type: application/json" \
  -d '{"Id":"Asset-2026abc123-def456","ProjectName":"default"}'

Response example

json
{
  "ResponseMetadata": {"RequestId":"...","Action":"DeleteAsset","Version":"2024-01-01","Service":"ark","Region":"cn-beijing"},
  "Result": {}
}

13. Get Moderation Result ​

POST https://ai-tokenhub.com/ark?Action=GetModerationResult&Version=2024-01-01

Query the reason an asset/task/request was blocked by content moderation. id/type are passed through to the Volcano side.

Request

FieldTypeRequiredDescription
idstringYesResource id (asset id / task id / request id)
typestringYesid type: asset_id / task_id / request_id

Response (Result field)

FieldTypeDescription
BlockReasonsarrayList of block reasons, see below

BlockReasons element fields: Label (label), SubLabel (sub-label), Detail (detail).

Example

bash
curl -X POST "https://ai-tokenhub.com/ark?Action=GetModerationResult&Version=2024-01-01" \
  -H "Authorization: Bearer pak_XXX:psk_XXX" \
  -H "Content-Type: application/json" \
  -d '{"id":"Asset-2026abc123-def456","type":"asset_id"}'

Response example

json
{
  "ResponseMetadata": {"RequestId":"...","Action":"GetModerationResult","Version":"2024-01-01","Service":"ark","Region":"cn-beijing"},
  "Result": {
    "BlockReasons": [
      {"Label": "Deepfake", "SubLabel": "RealHuman", "Detail": "May involve real human faces"}
    ]
  }
}

Error Responses ​

Except for CreateVisualValidateSession and GetVisualValidateResult, all endpoints return the following on failure:

json
{
  "ResponseMetadata": {"RequestId":"...","Action":"...","Version":"2024-01-01","Service":"ark","Region":"cn-beijing"},
  "ResponseError": {"Code": "NotFound", "Message": "resource not found"}
}

Common Code values:

CodeHTTPDescription
InvalidParameter400Invalid request parameter
UnsupportedField400Field not supported for update (e.g. Name in UpdateAssetGroup)
InvalidAction400Unsupported Action
Unauthorized401Authentication failed
Forbidden403No permission
FeatureNotEnabled403Asset library / moderation-result feature not enabled for tenant
NotFound404Resource not found or not visible cross-tenant
FailedPrecondition412Precondition not met (e.g. uploading to an unready asset group)
Outdated412Moderation-result query timed out (older than 14 days)
LimitExceeded429Resource count limit reached
ServiceNotConfigured503Volcano service not configured
InternalError500Internal error