API Endpoints
Texturing
Apply high-quality textures to existing 3D geometry. Whether you have a mesh generated by Triverse or an external model, you can use images or text prompts to define its appearance.
Image-Based Texturing
Apply textures to a geometric model using a reference image.
Endpoint
POST /tasks/texture-model
Request Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
image_file | String | Required | Reference image (file_key or URL). |
model_file | String | Required | Target geometry (file_key or URL). |
model_version | String | v2 | AI model version. |
texture_size | Integer | 1024 | Resolution of the generated texture. |
Example Request
cURL
curl -X 'POST' \
'https://api.triverse.ai/api/v1/tasks/texture-model' \
-H 'accept: application/json' \
-H 'Authorization: Bearer <YOUR_API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"image_file": "tasks/uid_64e96053-76ab-4e9c-bd82-2def925b53bc/20250805/texture_ref.png",
"model_file": "https://triverse-public.oss-cn-beijing.aliyuncs.com/tasks/2025-08-05/20/model.glb",
"polygon_limit": 1000000,
"texture_size": 1024
}'JavaScript
const response = await fetch(
"https://api.triverse.ai/api/v1/tasks/texture-model",
{
method: "POST",
headers: {
Accept: "application/json",
Authorization: "Bearer <YOUR_API_KEY>",
"Content-Type": "application/json",
},
body: JSON.stringify({
image_file:
"tasks/uid_64e96053-76ab-4e9c-bd82-2def925b53bc/20250805/texture_ref.png",
model_file:
"https://triverse-public.oss-cn-beijing.aliyuncs.com/tasks/2025-08-05/20/model.glb",
polygon_limit: 1000000,
texture_size: 1024,
}),
},
);
const data = await response.json();
console.log(data);Python
import requests
response = requests.post(
"https://api.triverse.ai/api/v1/tasks/texture-model",
headers={
"Accept": "application/json",
"Authorization": "Bearer <YOUR_API_KEY>",
},
json={
"image_file": "tasks/uid_64e96053-76ab-4e9c-bd82-2def925b53bc/20250805/texture_ref.png",
"model_file": "https://triverse-public.oss-cn-beijing.aliyuncs.com/tasks/2025-08-05/20/model.glb",
"polygon_limit": 1000000,
"texture_size": 1024,
},
)
print(response.json())text-[16px]d Texturing
Define the texture of an existing model using only a text prompt.
Endpoint
POST /tasks/text-to-texture
Request Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
text_prompt | String | Required | Description of the desired texture. |
model_url | String | Required | Public URL of the geometric model. |
model_version | String | v2 | AI model version. |
texture_size | Integer | 1024 | Resolution of the generated texture. |
Note: For
text-to-texture, themodel_urlmust be a publicly accessible URL. You can use the Presigned Download URL endpoint to generate one if needed.
Example Request
cURL
curl -X 'POST' \
'https://api.triverse.ai/api/v1/tasks/text-to-texture' \
-H 'accept: application/json' \
-H 'Authorization: Bearer <YOUR_API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"text_prompt": "a stylized leather texture with visible stitches",
"model_url": "https://triverse-public.oss-cn-beijing.aliyuncs.com/tasks/2025-08-05/20/geometry_model.glb",
"model_version": "v2",
"polygon_limit": 1000000,
"texture_size": 1024
}'JavaScript
const response = await fetch(
"https://api.triverse.ai/api/v1/tasks/text-to-texture",
{
method: "POST",
headers: {
Accept: "application/json",
Authorization: "Bearer <YOUR_API_KEY>",
"Content-Type": "application/json",
},
body: JSON.stringify({
text_prompt: "a stylized leather texture with visible stitches",
model_url:
"https://triverse-public.oss-cn-beijing.aliyuncs.com/tasks/2025-08-05/20/geometry_model.glb",
model_version: "v2",
polygon_limit: 1000000,
texture_size: 1024,
}),
},
);
const data = await response.json();
console.log(data);Python
import requests
response = requests.post(
"https://api.triverse.ai/api/v1/tasks/text-to-texture",
headers={
"Accept": "application/json",
"Authorization": "Bearer <YOUR_API_KEY>",
},
json={
"text_prompt": "a stylized leather texture with visible stitches",
"model_url": "https://triverse-public.oss-cn-beijing.aliyuncs.com/tasks/2025-08-05/20/geometry_model.glb",
"model_version": "v2",
"polygon_limit": 1000000,
"texture_size": 1024,
},
)
print(response.json())