Get Generation Task
curl --request GET \
--url https://api.apipod.ai/v1/videos/status/{task_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.apipod.ai/v1/videos/status/{task_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.apipod.ai/v1/videos/status/{task_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}falseconst options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.apipod.ai/v1/videos/status/{task_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"code": 200,
"message": "success",
"data": {
"task_id": "vid_task_01JEXAMPLE",
"status": "completed",
"progress": 100,
"result": [
"https://cdn.example.com/generated.mp4"
],
"completed_at": 1786358400,
"usage": {
"completion_tokens": 123,
"total_tokens": 456,
"cost": 0.053
}
}
}Tasks
Query video task
Retrieve status, progress, results, and errors for an asynchronous video generation task by task_id.
GET
https://api.apipod.ai
/
v1
/
videos
/
status
/
{task_id}
Get Generation Task
curl --request GET \
--url https://api.apipod.ai/v1/videos/status/{task_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.apipod.ai/v1/videos/status/{task_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.apipod.ai/v1/videos/status/{task_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}falseconst options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.apipod.ai/v1/videos/status/{task_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"code": 200,
"message": "success",
"data": {
"task_id": "vid_task_01JEXAMPLE",
"status": "completed",
"progress": 100,
"result": [
"https://cdn.example.com/generated.mp4"
],
"completed_at": 1786358400,
"usage": {
"completion_tokens": 123,
"total_tokens": 456,
"cost": 0.053
}
}
}After creating a video task, call this endpoint with the returned
task_id. Poll at a reasonable interval until the task reaches a terminal state; for production workloads, prefer callback_url on the create request.
Task statuses
status | Meaning | Recommended action |
|---|---|---|
pending | The task is queued. | Wait and poll again. |
processing | The provider is generating the result. | Wait and poll again. |
completed | The task completed; outputs are in data.result. | Download and persist the outputs. |
failed | The task failed. | Inspect the error fields and request log. |
cancelled | The task was cancelled. | Stop polling. |
Usage and cost
Whenstatus is completed, the response includes a usage object with the final amount charged for the task:
{
"task_id": "vid_task_01JEXAMPLE",
"status": "completed",
"result": ["https://cdn.example.com/generated.mp4"],
"completed_at": 1786358400,
"usage": {
"completion_tokens": 123,
"total_tokens": 456,
"cost": 0.053
}
}
usage.costis the settled amount in USD after any post-completion adjustment; it matches the cost shown in the dashboard.- Token fields are present only when the upstream provider reports token usage; most resolution/duration-based video models return
costonly. usageis absent while the task ispendingorprocessingand onfailedtasks.
Authorizations
Use your APIPod API key as a Bearer token in the Authorization header.
Path Parameters
APIPod asynchronous task ID returned by the create endpoint.
Was this page helpful?