[Integrations](https://spiral.ai/integrations) › [Zapier](https://spiral.ai/integrations/zapier) › [SAM 3.1 Image to RLE](https://spiral.ai/integrations/zapier/sam-3-1-image-to-rle)

# How to Use SAM 3.1 Image to RLE in Zapier

SAM 3.1 Image to RLE finds objects in an existing image and returns their segmentation masks as RLE data. It fits annotation pipelines and editing tools that need object selections they can process.

|  |  |
| --- | --- |
| Model | SAM 3.1 Image to RLE |
| Available through | fal |
| Category | Image |
| Price | $0.013 per run at the default inputs. |
| Returns | image |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with SAM 3.1 Image to RLE in Zapier

- Each morning, use SAM 3.1 Image to RLE on new product photos in the incoming image collection with the description 'handbag.' Prepare mask previews for approval before any background removal.
- Every Friday, use SAM 3.1 Image to RLE to select 'bicycle' in new images from the annotation queue. Keep objects separate and prepare a review sheet with the original images and mask overlays.
- Each evening, use SAM 3.1 Image to RLE to prepare 'face' selections in new event photos. Queue the images for redaction review and retain the originals.
- Every Monday, use SAM 3.1 Image to RLE to select 'chair' in newly submitted room photos. Organize the individual mask previews by source image for the design team to review.
- Each morning, use SAM 3.1 Image to RLE to select 'license plate' in new vehicle photos. Prepare overlays for human review before a separate pixelation step.

## How to set up SAM 3.1 Image to RLE in Zapier

Pick the way that suits you. Each takes about two minutes.

### Use the Spiral skill

1. **Send Zapier this message**: Your agent reads Spiral's skill and sets itself up.

```
set up https://spiral.ai/SKILL.md
```

2. **Sign in or paste a key**: Approve Spiral in the browser, or give the agent a key from the console.

### Use Spiral's MCP server

1. **Add an MCP Client connection**: In Zapier open Apps, click Add connection and search for MCP Client. Fill in the form:

```text
https://api.spiral.ai/mcp
```

2. **Sign in to Spiral and approve**: Spiral opens: sign in, pick the organization and click Authorize. No API key. Spiral gives the connection its own key; Zapier never sees it, and you can remove it under Settings › Connected apps in the console.

3. **Run a Spiral tool in a Zap**: Add an MCP Client step to a Zap and choose the Run Tool action with your Spiral connection. Pick a tool: `discover` finds the right model for a task, `estimate_cost` prices it and `run` runs it. For example, `run` with:

```json
{
  "provider": "fal",
  "model": "fal-ai/flux/schnell",
  "input": { "prompt": "a lighthouse at dawn" },
  "wait": true
}
```

4. **Run SAM 3.1 Image to RLE in a workflow step**: Give the step an instruction like the ones below and run it on your trigger or schedule. Spiral finds SAM 3.1 Image to RLE, prices it and runs it each time the step fires.

### Use the Spiral CLI

1. **Install and sign in**: Installs the Spiral CLI, signs you in and adds its skill to your coding agents.

```bash
npx -y spiral-cli@latest init
```

### Call the Spiral API

1. **Create an API key**: In the console, under API keys.

2. **Run SAM 3.1 Image to RLE**: One request; the result comes back by polling or a webhook.

```bash
curl https://api.spiral.ai/v1/runs \
  -H "Authorization: Bearer $SPIRAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "provider": "fal",
    "model": "fal-ai/sam-3-1/image-rle",
    "input": {
      "image_url": "https://raw.githubusercontent.com/facebookresearch/segment-anything-2/main/notebooks/images/truck.jpg"
    }
  }'
```

Then paste one of the prompts above: Zapier finds SAM 3.1 Image to RLE on Spiral, shows the price and runs it.

Setup guide in the docs: https://spiral.ai/docs/quickstarts/zapier

## SAM 3.1 Image to RLE tools and prices

- [Sam 3 1 · Image to RLE](https://spiral.ai/tools/fal/fal-ai/sam-3-1/image-rle) (fal): $0.013 per run at the default inputs.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| prompt |  | wheel | Text prompt for segmentation |
| point_prompts |  | [] | List of point prompts |
| box_prompts |  | [] | Box prompt coordinates (x_min, y_min, x_max, y_max). Multiple boxes supported - use object_id to group boxes for the same object or leave empty for separate objects. |
| apply_mask |  | true | Apply the mask on the image. |
| output_format | jpeg, png, webp | png | The format of the generated image. |
| return_multiple_masks |  | false | If True, upload and return multiple generated masks as defined by `max_masks`. |

## What can you do with SAM 3.1 Image to RLE in Zapier?

Prepare object masks from recurring image batches for later review. A scheduled agent can reuse short descriptions with SAM 3.1 and organize the selections into a consistent review queue.

### Prepare product cutouts

Use SAM 3.1 Image to RLE to select a product in a photograph, then pass the decoded mask to an editor for background removal. Review the selection before exporting the cutout.

### Draft dataset annotations

Generate object masks from short category labels with SAM 3.1 Image to RLE. Present each selection for review before adding it to a training dataset.

### Prepare selective photo edits

Select an object with SAM 3.1 Image to RLE, then use its mask in a separate editing step to recolor, blur, or highlight that region.

### Prepare privacy redactions

Find faces, license plates, or screens with SAM 3.1 Image to RLE. Apply pixelation in an editor and inspect the full image for missed regions before sharing.

### Separate objects for a collage

Request individual object selections from SAM 3.1 Image to RLE, then turn reviewed masks into cutouts for a collage or presentation.

### Build an interactive selection tool

Let a person describe an object, inspect the mask, and refine the selection with points. Use SAM 3.1 Image to RLE for segmentation and application code for previews and editing.

## Overview

- [fal](https://spiral.ai/providers/fal)
- [All Zapier guides](https://spiral.ai/integrations/zapier)

## SAM 3.1 Image to RLE in other agents

- [Amp](https://spiral.ai/integrations/amp/sam-3-1-image-to-rle)
- [ChatGPT](https://spiral.ai/integrations/chatgpt/sam-3-1-image-to-rle)
- [Claude](https://spiral.ai/integrations/claude-desktop/sam-3-1-image-to-rle)
- [Claude Code](https://spiral.ai/integrations/claude-code/sam-3-1-image-to-rle)
- [Cline](https://spiral.ai/integrations/cline/sam-3-1-image-to-rle)
- [Codex](https://spiral.ai/integrations/codex/sam-3-1-image-to-rle)
- [Cursor](https://spiral.ai/integrations/cursor/sam-3-1-image-to-rle)
- [Devin](https://spiral.ai/integrations/devin/sam-3-1-image-to-rle)
- [dots](https://spiral.ai/integrations/dots/sam-3-1-image-to-rle)
- [Factory Droid](https://spiral.ai/integrations/factory-droid/sam-3-1-image-to-rle)
- [Gemini](https://spiral.ai/integrations/gemini/sam-3-1-image-to-rle)
- [Gemini CLI](https://spiral.ai/integrations/gemini-cli/sam-3-1-image-to-rle)
- [Google Antigravity](https://spiral.ai/integrations/antigravity/sam-3-1-image-to-rle)
- [goose](https://spiral.ai/integrations/goose/sam-3-1-image-to-rle)
- [Grok](https://spiral.ai/integrations/grok/sam-3-1-image-to-rle)
- [Grok Build](https://spiral.ai/integrations/grok-build/sam-3-1-image-to-rle)
- [Hermes](https://spiral.ai/integrations/hermes/sam-3-1-image-to-rle)
- [Instinct](https://spiral.ai/integrations/instinct/sam-3-1-image-to-rle)
- [Manus](https://spiral.ai/integrations/manus/sam-3-1-image-to-rle)
- [Muse](https://spiral.ai/integrations/muse/sam-3-1-image-to-rle)
- [Muse Code](https://spiral.ai/integrations/muse-code/sam-3-1-image-to-rle)
- [n8n](https://spiral.ai/integrations/n8n/sam-3-1-image-to-rle)
- [Notion](https://spiral.ai/integrations/notion/sam-3-1-image-to-rle)
- [OpenClaw](https://spiral.ai/integrations/openclaw/sam-3-1-image-to-rle)
- [opencode](https://spiral.ai/integrations/opencode/sam-3-1-image-to-rle)
- [Perplexity](https://spiral.ai/integrations/perplexity/sam-3-1-image-to-rle)
- [Raycast](https://spiral.ai/integrations/raycast/sam-3-1-image-to-rle)
- [VS Code](https://spiral.ai/integrations/vscode/sam-3-1-image-to-rle)
- [Windsurf](https://spiral.ai/integrations/windsurf/sam-3-1-image-to-rle)

## More Zapier guides

- [SAM 3.1 Image](https://spiral.ai/integrations/zapier/sam-3-1-image)
- [Sana](https://spiral.ai/integrations/zapier/sana)
- [SAM 3 Image](https://spiral.ai/integrations/zapier/sam-3-image)
- [Sana 1.5 1.6B](https://spiral.ai/integrations/zapier/sana-1-5-1-6b)
- [RunDiffusion Photo Flux](https://spiral.ai/integrations/zapier/rundiffusion-photo-flux)
- [Sana 1.5 4.8B](https://spiral.ai/integrations/zapier/sana-1-5-4-8b)

## Questions about SAM 3.1 Image to RLE in Zapier

**Can Zapier use SAM 3.1 Image to RLE?**

Yes. Add Spiral to Zapier as an MCP server, and Zapier can find and run SAM 3.1 Image to RLE like any built-in tool.

**How much does SAM 3.1 Image to RLE cost in Zapier?**

$0.013 per run at the default inputs. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your Zapier plan is separate.

**Do I need a fal account to use SAM 3.1 Image to RLE in Zapier?**

No. Spiral runs SAM 3.1 Image to RLE on its own fal account. You sign in to Spiral once and never paste a key.

**How long does it take to set up SAM 3.1 Image to RLE in Zapier?**

About two minutes: add an MCP Client connection, then sign in to Spiral and approve, then run a Spiral tool in a Zap.

**Does Zapier wait while SAM 3.1 Image to RLE runs?**

SAM 3.1 Image to RLE runs in the background. Zapier starts the run, checks on it and gives you the image when it's ready.

**What does SAM 3.1 Image to RLE produce?**

It returns object segmentation masks encoded with run-length encoding, or RLE. An agent can use that mask data in an annotation tool or decode it to prepare an editing selection.

**How should I describe the object I want?**

Start with a short noun phrase such as "wheel," "red umbrella," or "hardcover book." Keep the request focused on an object and one or two useful attributes.

**Can I ask for an object by its position or relationship to other objects?**

Long referring expressions exceed the documented direct prompting scope. Have the agent identify the intended object first, then use a short description or a visual selection to guide segmentation.

**Can SAM 3.1 select several objects of the same kind?**

Concept segmentation is designed to find all instances matching a description. Request separate masks when your next step needs individual objects, then review the selections for missed or unwanted matches.

**How can I correct a selection?**

Use point guidance to refine the intended object. Keep points associated with the same object identifier when they should update one selection.

