Back

Remove subtitles

Split near keyframes, then return two videos from one price: one keeps the picture and redraws subtitles, one redraws the whole frame.

From 0.01 USDT/s

Runs on Poton

POST https://api.poton.ai/v1/tasks

Base URL https://api.poton.ai. Send JSON. Amounts are strings. Create a task with POST /v1/tasks. It returns 202.

Authentication

Authorization: Bearer YOUR_KEY

Send Idempotency-Key to make a retry return the original task instead of holding the price twice.

Authenticated requests are limited to 60 per minute for each API key.

Parameters

ParametersTypeRequired
video
Video
video Required
segment_seconds
Split near a keyframe about every N seconds
int · 1–24 Optional

curl

curl -X POST https://api.poton.ai/v1/tasks \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: example-1" \
  -d '{
  "workflow": "remove-subtitle",
  "inputs": {
    "video": {
      "file_id": "upl_..."
    },
    "segment_seconds": 8
  }
}'

Python

import requests
requests.post(
    "https://api.poton.ai/v1/tasks",
    headers={"Authorization": "Bearer YOUR_KEY"},
    json={
  "workflow": "remove-subtitle",
  "inputs": {
    "video": {
      "file_id": "upl_..."
    },
    "segment_seconds": 8
  }
},
)

JavaScript

await fetch("https://api.poton.ai/v1/tasks", {
  method: "POST",
  headers: {"Authorization": "Bearer YOUR_KEY", "Content-Type": "application/json"},
  body: JSON.stringify({
  "workflow": "remove-subtitle",
  "inputs": {
    "video": {
      "file_id": "upl_..."
    },
    "segment_seconds": 8
  }
})
});

Return values

POST /v1/tasks returns 202. A new task has status queued, error null, and outputs []. Each field below belongs to that task object. Examples come from the completed GET /v1/tasks/{id}. Example values are samples.

Parameters Type Example Description
id string "task_0123456789abcdef01234567" Task id. It is already present in the 202 response.
workflow string "remove-subtitle" Slug of this API.
status string "succeeded" queued, running, succeeded, failed, or canceled. A new task is queued.
price string "4.980000" Price of this task, as a 6-decimal USDT string.
error object null null unless the task failed. A failure is an object with code and message.
error.code string "invalid_input" Stable error code. Present only when error is an object. The example is one possible code.
error.message string "Invalid input: prompt" Message in the caller's language. Present only when error is an object. The example is one possible message.
outputs array [{"url": "https://r2.poton.ai/results/task_0123456789abcdef01234567/ExampleBlendToken000001.mp4", "type": "video", "bytes": 2457600, "width": 720, "height": 1280, "duration": 16.6, "variant": "blend", "ssim": 0.96123}, {"url": "https://r2.poton.ai/results/task_0123456789abcdef01234567/ExampleRawToken00000001.mp4", "type": "video", "bytes": 3686400, "width": 720, "height": 1280, "duration": 16.6, "variant": "raw", "ssim": 0.93841}] Result array. It is [] until the task succeeds, then two videos: blend, then raw.
created_at string "2026-11-09T08:00:00Z" Creation time, ISO 8601 in UTC.
outputs[].url string "https://r2.poton.ai/results/task_0123456789abcdef01234567/ExampleBlendToken000001.mp4" Result file on r2.poton.ai. Not a supplier URL.
outputs[].type string "video" Result type for this API. The example is the success type.
outputs[].bytes number 2457600 File size in bytes.
outputs[].width number 720 Width in pixels. null when the size cannot be read.
outputs[].height number 1280 Height in pixels. null when the size cannot be read.
outputs[].duration number 16.6 Length in seconds, to 0.001. Omitted when it cannot be read.
outputs[].variant string "blend" blend keeps the picture and redraws the subtitle area. raw redraws the whole frame. The array order is blend, then raw.
outputs[].ssim number 0.96123 Mean SSIM against the source, to 5 decimal places. Omitted when it cannot be computed; the file is still returned. The example is not a guarantee.

Completed response

{
  "id": "task_0123456789abcdef01234567",
  "workflow": "remove-subtitle",
  "status": "succeeded",
  "price": "4.980000",
  "error": null,
  "outputs": [
    {
      "url": "https://r2.poton.ai/results/task_0123456789abcdef01234567/ExampleBlendToken000001.mp4",
      "type": "video",
      "bytes": 2457600,
      "width": 720,
      "height": 1280,
      "duration": 16.6,
      "variant": "blend",
      "ssim": 0.96123
    },
    {
      "url": "https://r2.poton.ai/results/task_0123456789abcdef01234567/ExampleRawToken00000001.mp4",
      "type": "video",
      "bytes": 3686400,
      "width": 720,
      "height": 1280,
      "duration": 16.6,
      "variant": "raw",
      "ssim": 0.93841
    }
  ],
  "created_at": "2026-11-09T08:00:00Z"
}

queued and running are unfinished. succeeded means the file is stored and the hold was captured. failed and canceled with no file release the hold.

queued · running · succeeded · failed · canceled

Errors

401 unauthorized · 402 insufficient_balance · 403 forbidden · 404 not_found · 409 idempotency_conflict · 413 file_too_large · 422 invalid_input · 422 content_rejected · 429 rate_limited · 500 upstream_unavailable · 500 result_copy_failed

Upload a video up to 60 seconds and 30MB. Poton splits it near a keyframe about every N seconds, sends those pieces to the cloud together, and joins them so the cut does not flicker or jump. One price returns two videos for the full duration. The first keeps the picture and redraws only the subtitle area. That area can show a faint band, and the frame stays closer to the original. The second redraws the whole frame, so the subtitle area blends into the rest of the picture and more of the frame changes. Each video includes its measured SSIM. You pay the per-second rate for that input resolution, for the full duration, rounded up to 0.01. The short side picks the tier: up to 480, up to 576, up to 720, and anything larger is 1280. The rates are listed on this page. A failure is not charged.