curl https://api.pipellm.ai/v1/tasks/gen-1732891234-abc123xyz \
-H "Authorization: Bearer $PIPELLM_API_KEY"
import os, time, requests
headers = {"Authorization": f"Bearer {os.environ['PIPELLM_API_KEY']}"}
while True:
task = requests.get(
f"https://api.pipellm.ai/v1/tasks/{task_id}", headers=headers
).json()
if task["status"] in ("completed", "failed", "cancelled"):
break
time.sleep(3)
print(task["status"], task.get("data"), task.get("error"))
{
"id": "gen-1732891234-abc123xyz",
"status": "processing",
"type": "video_generation",
"model": "seedance-2-0-mini",
"created_at": "2026-09-17T08:14:02Z"
}
Get a task
Poll the status of an asynchronous image, video, or audio task.
GET
/
v1
/
tasks
/
{task_id}
curl https://api.pipellm.ai/v1/tasks/gen-1732891234-abc123xyz \
-H "Authorization: Bearer $PIPELLM_API_KEY"
import os, time, requests
headers = {"Authorization": f"Bearer {os.environ['PIPELLM_API_KEY']}"}
while True:
task = requests.get(
f"https://api.pipellm.ai/v1/tasks/{task_id}", headers=headers
).json()
if task["status"] in ("completed", "failed", "cancelled"):
break
time.sleep(3)
print(task["status"], task.get("data"), task.get("error"))
{
"id": "gen-1732891234-abc123xyz",
"status": "processing",
"type": "video_generation",
"model": "seedance-2-0-mini",
"created_at": "2026-09-17T08:14:02Z"
}
Media generation that cannot finish inside one request becomes a task. This route
returns the current state of one task and, once it finishes, its result.
Video created through
POST /v2/videos has its own
envelope and its own poll route, GET /v2/videos/{id}.
Use this route for tasks created by the /v1 media endpoints.string
required
Task ID. PipeLLM-managed tasks start with
gen-. The upstream provider’s own task ID
is also accepted for tasks that were created directly against a provider.curl https://api.pipellm.ai/v1/tasks/gen-1732891234-abc123xyz \
-H "Authorization: Bearer $PIPELLM_API_KEY"
import os, time, requests
headers = {"Authorization": f"Bearer {os.environ['PIPELLM_API_KEY']}"}
while True:
task = requests.get(
f"https://api.pipellm.ai/v1/tasks/{task_id}", headers=headers
).json()
if task["status"] in ("completed", "failed", "cancelled"):
break
time.sleep(3)
print(task["status"], task.get("data"), task.get("error"))
{
"id": "gen-1732891234-abc123xyz",
"status": "processing",
"type": "video_generation",
"model": "seedance-2-0-mini",
"created_at": "2026-09-17T08:14:02Z"
}
string
One of
pending, processing, completed, failed, or cancelled.string
image_generation, image_edit, video_generation, or audio_generation.string
Model that is producing the result.
string
When the task was created.
object
The result. Present once
status is completed; its shape follows the task type.string
Failure reason. Present when
status is failed.Polling
A task movespending → processing → one of completed / failed / cancelled.
Only those three are terminal; stop polling when you see one.
Poll every few seconds rather than in a tight loop — polls count against your
rate limit, and polling faster does not make the
upstream finish sooner.
Errors
Same envelope as Errors. An unknown ID returns404; a task
that belongs to another account is not visible to you and returns the same 404.Was this page helpful?