API Reference
GET /health
Check if the server is running. Returns basic status publicly, full diagnostics when authenticated.
Public response (no API key)
curl https://dish-embed.latimal.com/health
{
"status": "healthy"
}
Authenticated response
curl https://dish-embed.latimal.com/health -H "X-API-Key: YOUR_KEY"
| Field | Type | Description |
|---|---|---|
status | string | Server status ("healthy") |
biencoder | string | Embedding service status |
backend | string | Inference backend (torch or onnx) |
reranker | string or null | Dedup precision-stage status, null if not loaded |
search_reranker | string or null | Search precision-stage status, null if not loaded |
classifier | string or null | Cuisine classifier status, null if not loaded |
supported_dimensions | int[] | Available embedding dimensions |
embedding_cache_size | int | Number of cached embeddings (server-side) |
concept_count | int | Number of loaded concept centroids |
load_time_seconds | float | Server startup time in seconds |
{
"status": "healthy",
"biencoder": "loaded",
"backend": "onnx",
"reranker": "loaded",
"search_reranker": "loaded",
"classifier": "loaded",
"supported_dimensions": [128, 256, 384],
"embedding_cache_size": 12847,
"concept_count": 85,
"load_time_seconds": 51.3
}
Cost
Free. No credits charged.
Notes
- Use the public endpoint for uptime monitoring and health checks.
- The authenticated response is useful for debugging (confirming which models are loaded, checking cache utilization).
- A 503 response means the server is still loading models at startup. Retry after a few seconds.
POST /suggest
POST /suggest returns cart upsell picks from a restaurant menu. Detects missing categories, matches cuisine affinity, and respects dietary preferences.
GET /balance
GET /balance returns credits remaining for your dish-embed account. Free to call, no credits charged. Returns 402 when balance hits zero on other calls.