OpenAI-compatible API server for Jina embeddings and reranking models.
- Embedding: jina-embeddings-v5-text-small-retrieval
- Reranking: jina-reranker-v3
- OpenAI-compatible API: Works with existing OpenAI client libraries
uv sync
Fetch_Models.bat #This is for windows, it contains two 'hf download' commands, adapt for linux accordinglyStart the server:
uv run jina_server.pyOr activate the virtual environment:
uv venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
python jina_server.pyCreate embeddings for input text.
curl http://localhost:8000/v1/embeddings \
-H "Content-Type: application/json" \
-d '{"input": "Hello, world!"}'Rerank documents based on query relevance.
curl http://localhost:8000/v1/rerank \
-H "Content-Type: application/json" \
-d '{
"query": "What is machine learning?",
"documents": ["Doc 1", "Doc 2"],
"top_n": 3
}'List available models.
Health check endpoint.
Run the test suite:
uv run test_server.pyI'm telling my opencode to implement avx512 for my 9900x rig, brb
MIT