SAM image encoder API

MAE-initialized ViT-B/L/H image encoder of Segment Anything. Its dense features are distilled into Theia and RADIO.

Live$0.02 per 1,000 callsGet an API key

Call SAM image encoder

Send one request with your API key. The response comes back in the same call. See the API reference for every field.

import os, requests res = requests.post(  "https://api.openrobotics.dev/v1/embed",  headers={"Authorization": f"Bearer {os.environ['OPENROBOTICS_API_KEY']}"},  json={    "model": "meta/sam-encoder",    "image": "<base64 JPEG or PNG>",  },).json()res["embedding"]        # unit-length float vector

GPUs start on demand. If SAM image encoder hasn't been called for a while, the first request returns 503 with a Retry-After header while it boots (usually a few minutes, never billed).

Guides about SAM image encoder

DINOv3 vs DINOv2: features, licenses and retrieval
Compare DINOv2 and DINOv3, distinguish dense features from pooled API vectors, and test same-space image retrieval with offline Python.
Physical AI explained: the open model stack for robots
What physical AI (embodied AI) means, the five kinds of models a robot uses, from perception to VLAs and world models, and open examples of each.

SAM image encoder FAQ

How do I run SAM image encoder without my own GPU?
Call POST /v1/embed on the OpenRobotics API with "model": "meta/sam-encoder". We run SAM image encoder on cloud GPUs that start on demand, so there is nothing to install or host.
How much does the SAM image encoder API cost?
$0.02 per 1,000 calls, billed only for successful calls. Pay with prepaid credits or monthly pay-as-you-go.
What license does SAM image encoder use?
The weights we serve (facebook/sam-vit-huge) are released under Apache-2.0. Check the license for your use case.
Is SAM image encoder open source?
SAM image encoder's weights are publicly available under Apache-2.0. OpenRobotics serves them behind an API so you can use the model without hosting it.

Run SAM image encoder with one API call

Create a key, send POST /v1/embed with "model": "meta/sam-encoder", and pay $0.02 per 1,000 calls.

Get an API keyRead the /v1/embed referenceBrowse vision encoders