Skip to content

Sam 3 · 3D Align

Integrate

Model id sam-3/3d-align
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.ru/v1/run/sam-3/3d-align?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",
    "body_mesh_url": "https://example.com/your-file.glb"
  }'

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

This request: ≈$0.02 20 API credits · ≈ ₽2.11 Run it on this page

Get API key
Meta 3D #align#3d

Aligns a SAM 3D body mesh to the scene of the source photo, optionally combining it with an object mesh

Meta · 3D

Your first result goes here

Build a request below and run it with your API key. Outputs are copied to our storage, kept forever or 7 days for free.

Build a request

Controls are generated from the model schema. The code and the price update as you change them.

•required image_url
Drop a file, or

Source image URL for depth estimation with MoGe.

•required

Mesh URL for alignment, accepting a SAM-3D Body file in .ply or .glb format.

Advanced body_mask_url · object_mesh_url · focal_length
Drop a file, or

Human mask image URL; omitting it uses the entire image.

Optional mesh URL for a SAM-3D Object in .glb format, used to build a combined scene.

Focal length override sourced from SAM-3D Body metadata, with MoGe estimation used if no value is supplied.

POST /run/sam-3/3d-align?wait=20 quote → $0.02
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.ru/v1/run/sam-3/3d-align?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",
    "body_mesh_url": "https://example.com/your-file.glb"
  }'

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

Run this request

Your key stays in this browser: it is sent only to the Doitong API and saved (localStorage) only if you tick Remember. Get an API key

About Sam 3 · 3D Align

Places a human body mesh (.ply or .glb) into the coordinate space of the original photo, using depth estimation from `image_url`. Optional inputs are a human mask, a focal length value, and an object mesh (.glb) that yields a combined scene file. Outputs include aligned meshes in PLY and GLB, alignment metadata and an overlay visualization.

Parameters

Send either the canonical name or the native name, not both. Canonical names

NameType DefaultAllowed Description
image_urlrequired image
Typeurl · image
Source image URL for depth estimation with MoGe.
body_mesh_urlrequired
Typestring
Mesh URL for alignment, accepting a SAM-3D Body file in .ply or .glb format.
body_mask_urloptional
Typeurl · image
Human mask image URL; omitting it uses the entire image.
object_mesh_urloptional
Typestring | null
Optional mesh URL for a SAM-3D Object in .glb format, used to build a combined scene.
focal_lengthoptional
Typenumber | null
Focal length override sourced from SAM-3D Body metadata, with MoGe estimation used if no value is supplied.
required Canonical name, also accepted

File parameters take a public https:// URL, a data: URI up to 10 MB, or the file_url of an upload. Files

Output

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "sam-3/3d-align",
  "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",
    "body_mesh_url": "https://example.com/your-file.glb"
  },
  "output": {
    "body_mesh_ply": {
      "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
    },
    "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
    },
    "metadata": {
      "person_id": 1,
      "scale_factor": 1.0,
      "translation": [
        1.0
      ],
      "focal_length": 1.0,
      "target_points_count": 1,
      "cropped_vertices_count": 1
    },
    "scene_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
    }
  },
  "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.ru/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.ru/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
Your files, your choiceEvery outputs[].url is a copy on our storage: kept forever (paid per GB-month) or 7 days for free, by your account setting or ?storage=.
Same shape on every modeltype, url, content_type, width, height and duration, for images, video and audio alike. output is the model’s own result object.
Fields of output
body_mesh_ply
object {url, content_type, file_name, file_size}PLY file containing the aligned body mesh.
model_glb
object {url, content_type, file_name, file_size}GLB file containing the aligned body mesh for 3D preview.
visualization
object {url, content_type, file_name, file_size}Input image visualization with the aligned mesh superimposed.
metadata
object {person_id, scale_factor, translation, focal_length, target_points_count, cropped_vertices_count}Alignment details, such as scale and translation.
scene_glb
object {url, content_type, file_name, file_size} | nullGLB output available only with object_mesh_url supplied; it contains both body and object meshes together in one scene.

More models: 3D

For AI agents: this page as Markdown is at https://doitong.com/en-US/developers/models/sam-3/3d-align.md. All models and guides: https://doitong.com/developers/llms.txt