XRToken API Docs

Asset library Volcengine-compatible endpoint

API Configuration
After saving, the Try It panel below sends real requests with this key.
Base: api.xrtoken.ai

Volcengine Ark Open API format compatible entry point for the asset library. Point the base URL at XRToken and the request path, parameters, and response stay identical to the official Volcengine API. Authenticate with an XRToken API key (Authorization: Bearer tr-xxx or x-api-key: tr-xxx) — no AK/SK required.

The Action query parameter selects the operation. All of these use the official POST /?Action=... path:

  • Action=CreateAssetGroup: create an asset group. ProjectName is optional: when omitted, the gateway project (currently xrtoken) is used automatically; when explicitly provided (including default), the value is passed through as-is.
  • Action=CreateAsset: create an asset. ProjectName is optional: when omitted, the gateway project (currently xrtoken) is used automatically; when explicitly provided (including default), the value is passed through as-is. Name is optional too.
  • Action=GetAssetGroup: query an asset group, body {"Id": "group-xxx"}.
  • Action=GetAsset: query an asset, body {"Id": "asset-xxx"}.
  • Action=ListAssetGroups: list asset groups.
  • Action=ListAssets: list assets.
  • Action=UpdateAssetGroup: update an asset group.
  • Action=UpdateAsset: update an asset.
  • Action=DeleteAssetGroup: delete an asset group.
  • Action=DeleteAsset: delete an asset.
  • Action=CreateVisualValidateSession: create a real-person verification session.
  • Action=GetVisualValidateResult: query a real-person verification result.

Responses use the official Volcengine ResponseMetadata / Result envelope and keep the asset library's tenant isolation (you can only operate on assets under groups you own).

POST
/

Authorization

BearerAuth
AuthorizationBearer <token>

API key authentication (OpenAI format). Pass in the Authorization header:

Authorization: Bearer tr-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

In: header

Query Parameters

Action*string

Operation:

  • CreateAssetGroup -- create an asset group
  • CreateAsset -- create an asset
  • GetAssetGroup -- query an asset group
  • GetAsset -- query an asset
  • ListAssetGroups -- list asset groups
  • ListAssets -- list assets
  • UpdateAssetGroup -- update an asset group
  • UpdateAsset -- update an asset
  • DeleteAssetGroup -- delete an asset group
  • DeleteAsset -- delete an asset
  • CreateVisualValidateSession -- create a real-person verification session
  • GetVisualValidateResult -- query a real-person verification result
Value in"CreateAssetGroup" | "CreateAsset" | "GetAssetGroup" | "GetAsset" | "ListAssetGroups" | "ListAssets" | "UpdateAssetGroup" | "UpdateAsset" | "DeleteAssetGroup" | "DeleteAsset" | "CreateVisualValidateSession" | "GetVisualValidateResult"
Version?string

API version, defaults to 2024-01-01.

Default"2024-01-01"

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X post "https://api.xrtoken.ai/?Action=CreateAssetGroup" \  -H "Content-Type: application/json" \  -d '{    "Name": "my-assets"  }'
{}
{
  "error": "model field is required",
  "type": "invalid_request_error"
}
{
  "error": "invalid or missing API key",
  "type": "auth_error"
}
{
  "error": "string",
  "type": "invalid_request_error"
}
{
  "error": "string",
  "type": "invalid_request_error"
}
{
  "error": "rate limit exceeded",
  "type": "rate_limit_error"
}
{
  "error": "upstream provider error",
  "type": "server_error"
}