跳至內容

Sam 3 · 3D Objects

整合

模型 id sam-3/3d-objects
# 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-objects?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 天。

建立請求

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

預設 car

遮罩不存在時用於自動分割的文字,例如 'chair' 或 'lamp'。

•必填 image_url
拖放檔案,或

用於 3D 重建的圖像 URL。

進階 mask_urls · pointmap_url · detection_threshold · seed · export_textured_glb · point_prompts · box_prompts
拖放檔案,或

選用的每個物件遮罩 URL 清單。沒有遮罩時,如果有提供提示詞、point_prompts 或 box_prompts,則自動分割會使用這些提示詞;若未提供遮罩或分割提示詞,則使用整張圖像。

選用 URL,透過提供 NPY 或 NPZ 格式的外部 pointmap 或深度資料,改善 3D 重建中的深度估計。

偵測信心門檻;省略時使用模型的預設值。值的範圍為 0.1 至 1.0,較小的值會以精確度換取更多偵測結果。

用於可重現隨機生成的種子。

預設 []

遮罩不存在時用於自動分割的點提示詞。

預設 []

透過自動分割產生個別物件遮罩的框提示詞,用於 3D 重建;僅在未提供遮罩時使用。可提交多個框。

POST /run/sam-3/3d-objects?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-objects?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 Objects

將照片中的物件轉換為 3D 資產。使用 `mask_urls`、文字 `prompt`、`point_prompts` 或 `box_prompts` 選取物件;多個框會產生分開的物件。`detection_threshold` 接受 0.1 到 1,`export_textured_glb` 會烘焙紋理和 UV。輸出包括 GLB、Gaussian splat 檔案、多物件場景的個別物件檔案、中繼資料及 zip 套件。

參數

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

名稱類型 預設值允許值 說明
image_url必填 image
類型url · image
用於 3D 重建的圖像 URL。
mask_urls選填
類型url[] · image
選用的每個物件遮罩 URL 清單。沒有遮罩時,如果有提供提示詞、point_prompts 或 box_prompts,則自動分割會使用這些提示詞;若未提供遮罩或分割提示詞,則使用整張圖像。
prompt選填
類型string | null
預設值car
遮罩不存在時用於自動分割的文字,例如 'chair' 或 'lamp'。
point_prompts選填
類型object[]
預設值[]
遮罩不存在時用於自動分割的點提示詞。
point_prompts[].x選填
類型integer | null
提示詞在 X 軸上的位置。
point_prompts[].y選填
類型integer | null
提示詞在 Y 軸上的位置。
point_prompts[].label選填
類型enum
01
前景或背景標籤:1 表示前景;0 表示背景。
point_prompts[].object_id選填
類型integer | null
將用於細化單一物件的提示詞分組之選用識別碼。如果也提供文字作為提示詞,此識別碼會決定這些點要細化哪個偵測到的物件。
box_prompts選填
類型object[]
預設值[]
透過自動分割產生個別物件遮罩的框提示詞,用於 3D 重建;僅在未提供遮罩時使用。可提交多個框。
box_prompts[].x_min選填
類型integer | null
框的最小 x 座標。
box_prompts[].y_min選填
類型integer | null
框的最小 y 座標。
box_prompts[].x_max選填
類型integer | null
框的最大 X 座標。
box_prompts[].y_max選填
類型integer | null
框的最大 Y 座標。
box_prompts[].object_id選填
類型integer | null
將用於細化單一物件的框分組之選用識別碼。
seed選填
類型integer | null
用於可重現隨機生成的種子。
pointmap_url選填
類型string | null
選用 URL,透過提供 NPY 或 NPZ 格式的外部 pointmap 或深度資料,改善 3D 重建中的深度估計。
detection_threshold選填
類型number | null
0.1 – 1
偵測信心門檻;省略時使用模型的預設值。值的範圍為 0.1 至 1.0,較小的值會以精確度換取更多偵測結果。
export_textured_glb選填
類型boolean
預設值false
GLB 匯出選項:啟用此選項會以烘焙紋理和 UV 取代頂點顏色。
必填 標準名稱,也可使用

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

輸出

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "sam-3/3d-objects",
  "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": {
    "gaussian_splat": {
      "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
    },
    "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
    },
    "metadata": [
      {
        "object_index": 1,
        "scale": [
          []
        ],
        "rotation": [
          []
        ],
        "translation": [
          []
        ],
        "camera_pose": [
          []
        ]
      }
    ],
    "individual_splats": [
      {
        "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
      }
    ],
    "individual_glbs": [
      {
        "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
      }
    ],
    "artifacts_zip": {
      "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
    }
  },
  "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 是模型自己的結果物件。
輸出欄位
gaussian_splat
object {url, content_type, file_name, file_size}包含多個物件之結果的合併場景 splat,否則為單一 splat;以 .ply 格式的 Gaussian splat 檔案提供。
model_glb
object {url, content_type, file_name, file_size}以 GLB 儲存的 3D 輸出:多個物件會組合成一個場景,其他結果則包含一個網格。
metadata
array of object {object_index, scale, rotation, translation, camera_pose}每個物件的中繼資料,包括旋轉、位移和縮放。
individual_splats
array of object {url, content_type, file_name, file_size} | null每個物件的獨立 Gaussian splat 檔案,僅在包含多個物件的場景中提供。
individual_glbs
array of object {url, content_type, file_name, file_size} | null每個物件的獨立 GLB 網格檔案,僅在包含多個物件的場景中提供。
artifacts_zip
object {url, content_type, file_name, file_size} | null所有成品及中繼資料的 ZIP 封存檔。

更多模型:圖像轉 3D

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