Skip to content

Create Task API

API Overview

Used to submit a model segmentation task and return a task ID.

ProtocolEndpointMethodAuthRequest FormatResponse Format
HTTP/open-api/v1/segmentation/create-taskPOSTTokenmultipart/form-dataapplication/json

Request Headers

ParameterValueDescription
Content-Typemultipart/form-dataData exchange format
AuthorizationTokenReplace {token} with the token you obtained

Request Body (HTTP Form Submission)

ParameterTypeRequiredDescription
meshfileYes, either with mesh_urlInput model file for segmentation.
• Format: glb, stl, obj
• Size: up to 200 MB
• Count: 1 file
mesh_urlstringYes, either with meshInput model URL for segmentation.
• Format: glb, stl, obj
• Size: up to 200 MB
• Count: 1 URL
seg_levelstringYesSegmentation granularity level.
Enum values:
low
medium (default)
high
formatintYesOutput model format.
Enum values:
1: obj
2: glb
3: stl
4: fbx
5: usdz
callback_urlstringNoCallback endpoint for task status updates. Callback uses POST and follows the same response structure as query-task. States include success and failed.

Response Body

ParameterFieldTypeDescription
code-intError code, see error code table
datatask_idstringAsynchronous task ID used to query task status and result
msg-stringDetailed error message
json
{
  "code": 200,
  "data": {
    "task_id": "segmentation_20260312_8f92ab3e1cde"
  },
  "msg": "success"
}

Error Codes

Error codes are returned in JSON structure, including code and msg.

json
{
  "code": 5001001,
  "data": {},
  "msg": "generate failed"
}
Error CodeError MessageError Description
200-Task created successfully
5001001generate failedTimeout or model parsing failed. Retry later; credits are refunded

Request Example (Shell)

shell
curl --location --request POST 'https://api.hitem3d.ai/open-api/v1/segmentation/create-task' \
--header 'Authorization: Token {{token}}' \
--form 'mesh=@"/path/to/demo.glb"' \
--form 'seg_level="medium"' \
--form 'format="2"' \
--form 'callback_url="https://client.example.com/webhook/segmentation"'