Create subtitle erase task
Erase hard-coded subtitles from a video you previously generated via XRToken. Async.
Completion notification — pick one:
- Set
callback_url→ XRToken POSTs you on terminal state, no polling - Or poll
GET /v1/videos/erase-subtitle/{taskId}yourself
Input constraint: only works for videos generated through XRToken,
and only within 23 hours of generation. Pass the video_task_id —
XRToken handles the rest.
Processing time: typically under 20–30 minutes when queues are
idle; may stretch to 2–3 hours under peak load. Use callback_url
to avoid long-polling.
Subtitles that WILL be erased:
- Vertical position: horizontal subtitles in the bottom 50% of the frame
- Font size: character height between 1% and 10% of the video height
- Language: Chinese or English
Subtitles that WON'T be erased:
- Text in the top 50% of the frame
- Text that is too small (< 1% height) or too large (> 10% height)
- Languages other than Chinese / English, or unrecognized scripts
May be incorrectly erased: scene text that sits in the bottom half and meets the size thresholds (banners, signage) is treated as subtitles and gets erased. Control such text at generation time if possible.
Billing: per video second; currently free during rollout. Each call still writes a zero-amount freeze/settle pair to the ledger so billing history reflects every call. The erased clip is automatically inserted into the gallery alongside the original.
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
application/json
curl -X post "https://api.xrtoken.ai/v1/videos/erase-subtitle" \ -H "Content-Type: application/json" \ -d '{ "video_task_id": "7d4f9e4a-2c1b-4e3a-8a9f-1b2c3d4e5f60" }'{
"id": "string",
"upstream_id": "string",
"status": "processing",
"created_at": "2019-08-24T14:15:22Z"
}{
"error": "model field is required",
"type": "invalid_request_error"
}{
"error": "invalid or missing API key",
"type": "auth_error"
}{
"error": "insufficient balance -- please top up or upgrade your plan",
"type": "billing_error"
}{
"error": "rate limit exceeded",
"type": "rate_limit_error"
}{
"error": "upstream provider error",
"type": "server_error"
}