API
Calling notes for each published API.
Character replacement
character-replacement
Replace the person in a video using three reference images.
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
| Parameters | Type | Required |
|---|---|---|
| video Video |
video | Required |
| image Front reference |
image | Required |
| image_2 Profile reference |
image | Required |
| image_3 Back reference |
image | Required |
| resolution Resolution |
enum (480x832, 576x1024, 720x1280) | Required |
| fps Frame rate |
enum (16) | Required |
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": "character-replacement",
"inputs": {
"video": {
"file_id": "upl_..."
},
"image": {
"file_id": "upl_..."
},
"image_2": {
"file_id": "upl_..."
},
"image_3": {
"file_id": "upl_..."
},
"resolution": "480x832",
"fps": "16"
}
}'
Python
import requests
requests.post(
"https://api.poton.ai/v1/tasks",
headers={"Authorization": "Bearer YOUR_KEY"},
json={
"workflow": "character-replacement",
"inputs": {
"video": {
"file_id": "upl_..."
},
"image": {
"file_id": "upl_..."
},
"image_2": {
"file_id": "upl_..."
},
"image_3": {
"file_id": "upl_..."
},
"resolution": "480x832",
"fps": "16"
}
},
)
JavaScript
await fetch("https://api.poton.ai/v1/tasks", {
method: "POST",
headers: {"Authorization": "Bearer YOUR_KEY", "Content-Type": "application/json"},
body: JSON.stringify({
"workflow": "character-replacement",
"inputs": {
"video": {
"file_id": "upl_..."
},
"image": {
"file_id": "upl_..."
},
"image_2": {
"file_id": "upl_..."
},
"image_3": {
"file_id": "upl_..."
},
"resolution": "480x832",
"fps": "16"
}
})
});
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 | "character-replacement" |
Slug of this API. |
status |
string | "succeeded" |
queued, running, succeeded, failed, or canceled. A new task is queued. |
price |
string | "0.300000" |
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/ExampleVideoToken00001.mp4", "type": "video", "bytes": 2458112, "width": 480, "height": 832, "duration": 8.0}] |
Result array. It is [] until the task succeeds, then one item. |
created_at |
string | "2026-11-09T08:00:00Z" |
Creation time, ISO 8601 in UTC. |
outputs[].url |
string | "https://r2.poton.ai/results/task_0123456789abcdef01234567/ExampleVideoToken00001.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 | 2458112 |
File size in bytes. |
outputs[].width |
number | 480 |
Width in pixels. null when the size cannot be read. |
outputs[].height |
number | 832 |
Height in pixels. null when the size cannot be read. |
outputs[].duration |
number | 8.0 |
Length in seconds, to 0.001. Omitted when it cannot be read. |
Completed response
{
"id": "task_0123456789abcdef01234567",
"workflow": "character-replacement",
"status": "succeeded",
"price": "0.300000",
"error": null,
"outputs": [
{
"url": "https://r2.poton.ai/results/task_0123456789abcdef01234567/ExampleVideoToken00001.mp4",
"type": "video",
"bytes": 2458112,
"width": 480,
"height": 832,
"duration": 8.0
}
],
"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
480 and 576 accept up to 60 seconds. 720 accepts up to 40 seconds. Frame rate is 16.
Douyin video download
douyin-download
Download the highest available Douyin video from a share text.
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
| Parameters | Type | Required |
|---|---|---|
| text Share text |
string · 4000 | Required |
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": "douyin-download",
"inputs": {
"text": "https://v.douyin.com/example/"
}
}'
Python
import requests
requests.post(
"https://api.poton.ai/v1/tasks",
headers={"Authorization": "Bearer YOUR_KEY"},
json={
"workflow": "douyin-download",
"inputs": {
"text": "https://v.douyin.com/example/"
}
},
)
JavaScript
await fetch("https://api.poton.ai/v1/tasks", {
method: "POST",
headers: {"Authorization": "Bearer YOUR_KEY", "Content-Type": "application/json"},
body: JSON.stringify({
"workflow": "douyin-download",
"inputs": {
"text": "https://v.douyin.com/example/"
}
})
});
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 | "douyin-download" |
Slug of this API. |
status |
string | "succeeded" |
queued, running, succeeded, failed, or canceled. A new task is queued. |
price |
string | "0.100000" |
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/ExampleDouyinToken00001.mp4", "type": "video", "bytes": 5123456, "width": 720, "height": 1280, "duration": 12.5}] |
Result array. It is [] until the task succeeds, then one item. |
created_at |
string | "2026-11-09T08:00:00Z" |
Creation time, ISO 8601 in UTC. |
outputs[].url |
string | "https://r2.poton.ai/results/task_0123456789abcdef01234567/ExampleDouyinToken00001.mp4" |
Result file on r2.poton.ai. The Douyin play URL is not returned. |
outputs[].type |
string | "video" |
Result type for this API. The example is the success type. |
outputs[].bytes |
number | 5123456 |
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 | 12.5 |
Length in seconds, to 0.001. Omitted when it cannot be read. |
Completed response
{
"id": "task_0123456789abcdef01234567",
"workflow": "douyin-download",
"status": "succeeded",
"price": "0.100000",
"error": null,
"outputs": [
{
"url": "https://r2.poton.ai/results/task_0123456789abcdef01234567/ExampleDouyinToken00001.mp4",
"type": "video",
"bytes": 5123456,
"width": 720,
"height": 1280,
"duration": 12.5
}
],
"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
Paste the share text. Poton downloads the highest stream Douyin actually offers and stores the MP4. This runs on the Poton server and is not sent to a cloud workflow. The feed often stops at 720p even when the post says 1080p or 4K. Each success costs the price shown on this page. A failure is not charged. Videos larger than 512MB are rejected.
Extract a person from video
extract-image
Pick one frontal, open-eyed, unobstructed frame from a video.
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
| Parameters | Type | Required |
|---|---|---|
| video Video |
video | Required |
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": "extract-image",
"inputs": {
"video": {
"file_id": "upl_..."
}
}
}'
Python
import requests
requests.post(
"https://api.poton.ai/v1/tasks",
headers={"Authorization": "Bearer YOUR_KEY"},
json={
"workflow": "extract-image",
"inputs": {
"video": {
"file_id": "upl_..."
}
}
},
)
JavaScript
await fetch("https://api.poton.ai/v1/tasks", {
method: "POST",
headers: {"Authorization": "Bearer YOUR_KEY", "Content-Type": "application/json"},
body: JSON.stringify({
"workflow": "extract-image",
"inputs": {
"video": {
"file_id": "upl_..."
}
}
})
});
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 | "extract-image" |
Slug of this API. |
status |
string | "succeeded" |
queued, running, succeeded, failed, or canceled. A new task is queued. |
price |
string | "0.100000" |
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/ExampleFrameToken000001.jpg", "type": "image", "bytes": 186240, "width": 720, "height": 1280}] |
Result array. It is [] until the task succeeds, then one item. |
created_at |
string | "2026-11-09T08:00:00Z" |
Creation time, ISO 8601 in UTC. |
outputs[].url |
string | "https://r2.poton.ai/results/task_0123456789abcdef01234567/ExampleFrameToken000001.jpg" |
Result file on r2.poton.ai. Not a supplier URL. |
outputs[].type |
string | "image" |
Result type for this API. The example is the success type. |
outputs[].bytes |
number | 186240 |
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. |
Completed response
{
"id": "task_0123456789abcdef01234567",
"workflow": "extract-image",
"status": "succeeded",
"price": "0.100000",
"error": null,
"outputs": [
{
"url": "https://r2.poton.ai/results/task_0123456789abcdef01234567/ExampleFrameToken000001.jpg",
"type": "image",
"bytes": 186240,
"width": 720,
"height": 1280
}
],
"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 picks one frame on this server: frontal, eyes open, and the face not blocked, preferring more of the body, then a larger face, then a sharper picture. If no frame qualifies, it keeps the largest visible face. The JPEG is stored and returned as the task result. This is not sent to a cloud workflow. Each success costs the price shown on this page. A failure, including a video with no face, is not charged.
Motion transfer
motion-transfer
Transfer motion from a video onto the reference character.
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
| Parameters | Type | Required |
|---|---|---|
| video Video |
video | Required |
| image Front reference |
image | Required |
| image_2 Profile reference |
image | Required |
| image_3 Back reference |
image | Required |
| resolution Resolution |
enum (480x832, 576x1024, 720x1280) | Required |
| fps Frame rate |
enum (16) | Required |
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": "motion-transfer",
"inputs": {
"video": {
"file_id": "upl_..."
},
"image": {
"file_id": "upl_..."
},
"image_2": {
"file_id": "upl_..."
},
"image_3": {
"file_id": "upl_..."
},
"resolution": "480x832",
"fps": "16"
}
}'
Python
import requests
requests.post(
"https://api.poton.ai/v1/tasks",
headers={"Authorization": "Bearer YOUR_KEY"},
json={
"workflow": "motion-transfer",
"inputs": {
"video": {
"file_id": "upl_..."
},
"image": {
"file_id": "upl_..."
},
"image_2": {
"file_id": "upl_..."
},
"image_3": {
"file_id": "upl_..."
},
"resolution": "480x832",
"fps": "16"
}
},
)
JavaScript
await fetch("https://api.poton.ai/v1/tasks", {
method: "POST",
headers: {"Authorization": "Bearer YOUR_KEY", "Content-Type": "application/json"},
body: JSON.stringify({
"workflow": "motion-transfer",
"inputs": {
"video": {
"file_id": "upl_..."
},
"image": {
"file_id": "upl_..."
},
"image_2": {
"file_id": "upl_..."
},
"image_3": {
"file_id": "upl_..."
},
"resolution": "480x832",
"fps": "16"
}
})
});
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 | "motion-transfer" |
Slug of this API. |
status |
string | "succeeded" |
queued, running, succeeded, failed, or canceled. A new task is queued. |
price |
string | "0.300000" |
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/ExampleMotionToken0001.mp4", "type": "video", "bytes": 2516992, "width": 480, "height": 832, "duration": 8.0}] |
Result array. It is [] until the task succeeds, then one item. |
created_at |
string | "2026-11-09T08:00:00Z" |
Creation time, ISO 8601 in UTC. |
outputs[].url |
string | "https://r2.poton.ai/results/task_0123456789abcdef01234567/ExampleMotionToken0001.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 | 2516992 |
File size in bytes. |
outputs[].width |
number | 480 |
Width in pixels. null when the size cannot be read. |
outputs[].height |
number | 832 |
Height in pixels. null when the size cannot be read. |
outputs[].duration |
number | 8.0 |
Length in seconds, to 0.001. Omitted when it cannot be read. |
Completed response
{
"id": "task_0123456789abcdef01234567",
"workflow": "motion-transfer",
"status": "succeeded",
"price": "0.300000",
"error": null,
"outputs": [
{
"url": "https://r2.poton.ai/results/task_0123456789abcdef01234567/ExampleMotionToken0001.mp4",
"type": "video",
"bytes": 2516992,
"width": 480,
"height": 832,
"duration": 8.0
}
],
"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
GPU rules match character replacement. Prices start the same, and an admin can change this API on its own.
Image edit
qwen-image
Edit one image at 1K, 2K, or 4K.
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
| Parameters | Type | Required |
|---|---|---|
| image Image |
image | Required |
| prompt Prompt |
string · 4000 | Required |
| negative_prompt Negative prompt |
string · 4000 | Required |
| resolution Resolution |
enum (1k, 2k, 4k) | Required |
| aspect Aspect |
enum (original, 9:16, 16:9, 1:1, 4:3, 3:4, 2:3) | Required |
| remove_subtitle Remove subtitles |
bool | Required |
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": "qwen-image",
"inputs": {
"image": {
"file_id": "upl_..."
},
"prompt": "your prompt",
"negative_prompt": "your negative prompt",
"resolution": "1k",
"aspect": "original",
"remove_subtitle": false
}
}'
Python
import requests
requests.post(
"https://api.poton.ai/v1/tasks",
headers={"Authorization": "Bearer YOUR_KEY"},
json={
"workflow": "qwen-image",
"inputs": {
"image": {
"file_id": "upl_..."
},
"prompt": "your prompt",
"negative_prompt": "your negative prompt",
"resolution": "1k",
"aspect": "original",
"remove_subtitle": False
}
},
)
JavaScript
await fetch("https://api.poton.ai/v1/tasks", {
method: "POST",
headers: {"Authorization": "Bearer YOUR_KEY", "Content-Type": "application/json"},
body: JSON.stringify({
"workflow": "qwen-image",
"inputs": {
"image": {
"file_id": "upl_..."
},
"prompt": "your prompt",
"negative_prompt": "your negative prompt",
"resolution": "1k",
"aspect": "original",
"remove_subtitle": false
}
})
});
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 | "qwen-image" |
Slug of this API. |
status |
string | "succeeded" |
queued, running, succeeded, failed, or canceled. A new task is queued. |
price |
string | "0.120000" |
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/ExampleImageToken00001.png", "type": "image", "bytes": 842131, "width": 1024, "height": 1024}] |
Result array. It is [] until the task succeeds, then one item. |
created_at |
string | "2026-11-09T08:00:00Z" |
Creation time, ISO 8601 in UTC. |
outputs[].url |
string | "https://r2.poton.ai/results/task_0123456789abcdef01234567/ExampleImageToken00001.png" |
Result file on r2.poton.ai. Not a supplier URL. |
outputs[].type |
string | "image" |
Result type for this API. The example is the success type. |
outputs[].bytes |
number | 842131 |
File size in bytes. |
outputs[].width |
number | 1024 |
Width in pixels. null when the size cannot be read. |
outputs[].height |
number | 1024 |
Height in pixels. null when the size cannot be read. |
Completed response
{
"id": "task_0123456789abcdef01234567",
"workflow": "qwen-image",
"status": "succeeded",
"price": "0.120000",
"error": null,
"outputs": [
{
"url": "https://r2.poton.ai/results/task_0123456789abcdef01234567/ExampleImageToken00001.png",
"type": "image",
"bytes": 842131,
"width": 1024,
"height": 1024
}
],
"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
The caller supplies the prompt and the negative prompt. Those two fields do not change the price. Aspect ratio does not change the price. Removing subtitles adds the amount in the price table. 4K is generated at 2K and then upscaled.
Remove subtitles
remove-subtitle
Split near keyframes, then return two videos from one price: one keeps the picture and redraws subtitles, one redraws the whole frame.
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
| Parameters | Type | Required |
|---|---|---|
| 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.
Upper-body size
upper-size
Estimate the upper-body size in one photo as small, medium, or large.
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
| Parameters | Type | Required |
|---|---|---|
| image Photo |
image | Required |
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": "upper-size",
"inputs": {
"image": {
"file_id": "upl_..."
}
}
}'
Python
import requests
requests.post(
"https://api.poton.ai/v1/tasks",
headers={"Authorization": "Bearer YOUR_KEY"},
json={
"workflow": "upper-size",
"inputs": {
"image": {
"file_id": "upl_..."
}
}
},
)
JavaScript
await fetch("https://api.poton.ai/v1/tasks", {
method: "POST",
headers: {"Authorization": "Bearer YOUR_KEY", "Content-Type": "application/json"},
body: JSON.stringify({
"workflow": "upper-size",
"inputs": {
"image": {
"file_id": "upl_..."
}
}
})
});
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 | "upper-size" |
Slug of this API. |
status |
string | "succeeded" |
queued, running, succeeded, failed, or canceled. A new task is queued. |
price |
string | "0.100000" |
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/ExampleGradeToken000001.json", "type": "text", "bytes": 153, "grade": "medium", "labels": {"en": "Medium", "zh-Hans": "适中", "zh-Hant": "適中"}, "scores": {"small": 0.1023, "medium": 0.7841, "large": 0.1136}}] |
Result array. It is [] until the task succeeds, then one item. |
created_at |
string | "2026-11-09T08:00:00Z" |
Creation time, ISO 8601 in UTC. |
outputs[].url |
string | "https://r2.poton.ai/results/task_0123456789abcdef01234567/ExampleGradeToken000001.json" |
UTF-8 JSON file on r2.poton.ai. The file contains grade, labels, and scores. |
outputs[].type |
string | "text" |
Result type for this API. The example is the success type. |
outputs[].bytes |
number | 153 |
File size in bytes. |
outputs[].grade |
string | "medium" |
small, medium, or large. |
outputs[].labels |
object | {"en": "Medium", "zh-Hans": "适中", "zh-Hant": "適中"} |
Grade name in en, zh-Hans, and zh-Hant. |
outputs[].scores |
object | {"small": 0.1023, "medium": 0.7841, "large": 0.1136} |
Scores for small, medium, and large, rounded to 4 decimal places. |
Completed response
{
"id": "task_0123456789abcdef01234567",
"workflow": "upper-size",
"status": "succeeded",
"price": "0.100000",
"error": null,
"outputs": [
{
"url": "https://r2.poton.ai/results/task_0123456789abcdef01234567/ExampleGradeToken000001.json",
"type": "text",
"bytes": 153,
"grade": "medium",
"labels": {
"en": "Medium",
"zh-Hans": "适中",
"zh-Hant": "適中"
},
"scores": {
"small": 0.1023,
"medium": 0.7841,
"large": 0.1136
}
}
],
"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 one photo, up to 30MB. Poton estimates the upper-body size of the most prominent person and returns Small, Medium, or Large. This is a visual estimate from the photo, not a tailor's measurement. A large estimate is kept. A small estimate is kept only when that area shows almost no skin; otherwise it is reported as medium. If no person is found, the central area of the photo is used. This runs on the Poton server and is not sent to a cloud workflow. Each success costs the price shown on this page. An unreadable image is not charged.