The Tripo 3D model generation supports text-to-3D model, single-image-to-3D model, and multi-image-to-3D model.
Related documentation: User guide
This document applies only to the China (Beijing) region. Use an API key from this region.
Prerequisites
-
Enable the service: Go to the Alibaba Cloud Model Studio console, search for "Tripo", find the Tripo model card, and click Enable Now. In the dialog box, confirm the authorization.
-
Configure your API key: Select a region, get an API key, and then configure the API key as an environment variable.
HTTP calls
Since 3D model generation is time-consuming, the API uses an asynchronous call. The process involves two steps: create a task and then poll for the result.
Step 1: Create a task
China (Beijing): POST https://dashscope.aliyuncs.com/api/v1/services/aigc/video-generation/3d-generation
-
After the task is created, use the returned
task_idto query the result. Thetask_idis valid for 24 hours. Do not create duplicate tasks. Instead, use polling to retrieve the result. -
For guidance for beginners, see Call APIs with Postman or cURL.
Request parameters |
Text-to-3D model (textured)
Single-image-to-3D model (textured)
Multi-image-to-3D model (textured)
Multi-image-to-3D model (2 images)The image order is front, left, back, right. Pass an empty object
Untextured generationYou must set both
|
Request headers |
|
|
Content-Type The content type of the request. Must be |
|
|
Authorization Authenticates the request with a Model Studio API key. Example: Bearer sk-xxxx. |
|
|
X-DashScope-Async Enables asynchronous processing. HTTP requests support only asynchronous calls. Must be Important
If this request header is missing, the error "current user api does not support synchronous calls" is returned. |
|
Request body |
|
|
model The model name. Valid values:
|
|
|
input The model input. The |
|
|
parameters Optional parameters to control 3D model generation. |
Response parameters |
Successful responseSave the
Error responseTask creation failed. See Error codes.
|
|
output The task output information. |
|
|
request_id Unique request identifier for tracing and troubleshooting. |
|
|
code Error code. Returned only for failed requests. See Error codes. |
|
|
message Detailed error message. Returned only for failed requests. See Error codes. |
Step 2: Query the task result
China (Beijing): GET https://dashscope.aliyuncs.com/api/v1/tasks/{task_id}
-
Polling recommendation: 3D model generation takes several minutes. We recommend using a polling mechanism with a reasonable interval, such as 15 seconds, to retrieve the result.
-
Task status flow: PENDING (queued) → RUNNING (processing) → SUCCEEDED (successful) / FAILED (failed).
-
Task ID validity: The task ID is valid for 24 hours. After this period, you can no longer query the result, and the API returns the task status as
UNKNOWN. -
RPS limit: The default RPS for the query API is 20. For higher-frequency queries or event notifications, we recommend that you configure asynchronous task callbacks.
-
More operations: To query tasks in batches or cancel a task, see Manage Asynchronous Tasks.
Request parameters |
Query task resultReplace |
Request headers |
|
|
Authorization Authenticates the request with a Model Studio API key. Example: Bearer sk-xxxx. |
|
Path parameters |
|
|
task_id The ID of the task. |
Response parameters |
Task succeededTask failedWhen a task fails,
Task expiredThe
|
|
output The task output information. |
|
|
usage Usage statistics for the task. Only successful tasks are counted. |
Error messages
If an API call fails, refer to Error messages for troubleshooting.