Multicolor
Create a task, then query its result by task ID. Each endpoint defines its own authentication and parameters.
Create task
POST https://api.hitem3d.ai/open-api/v1/muilticolor/create-task Note: the create path uses muilticolor; the query path uses multicolor. The spellings differ.
Request headers
| Header | Value |
|---|---|
Authorization | Bearer <accessToken>. Use data.accessToken from Get token. |
| Content-Type | multipart/form-data (let the upload client generate the boundary) |
Request body
| Parameter | Type | Required | Parameter description |
|---|---|---|---|
mesh | file | Yes, choose either this or mesh_url | Upload one textured glb model file, up to 200 MB. |
mesh_url | string | Yes, choose either this or mesh | One publicly accessible URL of a textured glb model. The file must be at most 200 MB. |
model | string | No | Model version. Supported value: multicolor. |
number_color | int | No | Number of output colors. Defaults to 4.Values: 1–8 or 0 (max). Use 0 if you plan to edit colors later. |
min_region_faces | int | No | Merge adjacent color regions with fewer faces than this threshold. Defaults to 50.Applies only when number_color is 1–8. Must be an integer from 1 up to the face count of the final remapped GLB. |
format | int | No | One output format per task. Default: 1 (obj).1: obj2: glb3: stl (currently unsupported)4: fbx5: usdz (currently unsupported)6: 3mf |
Response body
| Field | Type | Description |
|---|---|---|
code | int | Response code as defined by this endpoint |
data.task_id | string | Task ID |
data.state | string | Returns queueing on successful creation |
msg | string | Message |
Configure a Webhook in Console to receive task notifications. You can also poll the query endpoint.
Request example
bash
curl --request POST 'https://api.hitem3d.ai/open-api/v1/muilticolor/create-task' \
--header "Authorization: Bearer $HI3D_TOKEN" \
--form 'mesh=@./textured.glb' \
--form 'model=multicolor' \
--form 'number_color=4' \
--form 'format=2'python
import os
import requests
data = {
"model": "multicolor",
"number_color": "4",
"format": "2",
}
with open("textured.glb", "rb") as file_0:
files = [
("mesh", ("textured.glb", file_0)),
]
response = requests.post(
"https://api.hitem3d.ai/open-api/v1/muilticolor/create-task",
headers={"Authorization": "Bearer " + os.environ["HI3D_TOKEN"]},
data=data,
files=files,
)
response.raise_for_status()
print(response.json())Response example
json
{
"code": 200,
"data": {
"task_id": "<TASK_ID>",
"state": "queueing"
},
"msg": "success"
}Error codes
| code | Message | Description |
|---|---|---|
| 5001001 | generate failed | Generation timed out or input parsing failed; consumed credits were returned. Check the original task and input before deciding whether to submit a new task. |
Service process → · Webhook guide → · Credit pricing →
API support:apicontact@hi3d.ai
Query task
Keep the task_id returned at submission and use the Multicolor route in Query task.
API support:apicontact@hi3d.ai