查询视频生成任务状态
API 配置
保存后下方「Try It」面板会自动携带此 API Key 发送真实请求。
Base: api.xrtoken.net
轮询视频生成任务的当前状态。
- queued:排队中,请继续轮询(建议间隔 5-10 秒)。
- processing:生成中,请继续轮询。
- succeeded:生成成功,
video_url字段包含可下载的视频链接(24 小时内有效)。 - failed:生成失败,
error字段包含错误信息,已冻结金额会自动退还。 - expired:任务超时(超过
execution_expires_after设定时间)。 - cancelled:任务已取消(通过 DELETE 接口取消排队中的任务)。
任务记录保存 7 天,超时后自动清除。
Authorization
BearerAuth AuthorizationBearer <token>
API 密钥认证(OpenAI 格式)。在 Authorization 请求头中传入:
Authorization: Bearer tr-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
In: header
Path Parameters
taskId*string
任务 ID(由 POST /v1/videos/generations 返回的 id 字段)
Response Body
application/json
application/json
application/json
application/json
curl -X get "https://api.xrtoken.net/v1/videos/generations/string"{
"id": "string",
"model": "string",
"status": "queued",
"video_url": "http://example.com",
"last_frame_url": "http://example.com",
"duration": 0,
"frames": 0,
"resolution": "string",
"ratio": "string",
"seed": 0,
"generate_audio": true,
"service_tier": "string",
"draft": true,
"usage": {
"completion_tokens": 0,
"total_tokens": 0
},
"error": {
"code": "string",
"message": "string"
},
"result": {},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}{
"error": "invalid or missing API key",
"type": "auth_error"
}{
"error": "string",
"type": "invalid_request_error"
}{
"error": "rate limit exceeded",
"type": "rate_limit_error"
}