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
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.
China (Beijing):
China (Beijing):
If an API call fails, refer to Error messages for troubleshooting.
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://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/services/aigc/video-generation/3d-generation
Replace {WorkspaceId} with your actual workspace ID.
- 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 parametersRequest headersContent-Typestring (Required)The content type of the request. Must be application/json.Authorization string (Required)Authenticates the request with a Model Studio API key. Example: Bearer sk-xxxx.X-DashScope-Async string (Required)Enables asynchronous processing. HTTP requests support only asynchronous calls. Must be enable.Request bodymodelstring (Required)The model name. Valid values:
object (Required)The model input. The prompt, image, and images parameters are mutually exclusive; provide only one.
Properties prompt string (Conditionally required)A text description of the desired 3D model. Required only for text-to-3D model.Multiple languages (such as Chinese and English) are supported. Each character, including Chinese characters and English letters, counts as one character. The maximum length is 1,024 characters.Example: a cute cat.image string (Conditionally required)The URL of a single image. Required only for single-image-to-3D model.Image requirements:
array[object] (Conditionally required)A list of image objects. Required only for multi-image-to-3D model.The array length is fixed at 4, corresponding to the image order: front, left, back, right. Pass an empty object {} for views you don't need. The number of valid image objects should be 2 to 4. The requirements for each image are the same as for the image parameter. The images do not need to have the same resolution or aspect ratio.Each image object contains the following fields:
object (Optional)Optional parameters to control 3D model generation.
Properties texture_quality string (Optional)The quality of the texture. A texture is an image that wraps a 3D model's surface to define its visual appearance and details.Valid values:
string (Optional)Supported model: Tripo/Tripo-H3.1.The geometric precision of the model.
boolean (Optional)Specifies whether to generate a PBR material model. Default value: true.When pbr is set to true, texturing is automatically enabled (texture is also set to true), and the result includes pbr_model_url.texture boolean (Optional)Specifies whether to generate a texture. Default value: true.To generate an untextured model, set both texture and pbr to false. The result includes base_model_url. |
|
Response parametersoutputobjectThe task output information.
Properties task_id stringThe task ID. Valid for queries for 24 hours.task_status stringThe status of the task.
Enumeration values
stringUnique request identifier for tracing and troubleshooting.code stringError code. Returned only for failed requests. See Error codes.message stringDetailed error message. Returned only for failed requests. See Error codes. |
Save the task_id to query the task status and result. |
Step 2: Query the task result
China (Beijing): GET https://{WorkspaceId}.cn-beijing.maas.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 parametersRequest headersAuthorizationstring (Required)Authenticates the request with a Model Studio API key. Example: Bearer sk-xxxx.Path parameterstask_idstring (Required)The ID of the task. |
Replace {task_id} with the task_id value returned by the previous API call. The task_id is valid for queries for 24 hours, Replace {WorkspaceId} with your actual workspace ID. |
Response parametersoutputobjectThe task output information.
Properties task_id stringThe task ID. Valid for queries for 24 hours.task_status stringThe status of the task.
Enumeration values
stringThe time when the task was submitted. format is YYYY-MM-DD HH:mm:ss.SSS.scheduled_time stringThe time when the task was executed. format is YYYY-MM-DD HH:mm:ss.SSS.end_time stringThe time when the task was completed. format is YYYY-MM-DD HH:mm:ss.SSS.resultsarrayThe generation results. This field is returned only when the task status is SUCCEEDED.
Properties pbr_model_url stringThe download URL of the PBR material model (GLB format). Returned when the request parameter pbr is true (default). The link is valid for 2 hours. Please download it promptly.base_model_url stringThe download URL of the untextured base model (GLB format). Returned when both texture and pbr are set to false. The link is valid for 2 hours. Please download it promptly.rendered_image_url stringThe URL for the rendered preview image of the 3D model. The link is valid for 2 hours. Please download it promptly.stringThe original input prompt, corresponding to the request parameter prompt.code stringError code. Returned only for failed requests. See Error codes.message stringDetailed error message. Returned only for failed requests. See Error codes.objectUsage statistics for the task. Only successful tasks are counted.
Properties 3d_task_type stringThe type of 3D model generation task.
integerThe number of generated 3D models.texture_quality stringThe texture quality.geometry_quality stringThe geometric precision. |
|