Create asset group
Create a new asset group (AssetGroup) for organizing and managing asset files.
Each group belongs to the authenticated user. Groups are isolated between users. All API keys under the same user share asset groups.
Third-party SaaS callers can pass external_user_id in the body to scope the new group to a specific end-user (so other end-users behind the same API key won't see it).
Authorization
BearerAuth API key authentication (OpenAI format). Pass in the Authorization header:
Authorization: Bearer tr-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
In: header
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
curl -X post "https://api.xrtoken.ai/v1/asset-groups" \ -H "Content-Type: application/json" \ -d '{ "name": "Video Assets" }'{
"Id": "string",
"Name": "string",
"Description": "string",
"GroupType": "AIGC",
"CreateTime": "string",
"UpdateTime": "string"
}{
"error": "model field is required",
"type": "invalid_request_error"
}{
"error": "invalid or missing API key",
"type": "auth_error"
}{
"error": "rate limit exceeded",
"type": "rate_limit_error"
}{
"error": "upstream provider error",
"type": "server_error"
}