Asset Library

ActiveBytePlus-compatible

Create and manage asset groups and referenced media through ten signed public Actions.

Generate video from media URLs

For automatic asset preparation from HTTPS URLs, use the separate URL video entry. It still requires an enabled asset key; existing native and manual-asset workflows remain available.

Quick use

Sign every request to the single public endpoint. Create a group first, synchronously create the asset with its GroupId, then pass the returned stable asset URI to a supported generation workflow.

Asset library quick-use sequence
  1. Generate AK/SK

    Create an enabled asset key in Console and store both values securely.

  2. CreateAssetGroup

    Save the returned group Id.

  3. CreateAsset

    The synchronous success response returns the completed asset Id.

  4. asset://<Id>

    Use the returned Id as a stable asset reference immediately.

Two signed requests and stable asset use
1. POST /api/v1/asset?Action=CreateAssetGroup&Version=2024-01-01
   {"Name":"reference-images","GroupType":"AIGC","ProjectName":"default"}
   -> Result.Id = group_123


2. POST /api/v1/asset?Action=CreateAsset&Version=2024-01-01
   {"GroupId":"group_123","URL":"https://cdn.example.com/reference.png","Name":"reference-image","AssetType":"Image","ProjectName":"default"}
   -> creation completes; Result.Id = asset_123


3. Use asset://asset_123 in a supported generation request

Call flow

CreateAsset completes synchronously. A successful response returns Id only after creation is complete, so no GetAsset readiness polling is required.

Signed request and synchronous CreateAsset result flow
  1. Signed client request

    POST Action and Version in query with the exact signed JSON body.

  2. POST /api/v1/asset

    Token168 verifies the key, time, hash, canonical request, and replay window.

  3. Synchronous result

    Creation finishes before a successful response; otherwise the request returns a public error.

    • Result.Id

      Use the returned Id immediately as asset://<Id>.

    • Public error

      Correct the request or media from the public error, then sign a new request.

Generate AK/SK

Asset library keys are separate from Bearer API keys. Each account can have only one enabled asset key pair. Generate and manage it from Console.

StepOperation
1Open Console, enter Asset Library, and select key management.
2Coordinate the client cutover before creating a key. Creating a new asset key immediately disables the account's currently enabled asset key, then issues one new AK and SK.
3Store AK and SK in a server-side secret manager; never place them in browser code, URLs, or logs.
4The SK is masked by default. Explicitly viewing it again returns the plaintext and creates an immutable audit record.
5Disable the key to invalidate new signed requests immediately. Use this for revocation; creating a replacement already disables the previous key.

Key handling

Treat SK as a password. Rotate it after suspected disclosure and do not persist the example credentials shown below.

Signing and verification

Hash the exact UTF-8 request body bytes. JSON whitespace, field order, and escaping are part of the signed payload.

Build the canonical query from the single Action and Version values. Use the actual request Host, lowercase header names, normalized header values, and the required trailing newline after canonical headers.

Use the credential scope date/ap-southeast-1/ark/request, derive the four HMAC-SHA256 keys, and encode the final signature as lowercase hexadecimal.

The server recomputes the body hash, canonical request, scope, and signature with the SK bound to the AK. X-Date must be within 15 minutes, and an identical signed request is rejected as a replay during the 15-minute window.

Clients must not send xrealip. It is ingress transport metadata, is not a public parameter, and is excluded from the canonical query.

Send the following HTTP header values and Authorization fields with every signed request. Authorization carries the AK, credential scope, signed-header list, and final signature; Authorization itself is not included in the canonical signed headers.

Header or fieldValue or formatDescription
AuthorizationHMAC-SHA256 Credential=<AK>/<scope>, SignedHeaders=<headers>, Signature=<signature>Carries the AK and credential scope, the exact SignedHeaders list, and the lowercase hexadecimal signature.
Content-Typeapplication/jsonMust be application/json and is included in the canonical headers.
Host<actual request host>Use the actual request host, normalize the value, and include it in the canonical headers.
X-Content-Sha256lowercase_hex(SHA256(body bytes))Lowercase hexadecimal SHA-256 of the exact UTF-8 request body bytes.
X-DateYYYYMMDDTHHMMSSZUTC timestamp in YYYYMMDDTHHMMSSZ format; it must be within the 15-minute acceptance window.
SignedHeaderscontent-type;host;x-content-sha256;x-dateThe exact lowercase, semicolon-delimited canonical header names. Do not include Authorization itself.
Canonical request and HMAC derivation
payloadHash = lowercase_hex(SHA256(exact UTF-8 body bytes))


