MiniMax H3 Task Query API Integration Guide
This document introduces the integration and use of the MiniMax H3 Task Query API. This API is used to query, list in batches, or delete asynchronous tasks created by the MiniMax H3 Video Generation API.
¶ Application Process
To use the MiniMax H3 Task Query API, first obtain your API Token from the Ace Data Cloud Console and keep it for later use.

If you have not yet logged in or registered, you will be automatically redirected to the login page to register and log in. Once completed, you will be automatically returned to the current page.
A general application's API Key can be used for services enabled for the account; a dedicated application's Key can be used within that application's service scope. Please check the Key's permissions, validity period, and limits, and confirm that the application balance is sufficient to pay for this request. Available trial credits are subject to what is displayed in your account. If the balance is insufficient, click the "Top Up" button.
📘 Full documentation: MiniMax H3 Task Query API →
When querying a task, use the same Token that was used to create it. It is recommended to save the Token as an environment variable rather than writing it into source code or committing it to a repository:
export ACEDATACLOUD_API_KEY="YOUR_API_KEY"
¶ API Overview
- Base URL:
https://api.acedata.cloud - Endpoint:
POST /minimax/tasks - Authentication: Include
authorization: Bearer {token}in the HTTP Header - Request headers:
accept: application/jsoncontent-type: application/json
- Query a single task:
action=retrieve, passing inid - Query tasks in batches:
action=retrieve_batch, with filtering by task ID, time range, and pagination conditions - Delete a task:
action=delete, passing inid - Billing: Task queries are free and do not incur duplicate charges
You must save the task_id after creating a video. It is recommended to query approximately every 10 seconds until the task reaches a terminal state.
¶ Request Parameters
| Parameter | Type | Required | Applicable actions | Description |
|---|---|---|---|---|
action |
string | No | All | retrieve, retrieve_batch, or delete; defaults to retrieve |
id |
string | Conditionally required | retrieve, delete |
Single task ID |
ids |
string[] | No | retrieve_batch |
Returns only the specified task IDs; if omitted, lists tasks by other conditions |
limit |
integer | No | retrieve_batch |
Maximum number of tasks to return in this request |
offset |
integer | No | retrieve_batch |
Number of tasks to skip in the result list, used for pagination |
created_at_min |
number | No | retrieve_batch |
Lower bound of creation time, Unix timestamp in seconds |
created_at_max |
number | No | retrieve_batch |
Upper bound of creation time, Unix timestamp in seconds |
The purposes of the three actions are as follows:
action |
Purpose | Required parameters | Response structure |
|---|---|---|---|
retrieve |
Query the status and result of one task | id |
{ "task": {...} } |
retrieve_batch |
Query tasks in batches by task ID, time, and pagination conditions | Optional ids, time range, offset, limit |
{ "items": [...], "total": number } |
delete |
Cancel or delete a task record based on its current status | id |
{ "id": "...", "deleted": true } |
¶ Query a Single Task
curl -X POST 'https://api.acedata.cloud/minimax/tasks' \
-H "Authorization: Bearer $ACEDATACLOUD_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"action": "retrieve",
"id": "f5977217-ed2c-40da-adbe-93d08235618f"
}'
Below is the response from a real successful task:
{
"task": {
"id": "f5977217-ed2c-40da-adbe-93d08235618f",
"model": "MiniMax-H3",
"status": "succeeded",
"created_at": 1786184658,
"updated_at": 1786184758,
"content": {
"url": "https://cdn.acedata.cloud/assets/examples/minimax/f5977217-ed2c-40da-adbe-93d08235618f-b080c998dde2.mp4"
},
"resolution": "768P",
"duration": 4,
"usage": {
"total_seconds": 4,
"input_seconds": 0,
"output_seconds": 4,
"input_image_count": 0
},
"ratio": "16:9",
"task_type": "generation",
"modality": "video"
}
}
Open the real video result of this task
¶ Task Status
status |
Meaning | Client handling |
|---|---|---|
queued |
Queued, waiting to run | Continue polling |
running |
Generation in progress | Continue polling |
succeeded |
Generation succeeded | Read task.content.url and stop polling |
failed |
Generation failed | Read task.error and stop polling |
cancelled |
Task cancelled | Stop polling |
succeeded, failed, and cancelled are all terminal states. Do not continue polling after a task reaches a terminal state.
¶ task Response Fields
| Field | Type | Description |
|---|---|---|
id |
string | Task ID |
model |
string | Model used by the task, currently MiniMax-H3 |
status |
string | Current task status |
error.code |
string | Failure error code, returned only on failure |
error.message |
string | Reason for failure, returned only on failure |
created_at |
integer | Creation time, Unix timestamp in seconds |
updated_at |
integer | Most recent status update time, Unix timestamp in seconds |
content.url |
string | Video URL after success |
resolution |
string | Output resolution, 768P or 2K |
duration |
integer | Output video duration in seconds |
usage.total_seconds |
integer | Total billable amount, equal to the sum of input and output video seconds |
usage.input_seconds |
integer | Billable amount generated by reference video input |
usage.output_seconds |
integer | Billable amount generated by output video |
usage.input_image_count |
integer | Number of input images in billing statistics |
ratio |
string | Actual output aspect ratio; when using adaptive, the result here is authoritative |
task_type |
string | generation for video generation tasks |
modality |
string | video for video tasks |
¶ Complete Python Polling Example
The following code reads the Token from an environment variable and queries the task every 10 seconds after creating it:
import os
import time
import requests
BASE_URL = "https://api.acedata.cloud"
HEADERS = {
"Authorization": f"Bearer {os.environ['ACEDATACLOUD_API_KEY']}",
"Content-Type": "application/json",
}
create_response = requests.post(
f"{BASE_URL}/minimax/videos",
headers=HEADERS,
json={
"model": "MiniMax-H3",
"content": [
{
"type": "text",
"text": "清晨的海边,一艘白色帆船驶过平静海面,镜头缓慢横移",
}
],
"resolution": "768P",
"duration": 4,
"ratio": "16:9",
},
timeout=30,
)
create_response.raise_for_status()
task_id = create_response.json()["task_id"]
while True:
time.sleep(10)
query_response = requests.post(
f"{BASE_URL}/minimax/tasks",
headers=HEADERS,
json={"action": "retrieve", "id": task_id},
timeout=30,
)
query_response.raise_for_status()
task = query_response.json()["task"]
print(f"task={task_id} status={task['status']}")
if task["status"] == "succeeded":
print(f"video_url={task['content']['url']}")
break
if task["status"] in ("failed", "cancelled"):
raise RuntimeError(task.get("error") or task["status"])
In production, set an overall timeout for polling and use exponential backoff for 429 and temporary 5xx responses. A network timeout does not mean generation has failed; you can continue querying using the same task_id.
¶ Batch Query
Specify multiple task IDs:
curl -X POST 'https://api.acedata.cloud/minimax/tasks' \
-H "Authorization: Bearer $ACEDATACLOUD_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"action": "retrieve_batch",
"ids": ["TASK_ID_1", "TASK_ID_2"],
"offset": 0,
"limit": 20
}'
List tasks by time range with pagination:
{
"action": "retrieve_batch",
"created_at_min": 1786000000,
"created_at_max": 1786200000,
"offset": 0,
"limit": 20
}
The items in the batch response use the same task fields as a single-task query, and total is the total number of tasks matching the filter criteria:
{
"items": [
{
"id": "TASK_ID_1",
"model": "MiniMax-H3",
"status": "running",
"resolution": "2K",
"duration": 5,
"ratio": "adaptive",
"task_type": "generation",
"modality": "video"
}
],
"total": 1
}
The task query window is the most recent 7 days. A task_id outside this window may return an invalid task; business systems should save the ID when creating a task and promptly persist the result URL after success.
¶ Cancel or Delete a Task
curl -X POST 'https://api.acedata.cloud/minimax/tasks' \
-H "Authorization: Bearer $ACEDATACLOUD_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"action": "delete",
"id": "YOUR_TASK_ID"
}'
The action depends on the task's current status:
| Current status | Behavior |
|---|---|
queued |
Cancel a task that has not started |
succeeded |
Delete the task record |
failed |
Delete the task record |
running |
Deletion or cancellation is not allowed; an error is returned |
cancelled |
Repeated operations are not allowed; an error is returned |
Example of successful deletion:
{
"id": "YOUR_TASK_ID",
"deleted": true
}
Deleting a task record does not reverse charges already incurred, nor does it guarantee that saved copies of the video are also deleted.
¶ Failure Responses and Troubleshooting
A failed task still returns a task object with HTTP 200 and provides the reason in task.error:
{
"task": {
"id": "YOUR_TASK_ID",
"model": "MiniMax-H3",
"status": "failed",
"error": {
"code": "1026",
"message": "video description contains sensitive content"
},
"task_type": "generation",
"modality": "video"
}
}
When the API itself returns 400, check action and the condition parameters; 401 means the Token is invalid, 429 means queries are too frequent, and 500 means the service is temporarily unavailable. Tasks that fail to generate are not charged; usage for successful tasks is recorded according to the final usage.
