Skip to content
Foldbun StackDocs
中Get an API keyComing soon

API documentation

Foldbun Stack is a pay-per-use computer-vision model API. Segmentation, text recognition, document parsing, embeddings and background removal are available over HTTPS at https://api.stack.foldbun.com. Requests are authenticated with an API key and billed per call from a prepaid balance. Calls inside a pool’s daily allowance are free of charge, and failed calls cost nothing.

The API is synchronous: one request returns one result. Asynchronous jobs and webhooks are not available yet.

One page per task: scenarios with figures, model choice and an example call.

Use case Endpoint Models
Interactive segmentation POST /v1/segment, POST /v1/refine sam3, sam-lite
Concept segmentation POST /v1/segment sam3
Text recognition (OCR) POST /v1/ocr ppocr-v6
Document parsing POST /v1/documents/parse paddleocr-vl
Embeddings and search POST /v1/embeddings dinov3, siglip2
Background removal POST /v1/remove-background birefnet

Units and prices: Billing. GET /v1/models returns the live catalog for the calling account; the request is free and not metered.

Model Model name Use cases Pool
sam3 SAM 3 (Meta) Interactive segmentation, Concept segmentation Paid
sam-lite SAM 2.1 Hiera-S (Meta) Interactive segmentation Free
ppocr-v6 PP-OCRv6 small (PaddlePaddle) Text recognition (OCR) Public
paddleocr-vl PaddleOCR-VL 1.6 (0.9B) with PP-DocLayoutV3 layout analysis (PaddlePaddle) Document parsing Paid
dinov3 DINOv3 ViT-B/16 (Meta) Embeddings and search Public
siglip2 SigLIP 2 base, patch 16, 224 px (Google) Embeddings and search Public
birefnet BiRefNet, general model (Peng Zheng et al.) Background removal Paid

Pools decide which models an account can call: Rate limits and pools.

  1. Create an API key in the console. See Quickstart.
  2. Send the image as base64, or upload it once and reuse the returned img_ handle. See Images.
  3. Read the result. Every successful response carries the call id, the model, the image, the cost of the call, the balance after it, a timing object and a billing breakdown. See Billing; every field is described in the API reference.

All coordinates in requests and responses are pixels of the oriented original: the uploaded image at full size with its EXIF orientation applied. Polygons and boxes use the same pixels; a requested mask carries its own grid size in mask.size. See Images and Post-processing.

  • Quickstart: first request with curl and Python.
  • Use cases: one page per task, with model choice and an example call.
  • Authentication: API keys, model scopes and expiry.
  • Errors: the error envelope, codes and retry guidance.
  • API reference: every endpoint and schema, generated from the OpenAPI document.
  • Playground: try every model in the browser without an account.