canonicalRequest =
  "POST\n" +
  "/api/v1/asset\n" +
  "Action=<Action>&Version=2024-01-01\n" +
  "content-type:application/json\n" +
  "host:<actual request host>\n" +
  "x-content-sha256:<payloadHash>\n" +
  "x-date:<YYYYMMDDTHHMMSSZ>\n\n" +
  "content-type;host;x-content-sha256;x-date\n" +
  payloadHash


scope = YYYYMMDD + "/ap-southeast-1/ark/request"
stringToSign = "HMAC-SHA256\n" + xDate + "\n" + scope + "\n" +
  lowercase_hex(SHA256(canonicalRequest))


kDate    = HMAC-SHA256(SK, YYYYMMDD)
kRegion  = HMAC-SHA256(kDate, "ap-southeast-1")
kService = HMAC-SHA256(kRegion, "ark")
kSigning = HMAC-SHA256(kService, "request")
signature = lowercase_hex(HMAC-SHA256(kSigning, stringToSign))
Golden dry-run vector: ListAssetGroups
export TOKEN168_ASSET_AK=AKIDEXAMPLE
export TOKEN168_ASSET_SK=SECRETEXAMPLE
export TOKEN168_ASSET_ENDPOINT=https://www.token168.cc/api/v1/asset
export TOKEN168_ASSET_DATE=20260815T123456Z
export TOKEN168_ASSET_DRY_RUN=1
export TOKEN168_ASSET_EXPECTED_SIGNATURE=36d6f63685fd44c8939ba44920343337e7b4222015b4cfb384d29c39b0640f51


node asset-library-signing.mjs
go run main.go


# Both commands print:
# HMAC-SHA256 Credential=AKIDEXAMPLE/20260815/ap-southeast-1/ark/request, SignedHeaders=content-type;host;x-content-sha256;x-date, Signature=36d6f63685fd44c8939ba44920343337e7b4222015b4cfb384d29c39b0640f51

Rejected authentication shapes

Authorization: Bearer, legacy X-Asset headers, Action/Version/Service in the JSON body, unknown body fields, and client-added query parameters are rejected.

Run with the built-in node:crypto module. Dry-run mode prints and verifies Authorization without sending a network request.

Node.js signing and ListAssetGroups request
import crypto from "node:crypto";


const accessKey = process.env.TOKEN168_ASSET_AK;
const secretKey = process.env.TOKEN168_ASSET_SK;
const endpoint = process.env.TOKEN168_ASSET_ENDPOINT || "https://www.token168.cc/api/v1/asset";
const action = "ListAssetGroups";
const version = "2024-01-01";
const region = "ap-southeast-1";
const service = "ark";
const signedHeaders = "content-type;host;x-content-sha256;x-date";
const body = '{"Filter":{"Name":"demo","GroupType":"AIGC"},"PageNumber":1,"PageSize":10,"SortBy":"CreateTime","SortOrder":"Desc"}';


if (!accessKey || !secretKey) {
  throw new Error("Set TOKEN168_ASSET_AK and TOKEN168_ASSET_SK");
}


const sha256 = (value) => crypto.createHash("sha256").update(value).digest("hex");
const hmac = (key, value) => crypto.createHmac("sha256", key).update(value).digest();
const requestUrl = new URL(endpoint);
requestUrl.search = new URLSearchParams({ Action: action, Version: version }).toString();


const xDate = process.env.TOKEN168_ASSET_DATE ||
  new Date().toISOString().replace(/[:-]|\.\d{3}/g, "");
