Why did we open-source our inference engine? Read the post

Find the image that matches the whole request

Superlinked gives your agent one API to search product and media libraries with text, then rank every image by visual similarity.

Get started
a red leather handbag
Red shoes worn outdoors on gravel
Red shoes 0.068
Black handbag indoors beside a wooden door
Black handbag 0.067
Red leather barrel-shaped handbag on a light background
Rank 1 · Red leather handbag 0.180
google/siglip-so400m-patch14-384 6 images ranked

The full query beats color-only and category-only matches

View evidence
Query a red leather handbag

Run image search with one encode API

import numpy as np
from sie_sdk import SIEClient
client = SIEClient(
api_key="sk-sie-…",
base_url="https://api.superlinked.com",
)
query = "querya red leather handbag"
images = [
imagered-leather-handbag.pngbrowse,
imagered-shoes.jpgbrowse,
imageblack-handbag.jpgbrowse,
imagegreen-backpack.pngbrowse,
imageblack-camera.pngbrowse,
imageblue-running-sneaker.pngbrowse,
]
# Encode the text query + each catalog image in one batch.
items = [{"text": query}] + [{"images": [f]} for f in images]
vecs = client.encode("modelgoogle/siglip-so400m-patch14-384", items)
mat = np.array([v["dense"] for v in vecs])
mat = mat / np.linalg.norm(mat, axis=1, keepdims=True)
scores = mat[1:] @ mat[0] # cross-modal cosine to the query
for i in np.argsort(scores)[::-1]:
print(f"{scores[i]:.3f} {images[i]}")
import { readFile } from 'node:fs/promises';
import { SIEClient } from '@superlinked/sie-sdk';

const client = new SIEClient('https://api.superlinked.com', {
  apiKey: 'sk-sie-…',
});

const query = "a red leather handbag";
const imagePaths = [
  "red-leather-handbag.png",
  "red-shoes.jpg",
  "black-handbag.jpg",
  "green-backpack.png",
  "black-camera.png",
  "blue-running-sneaker.png",
];
const images = await Promise.all(imagePaths.map((path) => readFile(path)));

// Encode the text query + each catalog image in one batch.
const items = [{ text: query }, ...images.map((image) => ({ images: [image] }))];
const vecs = await client.encode('google/siglip-so400m-patch14-384', items);
const [q, ...imgVecs] = vecs.map((v) => v.dense);
const cosine = (a: Float32Array, b: Float32Array) => {
  const dot = a.reduce((s, x, i) => s + x * b[i], 0);
  return dot / (Math.hypot(...a) * Math.hypot(...b));
};
const ranked = imagePaths
  .map((file, i) => ({ file, score: cosine(q!, imgVecs[i]!) }))
  .sort((a, b) => b.score - a.score);
console.log(ranked);
image_0=$(base64 < 'red-leather-handbag.png' | tr -d '\n')
image_1=$(base64 < 'red-shoes.jpg' | tr -d '\n')
image_2=$(base64 < 'black-handbag.jpg' | tr -d '\n')
image_3=$(base64 < 'green-backpack.png' | tr -d '\n')
image_4=$(base64 < 'black-camera.png' | tr -d '\n')
image_5=$(base64 < 'blue-running-sneaker.png' | tr -d '\n')
curl https://api.superlinked.com/v1/encode/google%2Fsiglip-so400m-patch14-384 \
  -H "Authorization: Bearer sk-sie-…" \
  -H "Content-Type: application/json" \
  -d "{\"items\":[{\"text\":\"a red leather handbag\"},{\"images\":[{\"data\":\"$image_0\",\"format\":\"png\"}]},{\"images\":[{\"data\":\"$image_1\",\"format\":\"jpeg\"}]},{\"images\":[{\"data\":\"$image_2\",\"format\":\"jpeg\"}]},{\"images\":[{\"data\":\"$image_3\",\"format\":\"png\"}]},{\"images\":[{\"data\":\"$image_4\",\"format\":\"png\"}]},{\"images\":[{\"data\":\"$image_5\",\"format\":\"png\"}]}],\"params\":{\"output_types\":[\"dense\"]}}"
Build the "Image search" capability into my app using the Superlinked Inference Engine (SIE).

Context
- SIE is an OpenAI-style inference API. Python SDK: `from sie_sdk import SIEClient`; TypeScript: `@superlinked/sie-sdk`.
- Base URL: https://api.superlinked.com (or my regional endpoint). Auth: Bearer key from env `SIE_API_KEY` (never hard-code it).
- Model: google/siglip-so400m-patch14-384 (SIE primitive: /encode). Keep the model id configurable.

Task
- Input: a text query plus one or more candidate images.
- Behaviour: return the images ranked by similarity to the query
- Call the selected SIE primitive once per request and map the response into your domain type.

Deliverables
- A typed client wrapper, an application-level function for this task, error handling for timeouts/empty input, and unit tests with a stubbed client.
- Wire it into my existing stack (ask me which framework if unclear) and add a short usage example.
Output
red leather handbag1top match
red-leather-handbag.png
0.180
red shoes2
red-shoes.jpg
0.068
black handbag3
black-handbag.jpg
0.067
green backpack4
green-backpack.png
0.053
black camera5
black-camera.png
0.016
blue running sneaker6
blue-running-sneaker.png
-0.008
  • Ranks images by pixels, not filenames or tags
  • Finds matches from a plain text query

Image retrieval quality and latency

PRICE
$ / 1k images $ / 1M input tokens
$0.0143 SIE SigLIP2 Base
$0.0232 SIE SigLIP
$0.1 Google Multimodal Embeddings
Voyage multimodal-3.5 · 1MP $0.6
$0.023 SIE SigLIP2 Base
$0.0309 SIE SigLIP
$0.05 Jina Embeddings v4 multimodal
Voyage multimodal-3.5 · 1MP $0.12
Cohere Embed v4 multimodal $0.12
QUALITY
nDCG@10 · Flickr30k
SIE SigLIP 0.90
0.88
0.87
SIE SigLIP2 Base 0.82
0.80
0.79
LATENCY
p50 ms
99ms SIE SigLIP2 Base
115ms
125ms
SIE SigLIP 197ms
225ms
240ms

Deploy your way

Self-host with K8s

Easy & scalable deployment in your own cloud.

  • Terraform to your cloud in minutes
  • Apache-2.0, same engine as Cloud
  • Scales to zero, no bill between jobs
  • Per-tenant pools, no noisy neighbors
Agent prompt
Deploy SIE to our AWS account with the superlinked/sie/aws Terraform module. Docs: superlinked.com/docs/deploymentDeploy SIE to our GCP project with the superlinked/sie/google Terraform module. Docs: superlinked.com/docs/deploymentDeploy SIE to our Azure AKS cluster via helm install. Requirements: superlinked.com/docs/deployment
Deploy guide

Run locally

Run the same models on your own machine.

  • Runs on NVIDIA GPU or Apple Silicon
  • One command, no Docker or cluster
  • All 100+ Cloud models, fully offline
  • Same SDK and IDs, no code changes
pip install "sie-server[local]" && sie-server servepip install "sie-server[local]" && sie-server serve --device cuda
Quickstart

Contact us

Tell us about your use case and we'll get back to you shortly.

Apply for an inference grant

Free capacity on our hosted cluster for selected projects. Tell us what you run and we reply by email.