Multimodal embedding service for FynnCloud. Runs jina-clip-v2 behind a FastAPI server to generate 1024-dimensional vectors from text and images.
Used by the backend for semantic file search (pgvector cosine similarity).
python -m venv venv && source venv/bin/activate
pip install -r requirements.txt
uvicorn app.main:app --reloadThe model weights get downloaded on first launch (~2 GB).
docker build -t fynncloud-embeddings .
docker run -p 8000:8000 fynncloud-embeddingsThe Dockerfile bakes the model weights into the image so there's no download at runtime.
{
"texts": ["hello world"],
"image_urls": ["https://example.com/photo.jpg"],
"images_base64": ["iVBORw0KGgo..."]
}All fields are optional, but at least one must be provided. Returns:
{
"embeddings": [[0.012, -0.034, ...]],
"model": "jinaai/jina-clip-v2",
"dimensions": 1024
}Returns server status.
Environment variables:
| Variable | Default | Description |
|---|---|---|
MODEL_NAME |
jinaai/jina-clip-v2 |
HuggingFace model ID |
PORT |
8000 |
Server port |
WORKERS |
1 |
Uvicorn worker count (each loads a full model copy) |
LOG_LEVEL |
info |
Logging level |