const shortDate = xDate.slice(0, 8);
const payloadHash = sha256(Buffer.from(body, "utf8"));
const canonicalHeaders = [
  "content-type:application/json",
  "host:" + requestUrl.host,
  "x-content-sha256:" + payloadHash,
  "x-date:" + xDate
].join("\n") + "\n";
const canonicalRequest = [
  "POST",
  requestUrl.pathname,
  requestUrl.searchParams.toString(),
  canonicalHeaders,
  signedHeaders,
  payloadHash
].join("\n");
const scope = shortDate + "/" + region + "/" + service + "/request";
const stringToSign = ["HMAC-SHA256", xDate, scope, sha256(canonicalRequest)].join("\n");
const kDate = hmac(Buffer.from(secretKey, "utf8"), shortDate);
const kRegion = hmac(kDate, region);
const kService = hmac(kRegion, service);
const kSigning = hmac(kService, "request");
const signature = crypto.createHmac("sha256", kSigning).update(stringToSign).digest("hex");
const authorization = "HMAC-SHA256 Credential=" + accessKey + "/" + scope +
  ", SignedHeaders=" + signedHeaders + ", Signature=" + signature;


console.log(authorization);


if (process.env.TOKEN168_ASSET_DRY_RUN === "1") {
  const expected = process.env.TOKEN168_ASSET_EXPECTED_SIGNATURE;
  if (expected && signature !== expected) throw new Error("signature mismatch");
} else {
  const response = await fetch(requestUrl, {
    method: "POST",
    headers: {
      Authorization: authorization,
      "Content-Type": "application/json",
      "X-Content-Sha256": payloadHash,
      "X-Date": xDate
    },
    body
  });
  console.log(response.status, await response.text());
}

Common response metadata

Every success response includes the same ResponseMetadata envelope in addition to the Action-specific Result.

FieldTypeDescription
ResponseMetadata.RequestIdstringUnique request identifier to retain for troubleshooting and support.
ResponseMetadata.ActionstringAction value processed for this response.
ResponseMetadata.Version2024-01-01Public asset API version. The current value is 2024-01-01.
ResponseMetadata.ServicearkSigning service identifier. The fixed value is ark.
ResponseMetadata.Regionap-southeast-1Signing region identifier. The fixed value is ap-southeast-1.

Asset groups

CreateAssetGroup

POST /api/v1/asset?Action=CreateAssetGroup&Version=2024-01-01

Create an account-scoped asset group and associate it with the requested Project.

FieldTypePresenceDescription
NamestringRequiredHuman-readable resource name. Asset names and list name filters are limited to 64 Unicode characters where noted.
DescriptionstringOptionalHuman-readable asset-group description.
GroupTypeAIGCOptionalAsset-group classification. The only accepted value is AIGC.
ProjectNamestringOptionalProject scope for create, list, and get operations. An omitted or empty value defaults to default.
Request JSON
{
  "Name": "reference-images",
  "Description": "Reference image assets",
  "GroupType": "AIGC",
  "ProjectName": "default"
}
Success Result fieldTypeDescription
Result.IdstringStable Token168 identifier returned by the completed create or update operation.
Response JSON
{
  "ResponseMetadata": {
    "RequestId": "req_CreateAssetGroup",
    "Action": "CreateAssetGroup",
    "Version": "2024-01-01",
    "Service": "ark",
    "Region": "ap-southeast-1"
  },
  "Result": {
    "Id": "group_123"
  }
}

Action constraints

Name must be non-empty. GroupType defaults to AIGC and rejects other values; ProjectName defaults to default.

ListAssetGroups

POST /api/v1/asset?Action=ListAssetGroups&Version=2024-01-01

List groups visible in a Project with filters, sorting, and pagination.

