Query Video Generation Task API
Query the status of a video generation task.
Note
- Only supports querying task records from the last 7 days, with the time range [T-7 days, T), where T is the UTC timestamp (accurate to seconds) of the request initiation time.
- Video URL validity period is 24 hours. Please download or transfer in time.
- Video URLs generated by the Seedance 2.5 model have a maximum download limit of 100 times.
Request Information
| Item | Value |
|---|---|
| Request Method | GET |
| Request URL | https://ai-tokenhub.com/api/v3/contents/generations/tasks/id |
| Content-Type | application/json |
| Authentication | API Key Authentication (Bearer Token) |
Request Headers
| Field Name | Required | Description |
|---|---|---|
| Authorization | ✓ | Format: Bearer <$YOUR_API_KEY>, same API key used for task creation |
| Content-Type | ✓ | Fixed value: application/json |
Request Parameters
id string Required
The ID of the video generation task you want to query.
Note The above parameter is a Path Parameter, passed in the URL.
Response Parameters
id string
Video generation task ID.
model string
The model name and version used for the task, in the format model_name-version.
status string
Task status and related information:
queued: Queued.running: Task running.cancelled: Task cancelled, cancelled status automatically deleted after 24h (only tasks in queued status can be cancelled).succeeded: Task succeeded.failed: Task failed.expired: Task timed out.
error object / null
Error message. Returns null if task succeeds, returns error data if task fails.
Note: For the Seedance 2.5 model, in specific task types, error messages are only returned after the task has been queued and consumed.
Properties:
- error.code
string: Error code. - error.message
string: Error message.
content object
The output content of the video generation task.
Properties:
- content.video_url
string: The URL of the generated video. Valid for 24 hours, please download or transfer in time. Video URLs generated by the Seedance 2.5 model have a maximum download limit of 100 times. - content.last_frame_url
string: The URL of the video's last frame image. Valid for 24 hours, please download or transfer in time. Note: This parameter is returned when"return_last_frame": trueis set during task creation.
created_at integer
Unix timestamp (seconds) of task creation time.
updated_at integer
Unix timestamp (seconds) of the current task status update time.
draft boolean
Whether the generated video is a Draft video.
true: Current output is a Draft video.false: Current output is a normal video.
draft_task_id string
Draft video task ID. Returned when generating a formal video based on a Draft video.
duration integer
Duration of the generated video, in seconds.
Note: Only one of duration and frames will be returned. If frames is not specified during task creation, duration is returned.
frames integer
Number of frames in the generated video.
Note: Only one of duration and frames will be returned. If frames is specified during task creation, frames is returned.
framespersecond integer
Frame rate of the generated video.
generate_audio boolean
Whether the generated video contains synchronized audio.
true: The model's output video contains synchronized audio.false: The model's output video is a silent video.
output_format string
The actual format of the generated video (mp4 or mov). Seedance 2.5 return field.
priority integer
The current execution priority of the task, assigned by the system based on account and model policies. Higher values indicate higher priority.
ratio string
Aspect ratio of the generated video.
resolution string
Resolution of the generated video.
safety_identifier string
Unique identifier of the end user. If this parameter was set during task creation, the interface will return it as-is.
seed integer
The seed integer value used for this request.
service_tier string
The service tier actually used for processing the task.
tools object[]
The tools actually used by the model in this request. Not returned when no tools are used.
Properties:
- tools.type
string: The type of tool actually used.web_search: Web search tool.
execution_expires_after integer
Task timeout threshold, in seconds.
usage object
Token usage for this request.
Properties:
usage.completion_tokens
integer: The number of tokens consumed by the model for video generation, which can be used as a basis for billing reconciliation.usage.total_tokens
integer: The total number of tokens consumed in this request. Video generation models do not count input tokens; input tokens are 0, sototal_tokens=completion_tokens.usage.tool_usage
object: Tool usage information.- usage.tool_usage.web_search
integer: The actual number of times the web search tool was called, only returned when web search is enabled.
- usage.tool_usage.web_search
