API Reference

API Reference

Base URL: https://embed.statode.com

Authentication

All endpoints except /health require an API key in the X-API-Key header:

curl -X POST https://embed.statode.com/embed \
  -H "X-API-Key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"items": ["Chicken Biryani"]}'

Keys are issued per-customer. Contact us to get yours.

Common patterns

  • All endpoints accept and return JSON
  • Per-item text limit: 500 characters
  • All text is automatically preprocessed (noise removal, spelling normalization) before processing
  • Embeddings are L2-normalized

Error codes

CodeMeaning
200Success
400Bad request (malformed JSON, invalid parameters)
401Missing or invalid API key
402Insufficient credits
422Validation error (item too long, exceeds max count, etc.)
503Model not loaded or server starting up

Latency (p50, production)

EndpointItemsLatency
POST /embed100~50ms
POST /embed/batch1000~400ms
POST /search100 corpus~80ms
POST /match10 pairs~120ms
POST /dedup100 items~200ms
POST /classify100 items~60ms
POST /report500 items~1.5s
POST /suggest50 cart + 200 menu~150ms

Endpoints

EndpointDescriptionCost
POST /embedGenerate embeddings for menu items0.05 credits/item
POST /embed/batchBatch embedding for large catalogs (up to 5K items)0.05 credits/item
POST /matchCheck if pairs of items are the same dish1.0 credits/pair
POST /dedupFind duplicate items in a menu1.0 credits/item
POST /classifyClassify items by cuisine0.05 credits/item
POST /searchSemantic menu search0.05 credits/item
POST /reportFull menu health report3.0 credits/item
POST /suggestCart upsell suggestions0.10 credits/item
GET /healthServer status checkFree
GET /balanceCheck credit balanceFree