FieldTypePresenceDescription
FilterobjectRequiredRequired filter object that scopes the list operation.
Filter.GroupTypeAIGCRequiredAsset-group classification. The only accepted value is AIGC.
Filter.GroupIdsstring[]OptionalLimit results to these asset-group identifiers. Omit the field to include every visible group.
Filter.NamestringOptionalHuman-readable resource name. Asset names and list name filters are limited to 64 Unicode characters where noted.
PageNumberintegerRequiredOne-based page number. The minimum accepted value is 1.
PageSizeintegerRequiredNumber of records per page. Accepted values are 1 through 100.
SortByCreateTime | UpdateTimeOptionalAsset-group sort field. Accepted values are CreateTime or UpdateTime.
SortOrderAsc | DescOptionalSort direction. Accepted values are Asc or Desc.
ProjectNamestringOptionalProject scope for create, list, and get operations. An omitted or empty value defaults to default.
Request JSON
{
  "Filter": {
    "Name": "demo",
    "GroupType": "AIGC"
  },
  "PageNumber": 1,
  "PageSize": 10,
  "SortBy": "CreateTime",
  "SortOrder": "Desc"
}
Success Result fieldTypeDescription
Result.ItemsAssetGroup[]Asset groups returned for the current page.
Result.Items[].IdstringToken168 identifier of the target resource.
Result.Items[].NamestringHuman-readable resource name. Asset names and list name filters are limited to 64 Unicode characters where noted.
Result.Items[].TitlestringDisplay title currently derived from the asset-group name.
Result.Items[].Descriptionstring?Human-readable asset-group description.
Result.Items[].GroupTypeAIGCAsset-group classification. The only accepted value is AIGC.
Result.Items[].ProjectNamestringProject name represented by this response projection.
Result.Items[].CreateTimeRFC3339RFC3339 timestamp recorded by Token168 for this resource event.
Result.Items[].UpdateTimeRFC3339RFC3339 timestamp recorded by Token168 for this resource event.
Result.TotalCountintegerTotal number of matching records before pagination.
Result.PageNumberintegerOne-based page number represented by this response.
Result.PageSizeintegerMaximum number of records requested for this response page.
Response JSON
{
  "ResponseMetadata": {
    "RequestId": "req_ListAssetGroups",
    "Action": "ListAssetGroups",
    "Version": "2024-01-01",
    "Service": "ark",
    "Region": "ap-southeast-1"
  },
  "Result": {
    "Items": [
      {
        "Id": "group_123",
        "Name": "reference-images",
        "Title": "reference-images",
        "Description": "Reference image assets",
        "GroupType": "AIGC",
        "ProjectName": "default",
        "CreateTime": "2026-08-15T12:00:00Z",
        "UpdateTime": "2026-08-15T12:00:00Z"
      }
    ],
    "TotalCount": 1,
    "PageNumber": 1,
    "PageSize": 10
  }
}

Action constraints

Filter.GroupType must be AIGC. Filter.Name is at most 64 Unicode characters; PageNumber is at least 1 and PageSize is 1-100. SortBy accepts CreateTime or UpdateTime; SortOrder accepts Asc or Desc.

GetAssetGroup

POST /api/v1/asset?Action=GetAssetGroup&Version=2024-01-01

Get one asset group by Id in the selected Project scope.

FieldTypePresenceDescription
IdstringRequiredToken168 identifier of the target resource.
ProjectNamestringOptionalProject scope for create, list, and get operations. An omitted or empty value defaults to default.
Request JSON
{
  "Id": "group_123",
  "ProjectName": "default"
}
Success Result fieldTypeDescription
Result.IdstringToken168 identifier of the target resource.
Result.NamestringHuman-readable resource name. Asset names and list name filters are limited to 64 Unicode characters where noted.
Result.TitlestringDisplay title currently derived from the asset-group name.
Result.Descriptionstring?Human-readable asset-group description.
Result.GroupTypeAIGCAsset-group classification. The only accepted value is AIGC.
Result.ProjectNamestringProject name represented by this response projection.
Result.CreateTimeRFC3339RFC3339 timestamp recorded by Token168 for this resource event.
Result.UpdateTimeRFC3339RFC3339 timestamp recorded by Token168 for this resource event.
Response JSON
{
  "ResponseMetadata": {
    "RequestId": "req_GetAssetGroup",
    "Action": "GetAssetGroup",
    "Version": "2024-01-01",
    "Service": "ark",
    "Region": "ap-southeast-1"
  },
  "Result": {
    "Id": "group_123",
    "Name": "reference-images",
    "Title": "reference-images",
    "Description": "Reference image assets",
    "GroupType": "AIGC",
    "ProjectName": "default",
    "CreateTime": "2026-08-15T12:00:00Z",
    "UpdateTime": "2026-08-15T12:00:00Z"
  }
}

