Skip to main content

Overview

Use this endpoint for unified async polling across task types such as video, image, music, and 3D generation.
If a create response includes poll_url, call that exact path. Some image models may return task-based responses under either an image-specific status path or /v1/tasks/{id}.

Path Parameters

id
string
required
The task ID returned by the create request.

Response

id
string
Canonical async task identifier.
task_id
string
Async task identifier alias.
poll_url
string
Preferred polling URL when the create response supplies one.
status
string
Task status such as pending, processing, completed, or failed.
progress
number
Progress percentage when the provider reports it.
video_url
string
Result asset URL when the task completes and produces a video.
video
object
Single video payload with url, duration, width, and height when available.
videos
array
Multiple video payloads when the upstream returns more than one output.
error
string
Error message when the task fails.
created
integer
Creation timestamp when available.
updated
integer
Last update timestamp when available.
model
string
Model used by the task when the provider reports it.

Examples

cURL
curl "https://api.lemondata.cc/v1/tasks/video_abc123" \
  -H "Authorization: Bearer sk-your-api-key"
Python
import requests

poll_url = "/v1/tasks/video_abc123"
response = requests.get(
    f"https://api.lemondata.cc{poll_url}",
    headers={"Authorization": "Bearer sk-your-api-key"},
)
print(response.json())
JavaScript
const pollUrl = '/v1/tasks/video_abc123';
const response = await fetch(`https://api.lemondata.cc${pollUrl}`, {
  headers: { Authorization: 'Bearer sk-your-api-key' },
});
console.log(await response.json());