Integrating and Using the HappyHorse Tasks API
The HappyHorse Tasks API is used to query video generation or editing tasks created by the HappyHorse Videos API.
¶ Application Process
To use the HappyHorse Videos API, first go to the Ace Data Cloud Console to obtain your API Token for later use.

If you have not 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.
The API Key for a general-purpose application can be used for services enabled for the account; the Key for a dedicated application 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 shown in your account; if the balance is insufficient, click the "Recharge" button.
📘 Full documentation: HappyHorse Videos API →
¶ Request Example
The HappyHorse Tasks API can be used to query the results of the HappyHorse Videos API.
¶ Set Request Headers and Request Body
Request Headers include:
accept: Specifies that the response should be in JSON format; enterapplication/jsonhere.authorization: The key used to call the API; after applying, you can select it directly from the dropdown.
Request Body includes:
id: The ID of the task to query.action: The operation to perform on the task; enterretrievefor a single query.
¶ CURL Code Example
curl -X POST 'https://api.acedata.cloud/happyhorse/tasks' \
-H 'accept: application/json' \
-H 'authorization: Bearer {token}' \
-H 'content-type: application/json' \
-d '{
"id": "b8976e18-32dc-4718-9ed8-1ea090fcb6ea",
"action": "retrieve"
}'
¶ Response Example
After a successful request, the API will return the task details. The request field is the request body used when creating the task, and the response field is the response body returned after the task is completed, for example:
{
"id": "b8976e18-32dc-4718-9ed8-1ea090fcb6ea",
"started_at": 1769262721.823,
"finished_at": 1769262774.423,
"elapsed": 52.6,
"request": {
"action": "generate",
"model": "happyhorse-1.1-t2v",
"prompt": "A cinematic shot of a white horse running across a moonlit beach",
"resolution": "720P",
"duration": 5
},
"type": "videos",
"response": {
"success": true,
"task_id": "b8976e18-32dc-4718-9ed8-1ea090fcb6ea",
"trace_id": "fb751e1e-4705-49ea-9fd4-5024b7865ea2",
"data": [
{
"id": "1469cfc3-3004-4d9e-ab10-xxxxxx",
"video_url": "https://cdn.acedata.cloud/happyhorse/c8cbf53aa0.mp4",
"state": "succeeded",
"duration": 5,
"resolution": "720P",
"ratio": "16:9"
}
]
}
}
The fields are described as follows:
id: The ID of the generation task, used to uniquely identify this generation task.request: The request information used when creating the task.response: The task's current or final response information.created_at: The task creation time, as a Unix timestamp (seconds, floating-point).started_at: The time the task started executing, as a Unix timestamp (seconds, floating-point).finished_at: The task completion time, as a Unix timestamp (seconds, floating-point). This field is not returned when the task is incomplete.elapsed: The task execution time in seconds (floating-point, rounded to 3 decimal places). This field is not returned when the task is incomplete.
¶ Batch Query Operation
When querying task details for multiple task IDs, set action to retrieve_batch and pass an array of task IDs through ids:
curl -X POST 'https://api.acedata.cloud/happyhorse/tasks' \
-H 'accept: application/json' \
-H 'authorization: Bearer {token}' \
-H 'content-type: application/json' \
-d '{
"ids": ["b8976e18-32dc-4718-9ed8-1ea090fcb6ea"],
"action": "retrieve_batch"
}'
The returned result contains the items and count fields, where items is an array of task details and count is the number of tasks matched in this query.
