Sam 3d Body

Sam 3d Body

Playground

Try it on WaveSpeedAI!

Advanced SAM 3D body generation model for creating detailed 3D human body models from images with optional mask-based segmentation. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.

Features

SAM 3D Body (wavespeed-ai/sam-3d-body) generates a 3D human body asset from a single input image, with an optional mask to isolate the body region. It’s designed for practical pipelines where you want fast, repeatable 3D body reconstruction from photos and screenshots.

You provide the source image (and optionally a mask image). The API returns output URL(s) for the generated 3D result.

Key capabilities

  • Single-image 3D human body generation from an input image URL.
  • Optional mask-guided subject isolation via mask_image for cleaner results when the background is busy.
  • Simple, minimal input surface (just image, plus optional mask_image)—easy to plug into automation.
  • Asynchronous job workflow with task status (created / processing / completed / failed) and output URLs when finished.
  • Production-style response payloads including timing info and NSFW flags in the result metadata.

Parameters and how to use

  • image: (required) Input image URL for 3D body generation.
  • mask_image: Optional mask image URL to constrain processing to a specific region (typically the body).

Prompt

This model is image-conditioned and does not accept a text prompt. Your “instruction” is primarily the image content (and optional mask_image).

Media (Images)

Input

  • image must be a publicly accessible URL when calling the REST API.
  • For best results, use a clear full-body subject (minimal occlusion, good lighting, sharp edges).
  • Avoid heavy motion blur, extreme fisheye distortion, or large cut-offs (missing limbs / cropped torso).

Optional mask

  • mask_image should match the same framing and dimensions as image.

  • Use the mask when:

  • the background is cluttered,

  • multiple people appear,

  • the body boundary is ambiguous (similar colors, low contrast).

Other parameters

mask_image

  • When to use: Improve subject isolation and reduce background leakage into the reconstruction.
  • What to send: A mask image URL aligned to image (commonly a binary or high-contrast foreground mask).

After you finish configuring the parameters, click Run, preview the result, and iterate if needed.

Pricing

$0.02 per run

Notes

  • Best input = best 3D. A well-lit, centered, full-body image will generally outperform a busy, low-contrast scene.
  • Use mask_image as a control knob. If the output includes background artifacts or misses body parts, add a mask and re-run.
  • Expect iteration for hard cases. Complex poses, heavy occlusions (arms crossing torso), and multiple overlapping people often need a cleaner source image or a tighter mask.
  • SAM 3D Objects – Same SAM-style workflow, optimized for single-object reconstruction (with optional mask guidance).
  • Hunyuan3D V3 Image-To-3D – Higher-end general image-to-3D model for detailed assets and textures.
  • Tencent Hunyuan3D V2 Multi-View – Multi-view reconstruction when you can provide multiple angles for better geometry.
  • Tencent Hunyuan3D v2.1 – General-purpose image-to-3D pipeline geared for scalable asset workflows and richer outputs.

Authentication

For authentication details, please refer to the Authentication Guide.

API Endpoints

Submit Task & Query Result

set -euo pipefail

export WAVESPEED_API_KEY="your-api-key"

REQUEST_BODY=$(cat <<'JSON'
{
  "image": "https://interactive-examples.mdn.mozilla.net/media/cc0-images/painted-hand-298-332.jpg"
}
JSON
)

# 1. Submit the prediction.
SUBMIT_RESPONSE=$(curl --silent --show-error --fail-with-body \
  -X POST "https://api.wavespeed.ai/api/v3/wavespeed-ai/sam-3d-body" \
  -H "Authorization: Bearer ${WAVESPEED_API_KEY}" \
  -H "Content-Type: application/json" \
  -d "${REQUEST_BODY}")

TASK=$(printf '%s' "${SUBMIT_RESPONSE}" | jq 'if type == "object" and has("data") then .data else . end')
PREDICTION_ID=$(printf '%s' "${TASK}" | jq -r '.id // empty')
if [ -z "${PREDICTION_ID}" ]; then
  printf 'Submission response did not contain a prediction id
' >&2
  exit 1
fi
RESULT_URL=$(printf '%s' "${TASK}" | jq -r '.urls.get // empty')
if [ -z "${RESULT_URL}" ]; then RESULT_URL="https://api.wavespeed.ai/api/v3/predictions/${PREDICTION_ID}/result"; fi

# 2. Poll until the prediction finishes.
while true; do
  RESPONSE=$(curl --silent --show-error --fail-with-body \
    "${RESULT_URL}" \
    -H "Authorization: Bearer ${WAVESPEED_API_KEY}")
  RESULT=$(printf '%s' "${RESPONSE}" | jq 'if type == "object" and has("data") then .data else . end')
  STATUS=$(printf '%s' "${RESULT}" | jq -r '.status // empty')

  case "${STATUS}" in
    completed) printf '%s\n' "${RESULT}" | jq '.outputs'; break ;;
    failed|cancelled|timeout) printf '%s\n' "${RESULT}" | jq . >&2; exit 1 ;;
    created|processing) sleep 2 ;;
    *) printf 'Unexpected status: %s
' "${STATUS}" >&2; exit 1 ;;
  esac
done

Parameters

Task Submission Parameters

Request Parameters

ParameterTypeRequiredDefaultRangeDescription
imagestringYes-Input image URL for 3D body generation or segmentation.
mask_imagestringNo-Optional mask image URL for specific region processing.

Response Parameters

ParameterTypeDescription
codeintegerHTTP status code (e.g., 200 for success)
messagestringStatus message (e.g., “success”)
data.idstringUnique identifier for the prediction, Task Id
data.modelstringModel ID used for the prediction
data.outputsarrayOutput values, usually URL strings; some models return text strings or structured result objects (empty when status is not completed)
data.urlsobjectObject containing related API endpoints
data.urls.getstringURL to retrieve the prediction result
data.statusstringStatus of the task: created, processing, completed, or failed
data.created_atstringISO timestamp of when the request was created (e.g., “2023-04-01T12:34:56.789Z”)
data.errorstringError message (empty if no error occurred)
data.timingsobjectObject containing timing details
data.timings.inferenceintegerInference time in milliseconds

Result Request Parameters

ParameterTypeRequiredDefaultDescription
idstringYes-Task ID

Result Response Parameters

ParameterTypeDescription
codeintegerHTTP status code (e.g., 200 for success)
messagestringStatus message (e.g., “success”)
dataobjectThe prediction data object containing all details
data.idstringUnique identifier for the prediction
data.modelstringModel ID used for the prediction
data.outputsarray<string | object>Array of generated outputs (empty when status is not completed). Items are usually URL strings, but may be text strings or structured result objects, depending on the model.
data.urlsobjectObject containing related API endpoints
data.urls.getstringURL to poll for the prediction result
data.statusstringStatus: created, processing, completed, or failed
data.created_atstringISO timestamp of when the request was created
data.errorstringError message (empty if no error occurred)
data.timingsobjectObject containing timing details
data.timings.inferenceintegerInference time in milliseconds
© 2026 WaveSpeedAI. All rights reserved.