Sam 3d Objects
Playground
Try it on WavespeedAI!Advanced SAM 3D objects generation model for creating detailed 3D object models from images with text prompts and optional mask-based segmentation. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.
Features
WaveSpeedAI SAM 3D Objects Image-to-3D
SAM 3D Objects (wavespeed-ai/sam-3d-objects) is a SAM-powered image-to-3D model that converts a single image into a 3D object asset. It’s designed for practical 3D pipelines where you want a fast way to turn product photos, props, or simple objects into editable 3D geometry.
For better isolation in complex scenes, you can optionally provide mask images to guide segmentation and get cleaner, more stable reconstructions.
Key capabilities
- Image-to-3D object reconstruction from a single input image
- Optional mask-guided segmentation to isolate a target object from cluttered backgrounds
- Prompt-guided generation (optional) to nudge style/interpretation when the image is ambiguous
- Stable, iterative workflow (generate → tweak mask/prompt → re-run) for asset refinement
- Pipeline-friendly outputs returned as downloadable URLs (exact 3D format depends on endpoint configuration)
- Best results on single, clearly visible objects with minimal occlusion
Parameters and how to use
- image: (required) Input image URL for 3D object generation.
- prompt: Text prompt to guide 3D object generation.
- mask_images: Optional array of mask image URLs for specific region processing.
Prompt
Use prompt when the image alone leaves too much ambiguity (shape, material, or category). Keep it short and concrete:
- Name the object and any critical parts: “leather handbag with a gold clasp”
- If needed, add material/finish hints: “matte ceramic”, “glossy plastic”
- Avoid long, story-like prompts—this model is primarily driven by the input image.
Media (Images)
Input image (image)
- Provide a direct, accessible URL to the image.
- If your image is local, upload it first.
Mask images (mask_images, optional)
- Provide one or more mask image URLs (uploaded the same way as
image). - Critical: the mask must match the input image size and framing exactly.
- Keep masks tight to the object silhouette for cleaner geometry.
- If you don’t need multi-region control, start with a single mask.
Note: The docs don’t mandate specific mask color conventions (white/black). If you see unexpected results, try a clean binary mask and iterate.
Other parameters
-
mask_images
- Type: array of URLs
- What it does: constrains processing to the masked region(s), helping isolate the target object.
- Recommended: provide only what you need; start with one well-aligned mask.
-
prompt
- Type: string
- What it does: nudges generation when the image is ambiguous.
- Recommended: short, object-focused hints (object name + material/finish if helpful).
After you finish configuring the parameters, click Run, preview the result, and iterate if needed.
Pricing
$0.02 per run
Notes
- Avoid heavy occlusions (hands covering the object, overlapping items). Occlusion often causes broken or unstable geometry.
- Mask alignment matters more than prompt quality. If results look “melted” or include background artifacts, fix the mask first.
- The API is asynchronous: submit a task, then fetch the final asset URLs from the result endpoint when the status is
completed.
Related Models
- SAM 3D Body – Similar workflow, tuned for reconstructing human bodies from images with optional mask guidance.
- Hyper3D Rodin v2 (Image-to-3D) – Image-to-3D model focused on production-ready assets (clean meshes with UVs/textures).
- Tripo3D v2.5 (Image-to-3D) – Strong single-image reconstruction with controls geared toward edit-friendly outputs.
- Tencent Hunyuan3D v2.1 – A higher-level 3D asset creation system for broader 3D workflows.
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-objects" \
--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 object generation. | |
| prompt | string | No | - | Text prompt to guide 3D object generation. | |
| mask_images | array | No | - | - | Optional array of mask image URLs 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 |