API Endpoints
Download Assets
Once a task has reached the SUCCESS status, you can retrieve the generated 3D models and other assets. Triverse provides two ways to access these files.
Get Download URL
Retrieves a direct, temporary URL for the generated asset. This is the preferred method for most applications.
Endpoint
GET /tasks/url/{task_uuid}
Response
| Field | Type | Description |
|---|---|---|
download_url | String | Direct link to download the asset. |
preview_url | String | (Optional) Link to a preview image of the model. |
kind | String | Type of asset (e.g., model, image). |
Example Request
cURL
curl -X GET \
'https://api.triverse.ai/api/v1/tasks/url/92483a80-236c-4889-9a95-4c90bb64dfd8' \
-H 'Authorization: Bearer <YOUR_API_KEY>'JavaScript
const response = await fetch(
"https://api.triverse.ai/api/v1/tasks/url/92483a80-236c-4889-9a95-4c90bb64dfd8",
{
method: "GET",
headers: {
Authorization: "Bearer <YOUR_API_KEY>",
},
}
);
const data = await response.json();
console.log(data);Python
import requests
response = requests.get(
"https://api.triverse.ai/api/v1/tasks/url/92483a80-236c-4889-9a95-4c90bb64dfd8",
headers={"Authorization": "Bearer <YOUR_API_KEY>"},
)
print(response.json())Direct Download
Downloads the asset file directly as a binary stream. This is useful for server-side scripts that need to save the file immediately.
Endpoint
GET /tasks/download/{task_uuid}
Response
- Content-Type:
application/octet-stream - Content-Disposition:
attachment; filename="{task_uuid}.glb" - Body: Binary stream of the asset.
Example (Python)
import requests
with requests.get(
"https://api.triverse.ai/api/v1/tasks/download/92483a80-236c-4889-9a95-4c90bb64dfd8",
headers={"Authorization": "Bearer <YOUR_API_KEY>"},
stream=True,
) as r:
r.raise_for_status()
with open("model.glb", "wb") as f:
for chunk in r.iter_content(chunk_size=8192):
f.write(chunk)Asset Retention
Please note that generated assets are stored temporarily. We recommend downloading and storing important assets in your own storage solution as soon as the task completes. Refer to our Pricing and Limits page for specific retention periods.