# Sam 3 1 image to image fal AI rle

Needs image url.

Sam 3 1, served by fal.ai. $0.01 per request. One submitted item is offered per call; the exact receipt determines the final charge. Asynchronous: returns a request_id; poll fal/status and fetch fal/result with model "fal-ai/sam-3-1" and that request_id. The exact endpoint/request billing receipt is required before settlement.

- Tool ID: `fal/fal-ai-sam-3-1-image-rle`
- Name in the catalog: Sam 3 1, image to image
- Provider: [fal.ai](/providers/fal.md)
- Capability: [AI image generation](/tools/image-generation.md)
- Price: $0.01 per call
- Authentication: an authorised Agentik workspace is required for execution, including zero-price tools.

## Pricing contract

The provider’s price, with no markup. Billed for measured usage.


```json
{
  "model": "per_call",
  "amountUsd": 0.01
}
```

Pricing source: [https://fal.ai/models/fal-ai/sam-3-1/image-rle/llms.txt](https://fal.ai/models/fal-ai/sam-3-1/image-rle/llms.txt). $0.01 per request. One submitted item is offered per call; the exact receipt determines the final charge..

Price verification date: 2026-11-03.

## Complete input schema


```json
{
  "type": "object",
  "properties": {
    "box_prompts": {
      "default": [],
      "description": "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.",
      "title": "Box Prompts",
      "items": {
        "properties": {
          "y_min": {
            "description": "Y Min Coordinate of the box",
            "title": "Y Min",
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "x_min": {
            "description": "X Min Coordinate of the box",
            "title": "X Min",
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "object_id": {
            "description": "Optional object identifier. Boxes sharing an object id refine the same object.",
            "title": "Object Id",
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "frame_index": {
            "description": "The frame index to interact with.",
            "title": "Frame Index",
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "x_max": {
            "description": "X Max Coordinate of the box",
            "title": "X Max",
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "y_max": {
            "description": "Y Max Coordinate of the box",
            "title": "Y Max",
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "x-fal-order-properties": [
          "x_min",
          "y_min",
          "x_max",
          "y_max",
          "object_id",
          "frame_index"
        ],
        "type": "object",
        "title": "BoxPrompt"
      },
      "type": "array"
    },
    "point_prompts": {
      "default": [],
      "description": "List of point prompts",
      "title": "Point Prompts",
      "items": {
        "properties": {
          "x": {
            "description": "X Coordinate of the prompt",
            "title": "X",
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "label": {
            "description": "1 for foreground, 0 for background",
            "title": "Label",
            "anyOf": [
              {
                "enum": [
                  0,
                  1
                ],
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "object_id": {
            "description": "Optional object identifier. Prompts sharing an object id refine the same object. When a text prompt is also given, the id selects which detected object the points refine.",
            "title": "Object Id",
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "frame_index": {
            "description": "The frame index to interact with.",
            "title": "Frame Index",
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "y": {
            "description": "Y Coordinate of the prompt",
            "title": "Y",
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "x-fal-order-properties": [
          "x",
          "y",
          "label",
          "object_id",
          "frame_index"
        ],
        "type": "object",
        "title": "PointPrompt"
      },
      "type": "array"
    },
    "output_format": {
      "enum": [
        "jpeg",
        "png",
        "webp"
      ],
      "default": "png",
      "type": "string",
      "title": "Output Format",
      "description": "The format of the generated image."
    },
    "prompt": {
      "default": "wheel",
      "type": "string",
      "title": "Prompt",
      "description": "Text prompt for segmentation"
    },
    "include_boxes": {
      "default": false,
      "description": "Whether to include bounding boxes for each mask (when available).",
      "title": "Include Boxes",
      "type": "boolean"
    },
    "return_multiple_masks": {
      "default": false,
      "description": "If True, upload and return multiple generated masks as defined by `max_masks`.",
      "title": "Return Multiple Masks",
      "type": "boolean"
    },
    "max_masks": {
      "minimum": 1,
      "default": 3,
      "maximum": 32,
      "description": "Maximum number of masks to return when `return_multiple_masks` is enabled.",
      "title": "Max Masks",
      "type": "integer"
    },
    "image_url": {
      "description": "URL of the image to be segmented",
      "title": "Image Url",
      "type": "string"
    },
    "include_scores": {
      "default": false,
      "description": "Whether to include mask confidence scores.",
      "title": "Include Scores",
      "type": "boolean"
    },
    "apply_mask": {
      "default": true,
      "description": "Apply the mask on the image.",
      "title": "Apply Mask",
      "type": "boolean"
    }
  },
  "required": [
    "image_url"
  ],
  "additionalProperties": false
}
```

## Published example

This is the provider tool’s published example. Replace example values with the user’s requested inputs, respecting the schema; do not execute an example merely to test a connection.


```json
{
  "tool_id": "fal/fal-ai-sam-3-1-image-rle",
  "input": {
    "image_url": "https://raw.githubusercontent.com/facebookresearch/segment-anything-2/main/notebooks/images/truck.jpg",
    "box_prompts": [],
    "point_prompts": [],
    "output_format": "png",
    "prompt": "wheel",
    "include_boxes": false,
    "return_multiple_masks": false,
    "max_masks": 3,
    "include_scores": false,
    "apply_mask": true
  }
}
```

## Execute and retrieve

Inspect again before execution, explain the price and obtain the required authority. Use MCP run_tool or POST /v1/run with this tool ID, valid input and an idempotency key. Save the returned run ID and follow the actual state. If Agentik answers that the tool is temporarily unavailable, do not retry it blindly; use discovery to propose an alternative.

This tool uses deferred settlement. Follow its returned task/run instructions; preserve the existing reservation until the result is reconciled.

A partial or uncertain result can still have consumed provider resources. Consult [billing](/docs/billing.md), [idempotency](/docs/idempotency.md) and [asynchronous results](/docs/async.md).

[Provider documentation](https://fal.ai/models/fal-ai/sam-3-1/image-rle)

[REST inspection](https://api.agentik.cc/v1/tools/fal/fal-ai-sam-3-1-image-rle) · [OpenAPI](/openapi.json) · [Connection guide](/connect.md)

---

[HTML page](/providers/fal/fal-ai-sam-3-1-image-rle) · [Agent index](/llms.txt)