Action constraints

ProjectName defaults to default. A group outside the account or Project scope is returned as ResourceNotFound.

UpdateAssetGroup

POST /api/v1/asset?Action=UpdateAssetGroup&Version=2024-01-01

Update asset group metadata without changing Project associations.

FieldTypePresenceDescription
IdstringRequiredToken168 identifier of the target resource.
NamestringOptionalHuman-readable resource name. Asset names and list name filters are limited to 64 Unicode characters where noted.
DescriptionstringOptionalHuman-readable asset-group description.
ProjectNamestringOptionalAccepted for request-shape compatibility. Update and delete operations are account-scoped and select the target by Id; ProjectName does not scope, authorize, or move the mutation.
Request JSON
{
  "Id": "group_123",
  "Name": "campaign-images",
  "Description": "Campaign references",
  "ProjectName": "default"
}
Success Result fieldTypeDescription
Result.IdstringStable Token168 identifier returned by the completed create or update operation.
Response JSON
{
  "ResponseMetadata": {
    "RequestId": "req_UpdateAssetGroup",
    "Action": "UpdateAssetGroup",
    "Version": "2024-01-01",
    "Service": "ark",
    "Region": "ap-southeast-1"
  },
  "Result": {
    "Id": "group_123"
  }
}

Action constraints

Only Name and Description are mutable. A blank Name is treated as omitted, and the default group cannot be renamed. Omitting Description clears the existing description; send the current Description to retain it. ProjectName does not scope this account-level mutation; Id selects the group.

DeleteAssetGroup

POST /api/v1/asset?Action=DeleteAssetGroup&Version=2024-01-01

Delete a non-default asset group and make its assets unavailable.

FieldTypePresenceDescription
IdstringRequiredToken168 identifier of the target resource.
ProjectNamestringOptionalAccepted for request-shape compatibility. Update and delete operations are account-scoped and select the target by Id; ProjectName does not scope, authorize, or move the mutation.
Request JSON
{
  "Id": "group_123",
  "ProjectName": "default"
}
Success Result fieldTypeDescription
Resultobject (empty)Empty object confirming that the delete operation succeeded.
Response JSON
{
  "ResponseMetadata": {
    "RequestId": "req_DeleteAssetGroup",
    "Action": "DeleteAssetGroup",
    "Version": "2024-01-01",
    "Service": "ark",
    "Region": "ap-southeast-1"
  },
  "Result": {}
}

Action constraints

The system default group cannot be deleted. Deleting a group also deletes its associated assets. ProjectName does not scope this account-level mutation; Id selects the group.

Assets

CreateAsset

POST /api/v1/asset?Action=CreateAsset&Version=2024-01-01

Synchronously create an asset from a public media URL inside an existing group and return its Id after creation completes.

FieldTypePresenceDescription
GroupIdstringRequiredIdentifier of the existing asset group that owns the asset.
URLHTTP/HTTPS URLRequiredPublic HTTP or HTTPS media URL. Base64 and direct file-upload bodies are not accepted.
AssetTypeImage | Video | AudioRequiredDeclared media type. Accepted values are Image, Video, or Audio.
NamestringOptionalHuman-readable resource name. Asset names and list name filters are limited to 64 Unicode characters where noted.
ModerationobjectOptionalOptional object that selects the moderation strategy for this asset.
Moderation.StrategyDefault | SkipOptionalModeration behavior. Accepted values are Default or Skip.
ProjectNamestringOptionalProject scope for create, list, and get operations. An omitted or empty value defaults to default.
Request JSON
{
  "GroupId": "group_123",
  "URL": "https://cdn.example.com/reference.png",
  "Name": "reference-image",
  "AssetType": "Image",
  "Moderation": {
    "Strategy": "Default"
  },
  "ProjectName": "default"
}
Success Result fieldTypeDescription
Result.IdstringStable Token168 identifier returned by the completed create or update operation.
Response JSON
{
  "ResponseMetadata": {
    "RequestId": "req_CreateAsset",
    "Action": "CreateAsset",
    "Version": "2024-01-01",
    "Service": "ark",
    "Region": "ap-southeast-1"
  },
  "Result": {
    "Id": "asset_123"
  }
}

