# Changelog

## 2026-11-04 — Segmentation post-processing, polygon output, CBOR responses

**API (breaking)**

- Segmentation results (`POST /v1/segment`, `POST /v1/refine`, batch segmentation) return a simplified polygon with holes by default and no mask. `Instance.polygon` is a list of parts `{outer, holes}` with flat integer rings in image pixels. `bbox` is integer, x2 and y2 exclusive; every instance has `area`.
- Masks are returned on request (`geometry: ["mask"]`) as `mask`: COCO compressed RLE (`encoding: coco`, default) or a lossless WebP crop (`encoding: webp`). The uncompressed integer `rle` is removed.
- Post-processing is configured per prompt (`prompts[].options`) on top of request defaults (`options.defaults`): score, size and area filters with border modes (`strict` by default), fragment and hole cleanup, polygon tolerance, holes and part count, and merging by `group`. Request-level `options.maxInstances`, `options.nms` and `options.report`. Responses report `dropStats` and, on request, `dropped`.
- Removed: `options.threshold` (now `filter.minScore`), `options.maxDetections` (now `options.maxInstances`), `options.polygons` (polygons are the default). The limit of 10 prompts above `maskSize` 2048 is removed.
- Limits that depend on the image content (vertices per instance, geometry per response, WebP pixels) reduce the output by documented rules (`tolerancePx`, `omitted`, `mask.encoding`) instead of failing the call.
- `Accept: application/cbor` returns segmentation, refinement, background removal and JSON-mode batch responses in CBOR: polygon rings as RFC 8746 typed arrays, binary data as byte strings.

## 2026-11-02 — Original-size coordinates, mask size, image storage

**API**

- Coordinates in requests and responses are pixels of the oriented original (EXIF orientation applied). Images are no longer resized to a short side of 1008 px; `image.width` and `image.height` are the size of the original, up to 40 megapixels and 16384 px per side.
- Masks can be smaller than the image. `rle.size` is the actual mask size, and clients scale by it.
- New `options.maskSize` on `POST /v1/segment` and `POST /v1/refine`: long side of the returned masks, 64 to 4096 px, 2048 by default. Above 2048, `POST /v1/segment` accepts at most 10 prompts.
- New error `400 invalid_image`: the image passed the upload checks but could not be decoded. Such calls are never charged.
- `503 unavailable` with `Retry-After` can also mean that image storage is temporarily unavailable.

**Privacy**

- Metadata and appended data are removed at upload. The image itself is kept for at most 7 days. It is never forwarded to GPU nodes, which only receive per-model resized copies. Inline `base64` images are handled like uploads.

## 2026-11-02 — Image retention limit

- Image handles and cached encodings are deleted after at most 7 days, counted from the first time the account stored the image. They can still be dropped earlier when storage capacity is needed, so there is no minimum retention. A call with a deleted handle answers `404 image_not_found`; upload the image again.

## 2026-11-01 — Point prompts for sam3, documentation by use case

**API**

- `POST /v1/segment` with `sam3` accepts point prompts: `{ "point": { "x", "y" } }` returns exactly one object per point. Points can be mixed with text prompts and exemplar boxes in one call and count toward the limit of 50 prompts. `options.threshold` and `options.maxDetections` apply to text and exemplar instances only, and exemplar boxes act on the text prompts only.
- Point prompts are billed per `point` at the `sam3` point price; the image encoding is billed once per call.
- `POST /v1/refine` is billed per call: one `refine` unit (`sam3` 0.02, `sam-lite` 0.01, one decode), whatever the number of points and whether a box is given. Exemplar boxes in `POST /v1/segment` are no longer billed separately: each text prompt is billed as one `prompt`, and a call with exemplar boxes and no text prompt is one `prompt`.
- Unchanged: a `box` in a `sam3` segment call is an exemplar. A single object is marked with a box through `POST /v1/refine`.

**Documentation**

- Six use case pages: interactive segmentation, concept segmentation, text recognition, document parsing, embeddings and search, and background removal. Each page walks through requests and responses and compares the models that serve the task.
- Model pages describe the model, its weights, licence, how it works, billing units and limits, and how it behaves in each use case.
- The sidebar shows nested levels with an indent.
- Use case pages lead with the task and its scenarios, then compare the models and end with one example call and its cost. Request and response fields are described in the API reference, and model pages no longer repeat the billing units, which are on the Billing page.

## 2026-11 — Initial release

Version `0.1.0-draft` of the public API.

**Endpoints**

- `POST /v1/images`: upload an image and get a reusable `img_` handle.
- `POST /v1/segment` and `POST /v1/refine`: segmentation with `sam3` and `sam-lite`.
- `POST /v1/ocr`: text recognition with `ppocr-v6`.
- `POST /v1/documents/parse`: layout analysis and recognition of one page with `paddleocr-vl`.
- `POST /v1/embeddings`: image and text embeddings with `dinov3` and `siglip2`.
- `POST /v1/remove-background`: background removal with `birefnet`.
- `GET /v1/models`: models, prices and per-account availability.

**Platform**

- API keys with model scopes, expiry and rotation.
- Prepaid credits; 1 credit = US$0.001. Per-call `cost`, `balance`, `billing` and `timing` fields.
- Model pools with daily allowances: public and free pools, and paid models billed from the balance.
- `Idempotency-Key` on calls that spend credits; `X-Request-Id` on every response.
- The Playground, with a trial lane that needs no account.

**Not available yet**

- Asynchronous jobs and webhooks.
- `image.url` input; images are sent as base64 or uploaded.
- Multi-page PDF input to `POST /v1/documents/parse`.
