# Segment Anything Model 3 image to image fal AI sam

Needs image url.

Segment Anything Model 3, served by fal.ai. $0.005 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" and that request_id. The exact endpoint/request billing receipt is required before settlement.

- Tool ID: `fal/fal-ai-sam-3-image`
- Name in the catalog: Segment Anything Model 3, image to image
- Provider: [fal.ai](/providers/fal.md)
- Capability: [AI image generation](/tools/image-generation.md)
- Price: $0.005 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.005
}
```

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

## 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/image)

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

---

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