API reference · trellis

trellis/trellis-2/retexture

Integrate this model through SandBase's unified API, with production-ready schemas and examples.

IMAGEAsyncOpen model
Production endpoint

Send your first request

OpenAI-compatible endpoint with unified authentication and usage tracking.

POSThttps://api.sandbase.ai/v1/run
Model IDtrellis/trellis-2/retexture
01

Input Schema

11 parameters · 1 required · 10 optional

ParameterTypeRequiredDescription
imagestringRequiredURL of the reference image for texturing
seedintegerOptionalRandom seed for reproducibility
mesh_urlstringOptionalURL of the untextured 3D mesh to retexture. Supports GLB, OBJ, PLY, and STL formats.
resolutionintegerOptionalInternal resolution for texture generation. Higher produces finer texture details but is slower. · Options: 512, 1024 · Default: 1024
5121024
texture_sizeintegerOptionalResolution of the texture image baked onto the mesh. Higher values capture finer surface details but produce larger files. · Options: 1024, 2048, 4096 · Default: 2048
102420484096
tex_slat_rescale_tnumberOptionalControls noise schedule sharpness for texture generation. Higher values produce sharper texture details. · Min: 1 · Max: 6 · Default: 3
tex_slat_sampling_stepsintegerOptionalNumber of denoising steps for texture generation. More steps = slower but potentially cleaner textures. · Min: 1 · Max: 50 · Default: 12
tex_slat_guidance_rescalenumberOptionalDampens artifacts from high guidance in the texture stage. Increase if textures look noisy or have color banding. · Min: 0 · Max: 1 · Default: 0
tex_slat_guidance_strengthnumberOptionalHow closely the texture follows the input image colors. Higher values produce more vivid but potentially oversaturated textures. · Min: 0 · Max: 10 · Default: 1
tex_slat_guidance_interval_endnumberOptionalFraction of the denoising process at which classifier-free guidance ends for the texture stage. Must be >= tex_slat_guidance_interval_start. · Min: 0 · Max: 1 · Default: 0.9
tex_slat_guidance_interval_startnumberOptionalFraction of the denoising process at which classifier-free guidance starts for the texture stage. Guidance is only applied between interval_start and interval_end. · Min: 0 · Max: 1 · Default: 0.6
02

Output Schema

FieldTypeDescription
idstringUnique identifier for the generation task
statusstringTask status: pending, running, completed, failed, timeout
modelstringModel used for the generation
outputsarrayArray of output items
outputs[].urlstringURL of the generated artifact
outputs[].content_typestringMIME type (e.g. image/png, video/mp4)
errorobject | nullError details if failed, null on success
error.typestringMachine-readable error type code
error.messagestringHuman-readable error description

Async Workflow

This model uses asynchronous execution. Submit a request and poll for the result.

  1. Submit — POST to /v1/run, receive an id
  2. Poll — GET /v1/run/{id} until status is completed, failed, or timeout
  3. Retrieve — Read outputs from the completed response
03

Code Examples

Ready-to-run snippets

# Step 1: Submit
curl -X POST https://api.sandbase.ai/v1/run \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
  "model": "trellis/trellis-2/retexture",
  "image": "https://static.sandbase.ai/examples/trellis/trellis-2/retexture/input_image_1.png",
  "mesh_url": "https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Assets/main/Models/ClearCoatCarPaint/glTF-Binary/ClearCoatCarPaint.glb",
  "resolution": 1024,
  "texture_size": 2048,
  "tex_slat_rescale_t": 3,
  "tex_slat_sampling_steps": 12,
  "tex_slat_guidance_rescale": 0,
  "tex_slat_guidance_strength": 1,
  "tex_slat_guidance_interval_end": 0.9,
  "tex_slat_guidance_interval_start": 0.6,
  "prompt": "a beautiful sunset over mountains"
}'

# Step 2: Poll result (replace <id>)
curl https://api.sandbase.ai/v1/run/<id> \
  -H "Authorization: Bearer YOUR_API_KEY"