# SigLIP2 (siglip2)

`siglip2` (SigLIP2-B) embeds images and texts into one shared vector space. A text vector can be compared with an image vector directly, which enables searching images with a sentence and classifying an image against a list of candidate labels without training.

| | |
|---|---|
| Model ID | `siglip2` |
| Model | SigLIP 2 base, patch 16, 224 px (Google) |
| Weights | Official release by Google (`google/siglip2-base-patch16-224`) |
| Use cases | [Embeddings and search](https://stack.foldbun.com/docs/use-cases/embeddings/) |
| Endpoints | `POST /v1/embeddings` |
| Pool | Public: available to every registered account, 100 calls per UTC day included |
| Billing units | `image`, `text`. Units and prices: [Billing](https://stack.foldbun.com/docs/billing/#price-list) |
| Licence | Apache-2.0 |

## How it works

SigLIP 2 has two encoders that were trained together so that a picture and a sentence that describe the same thing end up close to each other in one vector space. A call runs one of them, never both: one image goes through the image encoder, or each text goes through the text encoder.

**Images.** The image is converted to RGB, resized to 224 × 224 pixels and normalised, then passed through the vision transformer (ViT, patch size 16) of the image encoder. One image is one forward pass.

**Texts.** Each text is lower-cased, split into tokens and padded or truncated to 64 tokens, then passed through the text encoder. Each text is its own forward pass, so a call with N texts runs N passes.

Both encoders return a vector that is scaled to length 1 (L2 normalisation) and returned as float32 values; `dimensions` was 768 in the recorded responses. Because both kinds of vector live in the same space, the dot product of an image vector and a text vector is their cosine similarity, and a text can be used to search images or to rank a list of labels for one image. Billing follows the passes: an image is billed as one `image`, and each text as one `text`. Neither depends on a cache.

## In each use case

### Embeddings and search

`siglip2` serves `POST /v1/embeddings` with images and texts in one space. A call carries exactly one of `image` (one image) and `texts` (1 to 64 texts of 1 to 1000 characters each); never both. A text-only call has no `image` in its response.

- Image-to-text scores are small numbers. In the recorded examples, the best match scored 0.133 and unrelated pairs scored about 0. Only the ranking and the gaps between scores carry meaning, so scores are compared against each other for one query and no fixed cut-off is assumed.
- Vectors of different models are not comparable: `siglip2` vectors cannot be compared with `dinov3` vectors. For image-to-image similarity, de-duplication and retrieval by example, [`dinov3`](https://stack.foldbun.com/docs/models/dinov3/#embeddings-and-search) embeds images only, and its vectors describe how an image looks.

Use case guide and example call: [Embeddings and search](https://stack.foldbun.com/docs/use-cases/embeddings/).

## Limits and notes

- One `image` or 1 to 64 `texts` per call, never both. Each text is 1 to 1000 characters; only the first 64 tokens of a text are embedded.
- Image limits: see [Images](https://stack.foldbun.com/docs/images/).
- Latency: recorded calls had `timing.processingMs` of about 200 ms. The figure depends on the input, on queueing and on node load, and it is not a guarantee.