Action constraints

GroupId, URL, and AssetType must be present and non-blank. AssetType accepts Image, Video, or Audio; Name is at most 64 Unicode characters; Moderation.Strategy accepts Default or Skip.

ListAssets

POST /api/v1/asset?Action=ListAssets&Version=2024-01-01

List assets visible in a Project with group, status, name, sorting, and pagination filters.

FieldTypePresenceDescription
FilterobjectRequiredRequired filter object that scopes the list operation.
Filter.GroupTypeAIGCRequiredAsset-group classification. The only accepted value is AIGC.
Filter.GroupIdsstring[]OptionalLimit results to these asset-group identifiers. Omit the field to include every visible group.
Filter.Statuses(Active | Processing | Failed)[]OptionalLimit assets to the selected aggregate statuses: Active, Processing, or Failed.
Filter.NamestringOptionalHuman-readable resource name. Asset names and list name filters are limited to 64 Unicode characters where noted.
PageNumberintegerRequiredOne-based page number. The minimum accepted value is 1.
PageSizeintegerRequiredNumber of records per page. Accepted values are 1 through 100.
SortByCreateTime | UpdateTime | GroupIdOptionalAsset sort field. Accepted values are CreateTime, UpdateTime, or GroupId.
SortOrderAsc | DescOptionalSort direction. Accepted values are Asc or Desc.
ProjectNamestringOptionalProject scope for create, list, and get operations. An omitted or empty value defaults to default.
Request JSON
{
  "Filter": {
    "GroupIds": [
      "group_123"
    ],
    "GroupType": "AIGC",
    "Statuses": [
      "Processing",
      "Active"
    ],
    "Name": "reference"
  },
  "PageNumber": 1,
  "PageSize": 20,
  "SortBy": "UpdateTime",
  "SortOrder": "Desc",
  "ProjectName": "default"
}
Success Result fieldTypeDescription
Result.ItemsAsset[]Assets returned for the current page.
Result.Items[].IdstringToken168 identifier of the target resource.
Result.Items[].NamestringHuman-readable resource name. Asset names and list name filters are limited to 64 Unicode characters where noted.
Result.Items[].URLstringCurrent media fetch location; it may be temporary and is not the durable asset identity.
Result.Items[].GroupIdstringIdentifier of the existing asset group that owns the asset.
Result.Items[].AssetTypeImage | Video | AudioDeclared media type. Accepted values are Image, Video, or Audio.
Result.Items[].StatusActive | Processing | FailedAggregate asset status: Active, Processing, or Failed.
Result.Items[].Errorobject?Public failure details when the asset has an exposed processing error.
Result.Items[].Error.Codestring?Stable public code describing the asset processing failure.
Result.Items[].Error.Messagestring?Human-readable public explanation of the asset processing failure.
Result.Items[].Moderationobject?Moderation settings recorded for the asset when available.
Result.Items[].Moderation.StrategyDefault | SkipModeration behavior. Accepted values are Default or Skip.
Result.Items[].LastInferenceTimeRFC3339?RFC3339 timestamp of the latest inference use when available.
Result.Items[].ProjectNamestringProject name represented by this response projection.
Result.Items[].CreateTimeRFC3339RFC3339 timestamp recorded by Token168 for this resource event.
Result.Items[].UpdateTimeRFC3339RFC3339 timestamp recorded by Token168 for this resource event.
Result.TotalCountintegerTotal number of matching records before pagination.
Result.PageNumberintegerOne-based page number represented by this response.
Result.PageSizeintegerMaximum number of records requested for this response page.
Response JSON
{
  "ResponseMetadata": {
    "RequestId": "req_ListAssets",
    "Action": "ListAssets",
    "Version": "2024-01-01",
    "Service": "ark",
    "Region": "ap-southeast-1"
  },
  "Result": {
    "Items": [
      {
        "Id": "asset_123",
        "Name": "reference-image",
        "URL": "https://cdn.example.com/reference.png",
        "GroupId": "group_123",
        "AssetType": "Image",
        "Status": "Active",
        "Moderation": {
          "Strategy": "Default"
        },
        "ProjectName": "default",
        "CreateTime": "2026-08-15T12:01:00Z",
        "UpdateTime": "2026-08-15T12:01:30Z"
      }
    ],
    "TotalCount": 1,
    "PageNumber": 1,
    "PageSize": 20
  }
}

