Utilities

Sam3 ImageAPI

Harness Meta's Segment Anything 3 (SAM) framework for zero-shot, pixel-perfect object segmentation. Isolate items, generate masks, or track elements across frames using natural language or coordinate prompts.

Test in Dashboard View Docs ← All Tools

Three ways to use this tool

REST API

One POST request. Get the result back directly — as an image, video, or JSON depending on the tool.

terminal
curl -X POST https://apiai.me/api/workflow/sam3-image \
     -H "X-API-Key: YOUR_API_KEY" \
     -F "image=@input.jpg" \
     -F "mask_color=green" \
     -F "mask_only=true" \
     -F "mask_opacity=0.5" \
     -F "prompt=person" \
     -F "return_zip=false" \
     -F "save_overlay=false" \
     -F "threshold=0.5"
     --output result.mp4

Dashboard Playground

Test this tool visually before writing any code. Upload an image, set parameters, and see the result live. When it looks right, copy the auto-generated curl command and paste it into your app.

  1. Open the dashboard → API Toolbox
  2. Find Sam3 Image and click it
  3. Upload your input and adjust parameters
  4. Copy the curl command and ship
Open Dashboard →

Batch Processing

Process hundreds of images at once without writing a loop. Upload a CSV with one row per item, set your parameters, and download the results as a ZIP when they're done.

  1. Open the dashboard → Batches
  2. Select Sam3 Image
  3. Add your content and start the batch
  4. Download results ZIP when complete
Go to Batches →

Parameters

Name Required Description Default / Options
mask_color optional Color of the mask overlay. Options: 'green', 'red', 'blue', 'yellow', 'cyan', 'magenta' green
mask_only optional If True, returns a black-and-white mask image instead of an overlay on the original image true
mask_opacity optional Opacity of the mask overlay (0.0 to 1.0) 0.5
prompt optional Text prompt for segmentation person
return_zip optional If True, returns a ZIP file containing individual masks as PNGs false
save_overlay optional If True, includes the overlay image in the ZIP file false
threshold optional Confidence threshold for object detection 0.5

Ready to integrate?

Get an API key, test Sam3 Image in the dashboard, and copy the curl command.

Get API Key Full API Reference