Extract a person from video
Pick one frontal, open-eyed, unobstructed frame from a video.
From 0.01 USDT
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
| 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.