mourinhan/nomic-embed-text-v15-api
0
Nomic Embed Text v1.5 API
FastAPI wrapper for nomic-ai/nomic-embed-text-v1.5 with an OpenAI-compatible embeddings endpoint.
Endpoints
GET /healthPOST /warmupGET /v1/modelsPOST /v1/embeddings
Example request:
curl -X POST "$SPACE_URL/v1/embeddings" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $API_KEY" \
-d '{"model":"nomic-ai/nomic-embed-text-v1.5","input":["hello world"]}'If API_KEY is not configured, the endpoint is public.
Warm the model before a demo:
curl -X POST "$SPACE_URL/warmup" \
-H "Authorization: Bearer $API_KEY"Space Variables
Optional variables:
MODEL_NAME: defaults tonomic-ai/nomic-embed-text-v1.5API_KEY: optional Bearer token for requestsBATCH_SIZE: defaults to16NORMALIZE_EMBEDDINGS: defaults totrue
Chatbot Backend Config
After the Space is deployed, configure backend/.env:
EMBEDDING_API_URL=https://<your-space-subdomain>.hf.space/v1
EMBEDDING_API_KEY=<same value as API_KEY, or blank if public>
EMBEDDING_MODEL_NAME=nomic-ai/nomic-embed-text-v1.5