Action constraints

Filter.GroupType must be AIGC. Filter.Name is at most 64 Unicode characters. Statuses accept Active, Processing, or Failed. PageNumber is at least 1 and PageSize is 1-100. SortBy accepts CreateTime, UpdateTime, or GroupId; SortOrder accepts Asc or Desc.

GetAsset

POST /api/v1/asset?Action=GetAsset&Version=2024-01-01

Get one asset, including its public aggregate status and current fetch URL.

FieldTypePresenceDescription
IdstringRequiredToken168 identifier of the target resource.
ProjectNamestringOptionalProject scope for create, list, and get operations. An omitted or empty value defaults to default.
Request JSON
{
  "Id": "asset_123",
  "ProjectName": "default"
}
Success Result fieldTypeDescription
Result.IdstringToken168 identifier of the target resource.
Result.NamestringHuman-readable resource name. Asset names and list name filters are limited to 64 Unicode characters where noted.
Result.URLstringCurrent media fetch location; it may be temporary and is not the durable asset identity.
Result.GroupIdstringIdentifier of the existing asset group that owns the asset.
Result.AssetTypeImage | Video | AudioDeclared media type. Accepted values are Image, Video, or Audio.
Result.StatusActive | Processing | FailedAggregate asset status: Active, Processing, or Failed.
Result.Errorobject?Public failure details when the asset has an exposed processing error.
Result.Error.Codestring?Stable public code describing the asset processing failure.
Result.Error.Messagestring?Human-readable public explanation of the asset processing failure.
Result.Moderationobject?Moderation settings recorded for the asset when available.
Result.Moderation.StrategyDefault | SkipModeration behavior. Accepted values are Default or Skip.
Result.LastInferenceTimeRFC3339?RFC3339 timestamp of the latest inference use when available.
Result.ProjectNamestringProject name represented by this response projection.
Result.CreateTimeRFC3339RFC3339 timestamp recorded by Token168 for this resource event.
Result.UpdateTimeRFC3339RFC3339 timestamp recorded by Token168 for this resource event.
Response JSON
{
  "ResponseMetadata": {
    "RequestId": "req_GetAsset",
    "Action": "GetAsset",
    "Version": "2024-01-01",
    "Service": "ark",
    "Region": "ap-southeast-1"
  },
  "Result": {
    "Id": "asset_123",
    "Name": "reference-image",
    "URL": "https://cdn.example.com/reference.png",
    "GroupId": "group_123",
    "AssetType": "Image",
    "Status": "Active",
    "Moderation": {
      "Strategy": "Default"
    },
    "ProjectName": "default",
    "CreateTime": "2026-08-15T12:01:00Z",
    "UpdateTime": "2026-08-15T12:01:30Z"
  }
}

Action constraints

ProjectName defaults to default. Optional Error, Moderation, and LastInferenceTime fields appear only when available.

UpdateAsset

POST /api/v1/asset?Action=UpdateAsset&Version=2024-01-01

Rename an existing asset without changing its group, source, type, or Project associations.

FieldTypePresenceDescription
IdstringRequiredToken168 identifier of the target resource.
NamestringOptionalHuman-readable resource name. Asset names and list name filters are limited to 64 Unicode characters where noted.
ProjectNamestringOptionalAccepted for request-shape compatibility. Update and delete operations are account-scoped and select the target by Id; ProjectName does not scope, authorize, or move the mutation.
Request JSON
{
  "Id": "asset_123",
  "Name": "hero-reference",
  "ProjectName": "default"
}
Success Result fieldTypeDescription
Result.IdstringStable Token168 identifier returned by the completed create or update operation.
Response JSON
{
  "ResponseMetadata": {
    "RequestId": "req_UpdateAsset",
    "Action": "UpdateAsset",
    "Version": "2024-01-01",
    "Service": "ark",
    "Region": "ap-southeast-1"
  },
  "Result": {
    "Id": "asset_123"
  }
}

