Getting Started

Getting Started

API

MCP Server

Create 3D Generation

Generate a 3D model (GLB) from one or more input images.

Async mode (recommended): Returns 202 with a task ID immediately. Poll GET /tasks/{taskId} for results.

Sync mode: Blocks for up to 55 seconds. If the task completes in time, returns the result directly. If still running, returns the task ID for polling.

Credits are deducted immediately. On failure, credits are automatically refunded.

POST
/3d/generations

Authorization

BearerAuth

AuthorizationBearer <token>

API key with tr_ prefix, sent as Bearer token

In: header

Request Body

application/json

image_url?string

Single image URL (for image-to-3d models)

Formaturi
image_urls?array<string>

Multiple image URLs (2-4) — only for models with multi-view capability

Items2 <= items <= 4
prompt?string

Text prompt (required for text-to-3d models like tripo-text)

Lengthlength <= 2000
model*string

Public model alias

Value in"trellis2" | "trellis2-multiview" | "tripo" | "tripo-multiview" | "hunyuan3d" | "tripo-text"
mode?string

sync waits up to 55s; async returns immediately

Default"async"
Value in"sync" | "async"

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://trellis2.app/api/v1/3d/generations" \  -H "Content-Type: application/json" \  -d '{    "image_url": "https://example.com/chair.jpg",    "model": "trellis2",    "mode": "async"  }'

{
  "id": "task_abc123",
  "object": "3d.generation",
  "status": "completed",
  "created": 1723000000,
  "completed_at": 1723000060,
  "data": {
    "model_url": "https://r2.example.com/model.glb",
    "format": "glb",
    "model": "trellis2"
  },
  "usage": {
    "credits_consumed": 10,
    "credits_remaining": 990
  }
}

{
  "id": "task_abc123",
  "object": "task",
  "status": "pending",
  "created": 1723000000,
  "data": null
}
{
  "error": {
    "message": "string",
    "type": "string",
    "code": "string",
    "param": "string"
  }
}
{
  "error": {
    "message": "string",
    "type": "string",
    "code": "string",
    "param": "string"
  }
}
{
  "error": {
    "message": "string",
    "type": "string",
    "code": "string",
    "param": "string"
  }
}
{
  "error": {
    "message": "string",
    "type": "string",
    "code": "string",
    "param": "string"
  }
}
curl -X POST "https://trellis2.app/api/v1/3d/generations" \
  -H "Content-Type: application/json" \
  -d '{
    "image_url": "https://example.com/chair.jpg",
    "model": "trellis2",
    "mode": "async"
  }'