Developer docs / AI content generation
List AI generation tasks
List image or video generation tasks using the scheduleId returned at creation. Poll about every five seconds until tasks complete or explicitly fail.
GET
/v1/ai/task/listByScheduleId- Authentication:
- Request header x-api-key: <YOUR_API_KEY>; keep the key on the server and never expose it in client code, logs or shared files.
- Success criteria:
- HTTP 2xx with code=0; for asynchronous tasks, also query the final status.
Query parameters
| Field | Type | Required | Description |
|---|---|---|---|
scheduleId | string | Yes | scheduleId returned when the generation schedule was created |
Waiting states include WAITING_SUBMIT, SUBMITTING, PENDING, and PROCESSING. COMPLETED is successful.
Retry only after an explicit failure, cancellation, or expiration. A network or polling-process error does not mean generation failed.
For videos, prefer customResult.videoUrl or result.url. Images usually use result.url or resultUrl.
Success response
{
"code": 0,
"data": {
"list": [
{
"taskId": "task_01k1example",
"scheduleId": "schedule_01k1example",
"type": "VIDEO_GENERATION",
"status": "COMPLETED",
"model": "gemini-omni-video",
"params": {
"prompt": "A clean 10-second product reveal video with a slow camera push-in",
"model": "gemini-omni-video",
"seconds": 10,
"size": "720x1280"
},
"result": {
"url": "https://static.ailingtu.com/ai-videos/result.mp4",
"thumbnailUrl": "https://static.ailingtu.com/ai-images/cover.jpg"
},
"customResult": {
"videoUrl": "https://static.ailingtu.com/ai-videos/result.mp4",
"coverUrl": "https://static.ailingtu.com/ai-images/cover.jpg"
},
"createdAt": "2026-08-10T10:00:00Z"
}
],
"total": 1,
"pageNumber": 1,
"pageSize": 20,
"totalPages": 1
},
"message": "success"
}Response and errors
Main response fields come from the published contract; see the JSON Schema. Required refers to the constraint in the containing object.
| Field | Type | Required | Description |
|---|---|---|---|
code | integer | Yes | Fixed value: 0 |
message | string | No | — |
data | object | Yes | — |
data.list | object[] | Yes | — |
data.list[].taskId | string | Yes | — |
data.list[].scheduleId | string | No | — |
data.list[].type | string | Yes | Allowed values: IMAGE_GENERATION, VIDEO_GENERATION |
data.list[].status | string | Yes | Allowed values: WAITING_SUBMIT, SUBMITTING, SUBMIT_FAILED, PENDING, PROCESSING, COMPLETED, FAILED, CANCELLED, EXPIRED |
data.list[].model | string | No | — |
data.list[].params | union | No | — |
data.list[].result | object | No | — |
data.list[].result.url | string | No | — |
data.list[].result.resultUrl | string | No | — |
data.list[].result.videoUrl | string | No | — |
data.list[].result.thumbnailUrl | string | No | — |
data.list[].resultUrl | string | No | — |
data.list[].customResult | object | No | — |
data.list[].customResult.videoUrl | string | No | — |
data.list[].customResult.coverUrl | string | No | — |
data.list[].reason | string | null | No | — |
data.list[].createdAt | string | No | — |
data.list[].finishTime | string | null | No | — |
data.total | integer | No | — |
data.pageNumber | integer | No | — |
data.pageSize | integer | No | — |
data.totalPages | integer | No | — |
HTTP 400The request parameters or body are invalid. Fix them and retry.HTTP 401The API key is missing or invalid. Check x-api-key.HTTP 403The API key has no permission to call this endpoint.HTTP 429Too many requests. Retry with exponential backoff.HTTP 500The server failed. Retry transient failures with exponential backoff.
Fix parameter, permission or authorization errors before retrying. If task creation times out, query existing tasks first and do not submit duplicates after an interrupted poll.
Last updated · 2026-11-16