API Endpoints
Task Status
Since 3D generation is a computationally intensive process, the Triverse API operates asynchronously. When you create a task, the API returns a task_uuid immediately. You must then check the status of this task to know when it's finished.
Query Task Status
Retrieves the current state, progress, and output of a specific task.
Endpoint
GET /tasks/{task_uuid}
Response Structure
| Field | Type | Description |
|---|---|---|
status | String | Current state: PENDING, RUNNING, SUCCESS, FAILED, CANCELLED. |
progress | Integer | Completion percentage (0-100). |
input | Object | Snapshot of the parameters used to create the task. |
output | Object | Results of the task (e.g., model URLs, preview images). |
Example Response
{
"code": 0,
"message": "success",
"data": {
"taskId": "92483a80-236c-4889-9a95-4c90bb64dfd8",
"status": "RUNNING",
"output": {
"geometry_job_status": "COMPLETED",
"texture_job_status": "IN_PROGRESS",
"preprocessed_image_url": ["https://.../input.png"]
}
}
}Task Lifecycle
- PENDING: The task is in the queue waiting for an available worker.
- RUNNING: A worker has picked up the task and is currently processing it.
- SUCCESS: The task completed successfully. Assets are now available for download.
- FAILED: An error occurred during processing. Check the error message for details.
- CANCELLED: The task was manually cancelled by the user or system.
Polling vs. WebSockets
While you can poll this endpoint every few seconds to check for updates, we highly recommend using WebSockets for real-time notifications. WebSockets are more efficient and provide a better experience for your users.