OpenAI-compatible 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.
Standard OpenAI embedding format. Supports text strings, arrays of text strings, and multimodal content parts.
{
"input": "hello world",
"model": "jinaai/jina-clip-v2"
}{
"input": [
{
"type": "text",
"text": "photo of a mountain"
},
{
"type": "image_url",
"image_url": {
"url": "data:image/jpeg;base64,iVBORw0KGgo..."
}
}
],
"model": "jinaai/jina-clip-v2"
}{
"object": "list",
"data": [
{
"object": "embedding",
"embedding": [0.012, -0.034, ...],
"index": 0
},
{
"object": "embedding",
"embedding": [0.056, 0.078, ...],
"index": 1
}
],
"model": "jinaai/jina-clip-v2",
"usage": {
"prompt_tokens": 8,
"total_tokens": 8
}
}Lists available models (OpenAI format).
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 |