CoolFace
Apppublic

mourinhan/nomic-embed-text-v15-api

sourceHugging Faceupdated 4mo agoView on Hugging Face
0likes
App README

Nomic Embed Text v1.5 API

FastAPI wrapper for nomic-ai/nomic-embed-text-v1.5 with an OpenAI-compatible embeddings endpoint.

Endpoints

  • —GET /health
  • —POST /warmup
  • —GET /v1/models
  • —POST /v1/embeddings

Example request:

bash
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:

bash
curl -X POST "$SPACE_URL/warmup" \
  -H "Authorization: Bearer $API_KEY"

Space Variables

Optional variables:

  • —MODEL_NAME: defaults to nomic-ai/nomic-embed-text-v1.5
  • —API_KEY: optional Bearer token for requests
  • —BATCH_SIZE: defaults to 16
  • —NORMALIZE_EMBEDDINGS: defaults to true

Chatbot Backend Config

After the Space is deployed, configure backend/.env:

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