Skip to content

错误说明

本指南介绍在使用 Tripo API 时请求失败会发生什么,以及应如何处理。

错误响应

当请求不成功时,Tripo API 会返回包含错误码、错误描述和建议的错误响应。你可以利用这些信息定位问题并进行修复。大多数错误信息都具有可操作性,且遵循统一的 json 结构:

json
{
  "code": 1004,
  "message": "One or more of your parameter is invalid",
  "suggestion": "Refer to the API documentation for parameter requirements"
}

在任务查询过程中,任务也可能失败,此时同样会返回错误码用于说明原因:

json
{
  "code": 0,
  "data": {
    "task_id": "916ef2cf-02e5-4bed-97f3-d8a8196f7dfc",
    "type": "text_to_model",
    "status": "failed",
    "input": {
      "prompt": "A dachshund standing on a stool.",
      "model_version": "v2.5-20250123"
    },
    "output": {},
    "progress": 100,
    "create_time": 1768888519,
    "error_code": 1001,
    "prompt": "a dog",
    "queuing_num": -1,
    "running_left_time": -1,
    "result": {}
  }
}

关注响应头中的 Trace-Id

无论请求成功还是失败,响应头中都会包含名为 X-Tripo-Trace-ID 的 UUID 字段。

该 ID 会为每次请求随机生成,建议在日志中记录,便于追踪。

发生错误时,请在反馈问题时提供该 ID,便于我们更高效排查。

响应头示例如下:

txt
HTTP/1.1 200 OK
Content-Type: application/json
X-Tripo-Trace-ID: 20516a36-f45c-4454-83c8-45877b75eac8
...

错误码列表

HTTP 状态码CodeMessageSuggestion
5001000Unknown error on sever sidePlease contact the support with request id
5001001Fatal error on server sidePlease contact the support with request id
4011002Authentication failedCheck if your credentials is valid, and ensure you set it correctly
4001003The request body is malformedRefer to the API documentation for request schema
4001004One or more of your parameter is invalidRefer to the API documentation for parameter requirements
4031005You are not allowed to access this resourceCheck if you have sufficent permission
4291007Rate limit exceeded, you've generated too many requests in a short amount of timePlease wait for a while and try again
4292000You have exceeded the limit of generationTry again later. You can also check Retry-After header.
4042001The task is not foundCheck if the task is committed by you or whether the format is correct
4002002This task type is not supportedRefer to API documentation for supported task types
4002003The image file is emptyCheck if the file is corrupted
4002004This image file type is not supportedRefer to API documentation for supported image file types
4002005The draft task is not a success taskRetry with a success draft task
4002006The original task type is not supportedRetry with a task with supported task type
4002007The original task is not a succeeded taskRetry with a succeeded task
4002008The input is rejected due to violation of content policyPlease modify your input and retry
4002009The input prompt contains invalid charactersPlease modify your input and retry
4032010You don't have enough credit to create this taskPlease purchase more credit
4002011The input task type cannot be prerigcheck without modelPlease provide a task with output containing a model
4002012The input task type is not validPlease provide a rig task
4032013The priority is invalidContact the support if you need higher priority
4002014Error occurred when auditingPlease contact us for further suggestion
4002015The version has been deprecated, please try higher versionTry higher version please
4002016The request type has been deprecatedTry other available types please
4002017The version value is validTry correct version please
4002018The model is too complex to remeshPlease try another model
4042019The file is not foundCheck uploading response to ensure if the file has uploaded successfully