XRToken API Docs

List asset groups

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

List asset groups for the current user with pagination and name filtering.

Third-party SaaS callers should pass external_user_id to scope results to a specific end-user; omitting it returns only groups bound to the API key holder directly (legacy / first-party behaviour).

GET
/v1/asset-groups

Authorization

BearerAuth
AuthorizationBearer <token>

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

Authorization: Bearer tr-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

In: header

Query Parameters

page_num?integer

Page number, starting from 1

Default1
Range1 <= value
page_size?integer

Items per page, maximum 100

Default10
Range1 <= value <= 100
name?string

Filter by group name (fuzzy match)

type?string

Group type filter. aigc (default) returns AIGC asset groups; real_person returns LivenessFace groups created via validate-session. Upstream Ark requires exactly one type — there is no "return both" option, so you must call this endpoint twice if you need both lists.

Default"aigc"
Value in"aigc" | "real_person"
external_user_id?string

Optional third-party SaaS end-user identifier. When set, only groups bound to (api_user, external_user_id) are returned. Omit (or leave empty) to return groups bound directly to the API key holder (legacy behaviour). Max 128 chars.

Lengthlength <= 128

Response Body

application/json

application/json

application/json

curl -X get "https://api.xrtoken.ai/v1/asset-groups?external_user_id=end-user-42"
{
  "Items": [
    {
      "Id": "string",
      "Name": "string",
      "Description": "string",
      "GroupType": "AIGC",
      "CreateTime": "string",
      "UpdateTime": "string"
    }
  ],
  "TotalCount": 0,
  "PageNumber": 0,
  "PageSize": 0
}
{
  "error": "invalid or missing API key",
  "type": "auth_error"
}
{
  "error": "rate limit exceeded",
  "type": "rate_limit_error"
}