获取素材详情
API 配置
保存后下方「Try It」面板会自动携带此 API Key 发送真实请求。
Base: api.xrtoken.net
获取指定素材的详细信息,包括处理状态。仅可查看当前用户拥有的素材。
素材状态说明:
- Active:处理完成,可正常使用
- Processing:处理中,请稍后再查询(建议间隔 5 秒)
- Failed:处理失败,
Error字段包含错误信息
Authorization
BearerAuth AuthorizationBearer <token>
API 密钥认证(OpenAI 格式)。在 Authorization 请求头中传入:
Authorization: Bearer tr-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
In: header
Path Parameters
assetId*string
素材 ID
Response Body
application/json
application/json
application/json
application/json
curl -X get "https://api.xrtoken.net/v1/assets/string"{
"Id": "string",
"Name": "string",
"AssetType": "Image",
"Status": "Active",
"GroupId": "string",
"URL": "string",
"CreateTime": "string",
"UpdateTime": "string",
"Error": {
"Code": "string",
"Message": "string"
}
}{
"error": "invalid or missing API key",
"type": "auth_error"
}{
"error": "string",
"type": "invalid_request_error"
}{
"error": "rate limit exceeded",
"type": "rate_limit_error"
}