XRToken API Docs

Query video generation task status

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

Poll the current status of a video generation task.

  • queued: Queued. Continue polling (recommended interval: 5-10 seconds).
  • processing: Generating. Continue polling.
  • succeeded: Generation complete. The video_url field contains a downloadable video link (expiry is reported by video_url_expires_at).
  • failed: Generation failed. The error field contains the error message. Frozen amount is automatically refunded.
  • expired: Task timed out (exceeded the execution_expires_after setting).
  • cancelled: Task was cancelled (via DELETE endpoint for queued tasks).

Task records are retained for 7 days and automatically purged after that.

GET
/v1/videos/generations/{taskId}

Authorization

BearerAuth
AuthorizationBearer <token>

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

Authorization: Bearer tr-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

In: header

Path Parameters

taskId*string

Task ID (the id field returned by POST /v1/videos/generations)

Query Parameters

video_url_mode?string

One-time result view; does not change the task or webhook policy.

Value in"auto" | "upstream" | "tos"

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X get "https://api.xrtoken.ai/v1/videos/generations/string"
{
  "id": "string",
  "model": "string",
  "status": "queued",
  "video_url_source": "upstream",
  "video_url_expires_at": "2019-08-24T14:15:22Z",
  "generation_status": "string",
  "delivery_status": "ready",
  "result_query_path": "string",
  "storage": {
    "status": "pending",
    "video_url": "http://example.com",
    "last_frame_url": "http://example.com"
  },
  "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"
}
{
  "id": "string",
  "model": "string",
  "status": "queued",
  "video_url_source": "upstream",
  "video_url_expires_at": "2019-08-24T14:15:22Z",
  "generation_status": "string",
  "delivery_status": "ready",
  "result_query_path": "string",
  "storage": {
    "status": "pending",
    "video_url": "http://example.com",
    "last_frame_url": "http://example.com"
  },
  "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"
}
{
  "id": "string",
  "model": "string",
  "status": "queued",
  "video_url_source": "upstream",
  "video_url_expires_at": "2019-08-24T14:15:22Z",
  "generation_status": "string",
  "delivery_status": "ready",
  "result_query_path": "string",
  "storage": {
    "status": "pending",
    "video_url": "http://example.com",
    "last_frame_url": "http://example.com"
  },
  "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": "rate limit exceeded",
  "type": "rate_limit_error"
}