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
WaveSpeedAI SAM 3D Body Image-to-3D
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_imagefor cleaner results when the background is busy. - Simple, minimal input surface (just
image, plus optionalmask_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
imagemust 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_imageshould match the same framing and dimensions asimage. -
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_imageas 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.
Related Models
- 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
# Submit the task
curl --location --request POST "https://api.wavespeed.ai/api/v3/wavespeed-ai/sam-3d-body" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer ${WAVESPEED_API_KEY}" \
--data-raw '{}'
# Get the result
curl --location --request GET "https://api.wavespeed.ai/api/v3/predictions/${requestId}/result" \
--header "Authorization: Bearer ${WAVESPEED_API_KEY}"
Parameters
Task Submission Parameters
Request Parameters
| Parameter | Type | Required | Default | Range | Description |
|---|---|---|---|---|---|
| image | string | Yes | - | Input image URL for 3D body generation or segmentation. | |
| mask_image | string | No | - | Optional mask image URL for specific region processing. |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | integer | HTTP status code (e.g., 200 for success) |
| message | string | Status message (e.g., “success”) |
| data.id | string | Unique identifier for the prediction, Task Id |
| data.model | string | Model ID used for the prediction |
| data.outputs | array | Array of URLs to the generated content (empty when status is not completed) |
| data.urls | object | Object containing related API endpoints |
| data.urls.get | string | URL to retrieve the prediction result |
| data.has_nsfw_contents | array | Array of boolean values indicating NSFW detection for each output |
| data.status | string | Status of the task: created, processing, completed, or failed |
| data.created_at | string | ISO timestamp of when the request was created (e.g., “2023-04-01T12:34:56.789Z”) |
| data.error | string | Error message (empty if no error occurred) |
| data.timings | object | Object containing timing details |
| data.timings.inference | integer | Inference time in milliseconds |
Result Request Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| id | string | Yes | - | Task ID |
Result Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | integer | HTTP status code (e.g., 200 for success) |
| message | string | Status message (e.g., “success”) |
| data | object | The prediction data object containing all details |
| data.id | string | Unique identifier for the prediction, the ID of the prediction to get |
| data.model | string | Model ID used for the prediction |
| data.outputs | string | Array of URLs to the generated content (empty when status is not completed). |
| data.urls | object | Object containing related API endpoints |
| data.urls.get | string | URL to retrieve the prediction result |
| data.status | string | Status of the task: created, processing, completed, or failed |
| data.created_at | string | ISO timestamp of when the request was created (e.g., “2023-04-01T12:34:56.789Z”) |
| data.error | string | Error message (empty if no error occurred) |
| data.timings | object | Object containing timing details |
| data.timings.inference | integer | Inference time in milliseconds |