跳转到内容

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/developers/models/sam-3/3d-body.md. 所有模型和指南: https://doitong.com/developers/llms.txt