跳至內容

Sam 3 · 3D Body

整合

模型 id sam-3/3d-body
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/sam-3/3d-body?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "image": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

此請求: ≈$0.02 20 API 點數 在此頁面執行

取得 API 金鑰
Meta · 3D

您的第一個結果會顯示在這裡

在下方建立請求,並使用您的 API 金鑰執行。輸出會複製到我們的儲存空間,可永久保留或免費保留 7 天。

建立請求

控制項是根據模型結構描述生成的。變更設定時,程式碼和價格會同步更新。

•必填 image_url
拖放檔案,或

顯示人類的圖像 URL。

進階 mask · export_meshes · include_3d_keypoints · include_mhr_params
mask_url
拖放檔案,或

選用的二進位遮罩圖像 URL,可取代自動人類偵測並提供自動邊界框計算所需的資料。請以白色表示人物,黑色表示背景。

POST /run/sam-3/3d-body?wait=20 報價 → $0.02
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/sam-3/3d-body?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "image": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

執行此請求

您的金鑰會保留在此瀏覽器中:只會傳送至 Doitong API,且只有在勾選「記住」時才會儲存至 localStorage。 取得 API 金鑰

關於 Sam 3 · 3D Body

建立影像中人物的 3D 人體網格。系統會自動偵測人物,或可在 `mask_url` 傳入二元遮罩(人物為白色)。切換選項可控制每人 .ply 匯出、GLB 中的 3D 關鍵點標記,以及中繼資料中的完整 MHR 參數集。回傳 GLB、網格、中繼資料及視覺化影像。

參數

請傳送標準名稱或原生名稱其中之一,不要同時傳送兩者。 標準名稱

名稱類型 預設值允許值 說明
image_url必填 image
類型url · image
顯示人類的圖像 URL。
mask_url選填 mask
類型url · image
選用的二進位遮罩圖像 URL,可取代自動人類偵測並提供自動邊界框計算所需的資料。請以白色表示人物,黑色表示背景。
export_meshes選填
類型boolean
預設值true
是否為每個人物匯出獨立的 .ply 網格檔案。
include_3d_keypoints選填
類型boolean
預設值true
是否在 GLB 網格中加入球形 3D 關鍵點標記以供視覺化。
include_mhr_params選填
類型boolean
預設值true
每個人物的回應中繼資料是否包含完整的 MHR (Meta Human Representation) 資料,或僅包含相機參數和關鍵點 (`false`)。完整資料涵蓋表情和形狀、姿勢和原始姿勢、關節座標和全域旋轉,以及封裝的模型參數。
必填 標準名稱,也可使用

檔案參數接受公開的 https:// URL、最大 10 MB 的 data: URI,或上傳檔案的 file_url。 檔案

輸出

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "sam-3/3d-body",
  "status": "succeeded",
  "created_at": "2026-10-20T12:00:00Z",
  "started_at": "2026-10-20T12:00:02Z",
  "completed_at": "2026-10-20T12:00:09Z",
  "queue_position": null,
  "cost": {
    "credits": 20,
    "usd": "0.02",
    "charged": 20,
    "refunded": 0
  },
  "input": {
    "image_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
  },
  "output": {
    "model_glb": {
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
      "content_type": "image/jpeg",
      "file_name": "0-output.jpeg",
      "file_size": 1843200
    },
    "visualization": {
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
      "content_type": "image/jpeg",
      "file_name": "0-output.jpeg",
      "file_size": 1843200
    },
    "meshes": [
      {
        "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
        "content_type": "image/jpeg",
        "file_name": "0-output.jpeg",
        "file_size": 1843200
      }
    ],
    "metadata": {
      "num_people": 1,
      "people": [
        {
          "person_id": 1,
          "bbox": [],
          "focal_length": 1.0,
          "pred_cam_t": [],
          "keypoints_2d": [],
          "keypoints_3d": [],
          "shape_params": [],
          "body_pose_params": [],
          "hand_pose_params": [],
          "global_rot": [],
          "pred_global_rots": [],
          "scale_params": [],
          "expr_params": [],
          "pred_joint_coords": [],
          "mhr_model_params": [],
          "pred_pose_raw": []
        }
      ],
      "keypoint_names": [
        "string"
      ]
    }
  },
  "outputs": [
    {
      "type": "file",
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
      "content_type": "image/jpeg",
      "file_size": 1843200,
      "stored": true
    }
  ],
  "error": null,
  "metrics": {
    "inference_seconds": 6.8
  },
  "urls": {
    "self": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
您的檔案,由您選擇每個 outputs[].url 都是儲存空間中的副本:可永久保留(按 GB-月計費),或免費保留 7 天;可透過帳戶設定或 ?storage= 設定。
所有模型使用相同結構圖片、影片和音訊皆包含 type、url、content_type、width、height 和 duration。output 是模型自己的結果物件。
輸出欄位
model_glb
object {url, content_type, file_name, file_size}GLB 格式的 3D 人體網格,可選擇包含 3D 關鍵點標記。
visualization
object {url, content_type, file_name, file_size}顯示原始圖像、關鍵點、網格和側視圖的合成視覺化結果。
meshes
array of object {url, content_type, file_name, file_size} | null每個偵測人物的獨立 .ply 網格檔案,當 export_meshes 為 True 時回傳。
metadata
object {num_people, people, keypoint_names}包含相機參數和關鍵點的結構化中繼資料。

更多模型:圖像轉 3D

給 AI 代理程式:此頁面的 Markdown 位於 https://doitong.com/zh-TW/developers/models/sam-3/3d-body.md. 所有模型與指南: https://doitong.com/developers/llms.txt