SAM 3sam3
Segmentation from text, exemplar boxes and points.
0.5 per image encoding + 0.05 per text prompt + 0.02 per point prompt + 0.02 per refinement
Foldbun Stack
Segmentation, OCR, document parsing, image embeddings and background removal through one REST API. Each call is billed in credits per image, prompt or page, with no subscription.

One HTTPS endpoint per task, JSON in and out, authenticated with a Bearer API key.
Sign in to the console with Foldbun ID and create a key. The public model pool is available at once.
Open the consoleComing soonSend the image as base64, or reuse the img_ handle returned by an earlier response instead of uploading it again.
Polygons, boxes, text lines with word boxes, Markdown or vectors. Every response states its cost and the remaining balance.
Read the documentation# macOS: replace "base64 -w0 street.webp" with "base64 -i street.webp" curl https://api.stack.foldbun.com/v1/segment \ -H "Authorization: Bearer $FOLDBUN_API_KEY" \ -H "Content-Type: application/json" \ -d @- <<EOF {"model": "sam3", "image": {"base64": "$(base64 -w0 street.webp)"}, "prompts": [{"text": "car"}, {"text": "person"}]} EOF
import base64, os, requests with open("street.webp", "rb") as f: image = base64.b64encode(f.read()).decode() r = requests.post( "https://api.stack.foldbun.com/v1/segment", headers={"Authorization": f"Bearer {os.environ['FOLDBUN_API_KEY']}"}, json={"model": "sam3", "image": {"base64": image}, "prompts": [{"text": "car"}, {"text": "person"}]}, timeout=60, ) r.raise_for_status() print(r.json())
{
"id": "call_01a1913c-25a0-73fd-a074-7a6ac6154590",
"model": "sam3",
"image": {"height": 1008, "id": "img_312c4e3a…c6e2", "width": 1343},
"cache": "miss",
"imageFee": 0.5,
"instances": [
{
"score": 0.9696,
"bbox": [0, 716, 207, 889],
"area": 27120,
"prompt": 0,
"label": "car",
"polygon": [
{"outer": [47, 718, 100, 728, 132, 743, …]}
]
}
… 26 more
],
"dropStats": [],
"cost": 0.6,
"balance": 1233.96
}Seven models for segmentation, text, documents, embeddings and background removal. The images below are recorded outputs of the API.
Segmentation from text, exemplar boxes and points.
0.5 per image encoding + 0.05 per text prompt + 0.02 per point prompt + 0.02 per refinement
Segmentation from points and boxes.
0.2 per image encoding + 0.01 per point or box prompt + 0.01 per refinement
Text from screenshots and regions, with word boxes.
0.25 per image
Document parsing: layout, tables and formulas to Markdown.
2 per page
Image embeddings for similarity and retrieval. Built with DINOv3
0.05 per image
Image and text embeddings in one space.
0.05 per image, 0.01 per text input
Unit prices, model pools, limits and licences for every model.
Prices are in credits. Failed calls cost nothing. There is no subscription and no monthly fee, and credits do not expire.
| Model | Unit prices (credits) | Example call | Credits per 1,000 calls |
|---|---|---|---|
| sam3 | 0.5 per image encoding + 0.05 per text prompt + 0.02 per point prompt + 0.02 per refinement | 1 image, 1 text prompt | 550 ≈ US$0.55 top-up |
| sam-lite | 0.2 per image encoding + 0.01 per point or box prompt + 0.01 per refinement | 1 image, 1 point | 210 ≈ US$0.21 top-up |
| ppocr-v6 | 0.25 per image | 1 image | 250 ≈ US$0.25 top-up |
| paddleocr-vl | 2 per page | 1 page | 2,000 ≈ US$2.00 top-up |
| dinov3 | 0.05 per image | 1 image | 50 ≈ US$0.05 top-up |
| siglip2 | 0.05 per image, 0.01 per text input | 1 image | 50 ≈ US$0.05 top-up |
| birefnet | 1 per image | 1 image | 1,000 ≈ US$1.00 top-up |
SAM image encoding is charged once per call and waived while the same image is still cached for the account. Cached encodings are kept for at most 7 days and may be dropped earlier, so estimates should include the fee.
ppocr-v6, dinov3, siglip2
100 calls per day, 10 per minute, at no charge.
+ sam-lite
1,000 calls per day included at no charge, 60 per minute. Further calls are billed from the balance.
All models
Billed from the balance at the unit prices.
SAM 3 bills the image encoding once per call, then each text prompt or exemplar box (segment) and each point (refine), so several prompts on one image cost little more than one.
Each response returns an img_ handle for the image. Follow-up calls on the same image send the handle instead of the bytes.
All coordinates are pixels of the original image with EXIF orientation applied, and its size comes with every result. Masks can be smaller and carry their own size.
Calls that spend credits accept an Idempotency-Key header. A repeated call returns the original response and is not charged again.
Credits are the billing unit of Foldbun Stack. Prices, the balance and the cost of every call are stated in credits. Top-ups are credited at US$1 = 1,000 credits.
No. Credits stay on the balance until they are spent.
Accounts can call the public model pool (ppocr-v6, dinov3, siglip2) right after sign-up, 100 calls per day. After the first top-up the free pool adds sam-lite with 1,000 calls per day at no charge. There are no monthly free credits.
Online top-up isn't available yet. Top-ups are arranged through support; the console shows how to contact support and the account ID to quote. The minimum top-up is US$0.99.
The encoding fee is charged once per SAM call. When the encoding of the same image is still cached for the account, the fee is waived and the response says "cache": "hit" with "imageFee": 0. Cached encodings are deleted after at most 7 days, and may be dropped earlier.
JPEG, PNG and static WebP, up to 20 MiB and 40 megapixels, sent as base64 or as an img_ handle from an earlier response.
Sign in with Foldbun ID to create an API key. The public model pool is available right away.