Action constraints

Only Name is mutable. Omitting Name clears the current name; send the current Name to retain it. ProjectName does not scope this account-level mutation; Id selects the asset.

DeleteAsset

POST /api/v1/asset?Action=DeleteAsset&Version=2024-01-01

Delete an asset by Id so it is no longer available to public reads or generation workflows.

FieldTypePresenceDescription
IdstringRequiredToken168 identifier of the target resource.
ProjectNamestringOptionalAccepted for request-shape compatibility. Update and delete operations are account-scoped and select the target by Id; ProjectName does not scope, authorize, or move the mutation.
Request JSON
{
  "Id": "asset_123",
  "ProjectName": "default"
}
Success Result fieldTypeDescription
Resultobject (empty)Empty object confirming that the delete operation succeeded.
Response JSON
{
  "ResponseMetadata": {
    "RequestId": "req_DeleteAsset",
    "Action": "DeleteAsset",
    "Version": "2024-01-01",
    "Service": "ark",
    "Region": "ap-southeast-1"
  },
  "Result": {}
}

Action constraints

Deletion returns an empty Result object and is irreversible from the public API. ProjectName does not scope this account-level mutation; Id selects the asset.

Public errors

HTTP statusError codeClient action
400InvalidParameterFix the query, JSON shape, required fields, enums, filters, or pagination before retrying.
401UnauthorizedCheck AK status, body hash, Host, X-Date, credential scope, signature, and replay behavior.
403ForbiddenDo not rename or delete protected defaults; verify account permissions.
404ResourceNotFoundCheck the Id and Project scope without assuming another account owns the resource.
409ConflictResolve the conflicting name or state, then send a new signed request.
500InternalErrorRetry with backoff and retain RequestId for support.
504InternalErrorThe operation timed out; retry with backoff and re-check state before creating duplicates.

Media limits

CreateAsset accepts public HTTP/HTTPS URLs only. Base64 and direct file-upload bodies are not accepted. Token168 probes URL safety and media type; downstream processing can also reject media outside these documented limits.

AssetTypeFormatsLimits
Imagejpeg, png, webp, bmp, tiff, gif, heic, heifAspect ratio (0.4, 2.5), width and height (300, 6000) px, under 30 MB.
Videomp4, mov480p/720p/1080p/4K, 2-30 seconds, aspect ratio [0.4, 2.5], width and height [300, 6000] px, total pixels [407696, 2086876], up to 200 MB, FPS [24, 60].
Audiowav, mp32-30 seconds and up to 15 MB.

Asset status and temporary URLs

ListAssets and GetAsset may expose Active, Processing, or Failed on existing records. A successful CreateAsset has already completed and does not require readiness polling. URL may be a temporary upstream fetch URL valid for 12 hours and must not be stored as durable asset identity.

StatusMeaningClient action
ProcessingPreprocessing or upstream synchronization is incomplete.Treat the queried record as unavailable until a later read reports a terminal status; this is not a post-create requirement.
ActiveThe asset is ready for supported generation workflows.Persist Id or asset://<Id>; treat URL as a fetch location only.
FailedPreprocessing failed and public Error may be present.Check URL, format, type, and limits before creating a corrected asset.

Stable identity

Persist Token168 Id or asset://<Id>, never a temporary response URL. Calling GetAsset again reads the current snapshot and does not renew an expired temporary URL.

Capability boundaries

Asset groups, Projects, keys, and assets are account-scoped. ProjectName defaults to default, and public CreateAsset always requires an explicit GroupId.

Liveness-specific asset flows, direct file upload bodies, subtitle removal, generic task cancellation, and provider-only lifecycle controls are outside this public contract.

Strict public shape

Action and Version belong only in query. Request and response fields use PascalCase; create and update return {Id}, and delete returns an empty Result object.