## Basic model info - Model name: tripo/tripo tripo-v2.5 - Model description: API for the TripoSR 3D model generation service. - Endpoint name: image-to-3d ## Model schema The model schema is defined in the OpenAPI schema: [OpenAPI Schema](https://oapi.sunra.ai/main/tripo/tripo-v2.5/latest.json) ### Model input schema The model input schema is: ```json { "properties": { "seed": { "description": "Random seed for reproducibility", "maximum": 2147483647, "minimum": 0, "title": "Seed", "type": "integer", "x-sr-order": 201 }, "auto_size": { "default": false, "description": "Automatically scale the model to real-world dimensions (in meters).", "title": "Auto Size", "type": "boolean", "x-sr-order": 405 }, "face_limit": { "anyOf": [ { "maximum": 100000, "minimum": 1, "type": "integer" }, { "type": "null" } ], "description": "Maximum number of faces in the generated mesh. If not set, the face limit will be adaptively determined.", "title": "Face Limit", "x-sr-order": 407 }, "image": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "string" } ], "description": "Image URL for 3D model generation", "title": "Image", "x-sr-order": 301 }, "orientation": { "default": "default", "description": "Set 'align_image' to automatically rotate the model to align with the original image.", "enum": [ "default", "align_image" ], "title": "Orientation", "type": "string", "x-sr-order": 404 }, "pbr": { "default": false, "description": "Enable PBR (physically based rendering) materials. When enabled, texture is forced to be applied.", "title": "Pbr", "type": "boolean", "x-sr-order": 402 }, "quad": { "default": false, "description": "Enable quad topology (+$0.05)", "title": "Quad", "type": "boolean", "x-sr-order": 406 }, "texture_alignment": { "default": "original_image", "description": "Determines the prioritization of texture alignment in the 3D model.", "enum": [ "original_image", "geometry" ], "title": "Texture Alignment", "type": "string", "x-sr-order": 403 }, "texture_quality": { "default": "standard", "description": "Texture quality. 'none' for geometry only, 'standard' for standard textures, 'hd' for HD textures.", "enum": [ "none", "standard", "hd" ], "title": "Texture Quality", "type": "string", "x-sr-order": 401 }, "texture_seed": { "anyOf": [ { "maximum": 2147483647, "minimum": 0, "type": "integer" }, { "type": "null" } ], "description": "Random seed for texture generation. Using the same seed produces identical textures.", "title": "Texture Seed", "x-sr-order": 202 } }, "required": [ "image" ], "title": "ImageTo3DInput", "type": "object" } ``` ### Model output schema The model output schema is: ```json { "properties": { "base_model": { "anyOf": [ { "properties": { "content_type": { "description": "The mime type of the file.", "title": "Content Type", "type": "string" }, "file_name": { "description": "The name of the file. It will be auto-generated if not provided.", "title": "File Name", "type": "string" }, "file_size": { "description": "The size of the file in bytes.", "title": "File Size", "type": "integer" }, "url": { "description": "The URL where the file can be downloaded from.", "title": "Url", "type": "string" } }, "required": [ "content_type", "file_name", "file_size", "url" ], "title": "SunraFile", "type": "object" }, { "type": "null" } ], "description": "Generated base 3D model mesh file" }, "model_mesh": { "anyOf": [ { "properties": { "content_type": { "description": "The mime type of the file.", "title": "Content Type", "type": "string" }, "file_name": { "description": "The name of the file. It will be auto-generated if not provided.", "title": "File Name", "type": "string" }, "file_size": { "description": "The size of the file in bytes.", "title": "File Size", "type": "integer" }, "url": { "description": "The URL where the file can be downloaded from.", "title": "Url", "type": "string" } }, "required": [ "content_type", "file_name", "file_size", "url" ], "title": "SunraFile", "type": "object" }, { "type": "null" } ], "description": "Generated 3D model mesh file" }, "pbr_model": { "anyOf": [ { "properties": { "content_type": { "description": "The mime type of the file.", "title": "Content Type", "type": "string" }, "file_name": { "description": "The name of the file. It will be auto-generated if not provided.", "title": "File Name", "type": "string" }, "file_size": { "description": "The size of the file in bytes.", "title": "File Size", "type": "integer" }, "url": { "description": "The URL where the file can be downloaded from.", "title": "Url", "type": "string" } }, "required": [ "content_type", "file_name", "file_size", "url" ], "title": "SunraFile", "type": "object" }, { "type": "null" } ], "description": "Generated PBR 3D model mesh file" }, "rendered_image": { "anyOf": [ { "properties": { "content_type": { "description": "The mime type of the file.", "title": "Content Type", "type": "string" }, "file_name": { "description": "The name of the file. It will be auto-generated if not provided.", "title": "File Name", "type": "string" }, "file_size": { "description": "The size of the file in bytes.", "title": "File Size", "type": "integer" }, "url": { "description": "The URL where the file can be downloaded from.", "title": "Url", "type": "string" } }, "required": [ "content_type", "file_name", "file_size", "url" ], "title": "SunraFile", "type": "object" }, { "type": "null" } ], "description": "A preview image of the model" } }, "title": "TripoModelOutput", "type": "object" } ``` ## Example inputs and outputs Use the following example inputs and outputs to understand the model. ### Input example ```json { "seed": null, "auto_size": false, "face_limit": null, "image": "", "orientation": "default", "pbr": false, "quad": false, "texture_alignment": "original_image", "texture_quality": "standard", "texture_seed": null } ``` ### Output example ```json { } ``` ## Model code examples ### JavaScript ```javascript import { sunra } from "@sunra/client"; const result = await sunra.subscribe("tripo/tripo-v2.5/image-to-3d", { input: { image: '', texture_quality: 'standard', pbr: false, texture_alignment: 'original_image', orientation: 'default', auto_size: false, quad: false, face_limit: null, texture_seed: null, seed: null }, logs: true, onQueueUpdate: (update) => { console.log(`Status Update: ${update.status}, Request ID: ${update.request_id}`); }, }); console.log(result.data); console.log(result.requestId); ``` ### Python ```python import sunra_client result = sunra_client.subscribe( "tripo/tripo-v2.5/image-to-3d", arguments={ "image": "", "texture_quality": "standard", "pbr": False, "texture_alignment": "original_image", "orientation": "default", "auto_size": False, "quad": False, "face_limit": None, "texture_seed": None, "seed": None }, with_logs=True, on_enqueue=print, on_queue_update=print, ) print(result) ``` ### Java ```java import ai.sunra.client.*; import java.util.Map; import com.google.gson.JsonObject; var client = SunraClient.withEnvCredentials(); var response = client.subscribe( "tripo/tripo-v2.5/image-to-3d", SubscribeOptions.builder() .input(Map.of( "image", "", "texture_quality", "standard", "pbr", false, "texture_alignment", "original_image", "orientation", "default", "auto_size", false, "quad", false, "face_limit", null, "texture_seed", null, "seed", null)) .resultType(JsonObject.class) .onQueueUpdate(update -> System.out.printf( "\nStatus Update: %s, Request ID: %s%n", update.getStatus(), update.getRequestId() )) .logs(true) .build() ); System.out.println("Completed!"); System.out.println(response.getData()); ``` ### Kotlin ```kotlin import ai.sunra.client.kt.* import com.google.gson.JsonObject val client = createSunraClient() val response = client.subscribe( endpointId = "tripo/tripo-v2.5/image-to-3d", input = mapOf( "image" to "", "texture_quality" to "standard", "pbr" to false, "texture_alignment" to "original_image", "orientation" to "default", "auto_size" to false, "quad" to false, "face_limit" to null, "texture_seed" to null, "seed" to null), options = ai.sunra.client.kt.SubscribeOptions(logs = true), onUpdate = { update -> println("\nStatus Update: ${update.status}, Request ID: ${update.requestId}") } ) println("Completed!") println(response.data) ``` ### Curl ```bash curl --request POST \ --url https://api.sunra.ai/v1/queue/tripo/tripo-v2.5/image-to-3d \ --header "Authorization: Key $SUNRA_KEY" \ --header "Content-Type: application/json" \ --data '{"image":"","texture_quality":"standard","pbr":false,"texture_alignment":"original_image","orientation":"default","auto_size":false,"quad":false,"face_limit":null,"texture_seed":null,"seed":null}' ``` ## Model readme undefined