Tripo3D 圖片生成 3D 模型

上傳一張圖片,使用 Tripo3D(H 系列)AI 自動生成可下載的 3D 模型(GLB)。

檢查 Tripo3D API 狀態...
積木轉 3D 前往 3D 島嶼

1 上傳圖片

2 生成設定

測試頁面使用說明

  1. 上傳一張主體清晰、背景乾淨的圖片(PNG / JPG / WebP,最大 20MB)。
  2. 選擇模型版本與生成設定(是否生成貼圖、PBR、面數上限)。
  3. 點「開始生成 3D 模型」,系統會建立任務並每 3 秒自動查詢進度。
  4. 完成後可在右側預覽 3D 模型、拖曳旋轉,並下載 GLB 檔。

API 使用說明

本頁透過後端代理呼叫 Tripo3D(API Key 保存在伺服器端)。流程為「建立任務 → 輪詢任務」兩步。

1. 建立任務 — POST /api/tripo3d/generate

欄位 必填 說明
image 要生成 3D 模型的圖片(也支援 file / artwork_image 欄位名)。
model 模型版本,預設 v3.0-20250812(H 系列穩定版)。
texture 1 或 0,是否生成貼圖,預設 1。
pbr 1 或 0,是否啟用 PBR 材質,預設 0。
smart_low_poly 1 或 0,是否生成乾淨低面數模型,預設 1(需 model ≥ v3.0-20250812)。
face_limit 輸出網格最大面數,預設 5000。
curl -X POST "http://34.81.2.129/face_lineart/api/tripo3d/generate" \
  -F "image=@./photo.jpg" \
  -F "model=v3.0-20250812" \
  -F "texture=1" \
  -F "pbr=0" \
  -F "smart_low_poly=1" \
  -F "face_limit=5000"
{
  "success": true,
  "message": "任務已建立,請輪詢任務狀態",
  "data": {
    "task_id": "task_abc123",
    "input_image": "/uploads/tripo_input_...",
    "model_used": "v3.0-20250812"
  }
}

2. 查詢任務 — GET /api/tripo3d/task/<task_id>

每 2~3 秒輪詢一次,status 為 queued / running / success / failed / cancelled

{
  "success": true,
  "data": {
    "task_id": "task_abc123",
    "status": "success",
    "progress": 100,
    "model_url": "https://cdn.tripo3d.ai/output/model_pbr.glb",
    "rendered_image_url": "https://cdn.tripo3d.ai/output/preview.png"
  }
}

注意:model_url 約 5 分鐘後過期,取得後請盡快下載。

3. 服務狀態 — GET /api/tripo3d/status

{ "success": true, "online": true, "provider": "tripo3d", "default_model": "v3.1-20260211" }