Giảm 50% mô hình Vidu Q3 & Q3 Pro · Chỉ trên WaveSpeedAI | 20/5 – 2/6

SAM3 Video RLE

wavespeed-ai /

SAM 3 Video RLE is a unified foundation model for prompt-based segmentation in video. Track and segment objects across frames using text, points, or boxes, returning RLE encoded masks for efficient processing. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.

video-to-text
Input

Kéo & thả hoặc nhấp để tải lên

Whether to apply mask to video

Idle

{
  "rle_url": "https://d2p7pge43lyniu.cloudfront.net/output/2a4b36a7-77c5-4b7c-9c42-d28eef15705c-u1_b5159ba1-08a2-4e29-9dd9-66a30506fa42_rle.json",
  "video_url": "https://d2p7pge43lyniu.cloudfront.net/output/2a4b36a7-77c5-4b7c-9c42-d28eef15705c-u1_f517c2b2-1e6c-4c63-b432-de43b9fb2e1f.mp4"
}

$0.05per run·~20 / $1

ExamplesView all

the man

the product

the man

the woman

Related Models

README

SAM3 Video Segmentation RLE

SAM3 Video Segmentation RLE is an advanced video segmentation model based on Meta's Segment Anything Model 3. It tracks and segments objects across video frames and returns masks in RLE (Run-Length Encoding) format — ideal for programmatic processing, automated pipelines, and integration with downstream workflows.

Why Choose This?

  • Video object tracking Segment and track objects consistently across all video frames.

  • RLE output format Returns compact Run-Length Encoded mask data for efficient storage and processing.

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

  • Multi-object tracking Track multiple objects using comma-separated prompts (e.g., "person, cloth").

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

  • Optional mask visualization Toggle apply_mask to preview segmentation on the video.

Parameters

ParameterRequiredDescription
videoYesSource video to segment (upload or URL)
promptYesText description of the object(s) to segment
point_promptsNoPoint coordinates to identify the target object
box_promptsNoBounding box coordinates to identify the target object
apply_maskNoApply mask overlay to the video output

How to Use

  1. Upload your video — drag and drop or paste a URL.
  2. Write your prompt — describe the object(s) to track (e.g., "the man", "person, cloth").
  3. Add point/box prompts (optional) — click "+ Add Item" for precise targeting.
  4. Enable apply_mask (optional) — check to visualize masks on the video.
  5. Run — submit and receive RLE-encoded segmentation data.

Output Format

The model returns RLE (Run-Length Encoding) data for each frame in JSON format, enabling efficient programmatic processing.

Decoding RLE in Python

from pycocotools import mask as mask_utils

rle_data = {"counts": "146301 3 147834 11...", "size": [height, width]}
binary_mask = mask_utils.decode(rle_data) # Returns numpy array

Pricing

DurationCost
Per 5 seconds$0.05
1 minute$0.60
5 minutes$3.00
10 minutes$6.00

Billing Rules

  • Rate: $0.05 per 5 seconds
  • Minimum charge: 5 seconds
  • Maximum duration: 10 minutes (600 seconds)
  • Billed duration: Video length rounded up in 5-second units

Best Use Cases

  • Video Annotation — Generate frame-by-frame segmentation masks for training data.
  • Object Tracking Pipelines — Integrate tracking data into automated workflows.
  • Video Editing Automation — Extract masks for programmatic video processing.
  • Computer Vision — Track objects across frames for CV applications.
  • VFX Pipelines — Generate rotoscoping masks for visual effects work.

Pro Tips

  • Use comma-separated prompts to track multiple objects (e.g., "person, car, dog").
  • Use this model when you need programmatic access to frame-by-frame mask data.
  • Use SAM3 Video if you need direct video output.
  • RLE format is compatible with pycocotools for easy decoding.
  • Combine text prompts with point/box prompts for more accurate tracking.

Notes

  • Maximum video duration is 10 minutes per job.
  • Output is RLE-encoded JSON data, not a video file.
  • For longer videos, split into segments and process separately.
  • Use pycocotools or similar libraries to decode RLE data.

Related Models

Accessibility:This website uses AI models provided by third parties.

Sam3 Video Rle API — Quick start

Grab a WaveSpeedAI API key, then call POST https://api.wavespeed.ai/api/v3/wavespeed-ai/sam3-video-rle 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 Video Rle below.

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

# 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-video-rle", {
        "prompt": "A cinematic shot of a city at sunset, soft golden light",
        "video": "https://example.com/your-input.mp4",
        "apply_mask": true
});

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

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

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

Sam3 Video Rle API — Frequently asked questions

What is the Sam3 Video Rle API?

Sam3 Video Rle is a WaveSpeedAI model for AI inference, exposed as a REST API on WaveSpeedAI. SAM 3 Video RLE is a unified foundation model for prompt-based segmentation in video. Track and segment objects across frames using text, points, or boxes, returning RLE encoded masks for efficient processing. 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 Video Rle 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-video-rle.

How much does Sam3 Video Rle cost per run?

Sam3 Video Rle starts at $0.050 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 Video Rle accept?

Key inputs: `prompt`, `video`, `apply_mask`, `box_prompts`, `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-video-rle.

How long does Sam3 Video Rle take to generate?

Average end-to-end generation time on WaveSpeedAI is around 198 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 Video Rle 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.