Скидка 50% на модели Vidu Q3 и Q3 Pro · только на WaveSpeedAI | 20 мая – 2 июня

SAM3 Image API

wavespeed-ai /

SAM 3 is a unified foundation model for promptable image segmentation using text, points, or boxes to detect and segment objects. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.

image-to-image
Ввод

Перетащите или нажмите для загрузки

preview
Whether to overlay the segmentation mask on the original image

Ожидание

the man

$0.005за запуск·~200 / $1

Далее:

ПримерыСмотреть всё

the man
the person
the woman
the man
the boat

Похожие модели

README

SAM3 Image Segmentation

SAM3 Image Segmentation is an advanced image segmentation model based on Meta's Segment Anything Model 3. It identifies and segments objects in images using flexible prompt types — text descriptions, point coordinates, or bounding boxes — delivering precise masks for any target object.

Why Choose This?

  • Multiple prompt types Segment objects using text prompts, point prompts, box prompts, or any combination.

  • Text-based segmentation Simply describe what to segment (e.g., "the man", "the car", "background").

  • Point and box prompts Precise control with coordinate-based prompts for exact object targeting.

  • Mask overlay option Optionally overlay the segmentation mask directly on the original image.

  • Prompt Enhancer Built-in tool to automatically improve your text prompts for better results.

  • Ultra-affordable Just $0.005 per image for professional-quality segmentation.

Parameters

ParameterRequiredDescription
imageYesSource image to segment (upload or URL)
promptNo*Text description of the object to segment
point_promptsNo*Point coordinates to identify the target object
box_promptsNo*Bounding box coordinates to identify the target object
apply_maskNoOverlay the segmentation mask on the original image
output_formatNoOutput format: jpeg, png, or webp (default: png)

*At least one prompt type (text, boxes, or points) must be provided.

How to Use

  1. Upload your image — drag and drop or paste a URL.
  2. Add prompts — provide at least one of the following:
  • Text prompt — describe the object to segment (e.g., "the man", "the dog").
  • Point prompts — click "+ Add Item" to add point coordinates.
  • Box prompts — click "+ Add Item" to add bounding box coordinates.
  1. Enable apply_mask (optional) — check to overlay the mask on the original image.
  2. Choose output format — select jpeg, png, or webp.
  3. Run — submit and download the segmented result.

Pricing

ItemCost
Per image$0.005

Simple flat-rate pricing regardless of image size or prompt complexity.

Best Use Cases

  • Background Removal — Segment subjects for clean background removal.
  • Object Isolation — Extract specific objects for compositing or editing.
  • Image Editing — Create precise masks for targeted edits.
  • Data Annotation — Generate segmentation masks for training datasets.
  • E-commerce — Isolate products for catalog images.

Pro Tips

  • Text prompts work best for common objects with clear descriptions.
  • Use point prompts for precise targeting when text is ambiguous.
  • Use box prompts to constrain the segmentation to a specific region.
  • Combine multiple prompt types for more accurate results.
  • Enable apply_mask to visualize the segmentation directly on the image.
  • PNG format preserves transparency for mask outputs.

Notes

  • At least one prompt type must be provided (text, points, or boxes).
  • Text prompts support natural language descriptions.
  • Point and box prompts use image coordinate systems.
  • PNG format is recommended for mask outputs to preserve transparency.

Related Models

Доступность:Этот сайт использует модели ИИ, предоставляемые третьими лицами.

Sam3 Image API — Quick start

Grab a WaveSpeedAI API key, then call POST https://api.wavespeed.ai/api/v3/wavespeed-ai/sam3-image with your input as JSON. The endpoint returns a prediction id; poll the prediction endpoint until status flips to completed, then read the output URL from data.outputs[0]. Examples for Sam3 Image below.

HTTP example
# Submit the prediction
curl -X POST "https://api.wavespeed.ai/api/v3/wavespeed-ai/sam3-image" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $WAVESPEED_API_KEY" \
  -d '{
    "image": "https://example.com/your-input.jpg",
    "prompt": "A cinematic shot of a city at sunset, soft golden light",
    "apply_mask": true,
    "output_format": "png"
}'

# Response includes a prediction id. Poll for the result:
curl -X GET "https://api.wavespeed.ai/api/v3/predictions/{request_id}/result" \
  -H "Authorization: Bearer $WAVESPEED_API_KEY"

# When status is "completed", read the output from data.outputs[0].
Node.js example
// npm install wavespeed
const WaveSpeed = require('wavespeed');

const client = new WaveSpeed(); // reads WAVESPEED_API_KEY from env

const result = await client.run("wavespeed-ai/sam3-image", {
        "image": "https://example.com/your-input.jpg",
        "prompt": "A cinematic shot of a city at sunset, soft golden light",
        "apply_mask": true,
        "output_format": "png"
});

console.log(result.outputs[0]); // → URL of the generated output
Python example
# pip install wavespeed
import wavespeed

output = wavespeed.run(
    "wavespeed-ai/sam3-image",
    {
    "image": "https://example.com/your-input.jpg",
    "prompt": "A cinematic shot of a city at sunset, soft golden light",
    "apply_mask": true,
    "output_format": "png"
}
)

print(output["outputs"][0])  # → URL of the generated output

Sam3 Image API — Frequently asked questions

What is the Sam3 Image API?

Sam3 Image is a WaveSpeedAI model for image editing, exposed as a REST API on WaveSpeedAI. SAM 3 is a unified foundation model for promptable image segmentation using text, points, or boxes to detect and segment objects. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing. You can call it programmatically or try it from the playground above.

How do I call the Sam3 Image API?

POST your input parameters to the model's REST endpoint (shown in the API tab of this playground) with your WaveSpeedAI API key in the Authorization header. Submission returns a prediction ID; poll the prediction endpoint until status flips to "completed", then read the output URL from the result. The playground generates a ready-to-paste code sample in Python, JavaScript, or cURL for whatever inputs you've set. Full request/response shape is documented at https://wavespeed.ai/docs/docs-api/wavespeed-ai/sam3-image.

How much does Sam3 Image cost per run?

Sam3 Image starts at $0.005 per run. That figure is the base price — the final charge scales with the parameters you set in the form (output size, length, count, references, or whatever knobs this model exposes), so a higher-quality or larger output costs more than a minimal one. The exact cost for your current input is shown live next to the Generate button before you submit, and the actual per-call charge is recorded on the prediction afterwards.

What inputs does Sam3 Image accept?

Key inputs: `prompt`, `image`, `apply_mask`, `box_prompts`, `output_format`, `point_prompts`. The full JSON schema (types, defaults, allowed values) is rendered above the Generate button and mirrored in the API reference at https://wavespeed.ai/docs/docs-api/wavespeed-ai/sam3-image.

How long does Sam3 Image take to generate?

Average end-to-end generation time on WaveSpeedAI is around 5 seconds per request — measured across recent runs. Queue time scales with global demand; live status is visible in the prediction record.

Can I use Sam3 Image outputs commercially?

Commercial usage rights depend on the model's license, set by its provider (WaveSpeedAI). The license summary appears on the model card above; see WaveSpeedAI's Terms of Service for platform-level conditions.