Sam 3d Objects

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.
  • 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

ParameterTypeRequiredDefaultRangeDescription
imagestringYes-Input image URL for 3D object generation.
promptstringNo-Text prompt to guide 3D object generation.
mask_imagesarrayNo--Optional array of mask image URLs 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.outputsarrayArray of URLs to the generated content (empty when status is not completed)
data.urlsobjectObject containing related API endpoints
data.urls.getstringURL to retrieve the prediction result
data.has_nsfw_contentsarrayArray of boolean values indicating NSFW detection for each output
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, the ID of the prediction to get
data.modelstringModel ID used for the prediction
data.outputsstringArray of URLs to the generated content (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
© 2025 WaveSpeedAI. All rights reserved.