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
| Code | Meaning |
|---|---|
| 200 | Success |
| 400 | Bad request (malformed JSON, invalid parameters) |
| 401 | Missing or invalid API key |
| 402 | Insufficient credits |
| 422 | Validation error (item too long, exceeds max count, etc.) |
| 503 | Model not loaded or server starting up |
Latency (p50, production)
| Endpoint | Items | Latency |
|---|---|---|
| POST /embed | 100 | ~50ms |
| POST /embed/batch | 1000 | ~400ms |
| POST /search | 100 corpus | ~80ms |
| POST /match | 10 pairs | ~120ms |
| POST /dedup | 100 items | ~200ms |
| POST /classify | 100 items | ~60ms |
| POST /report | 500 items | ~1.5s |
| POST /suggest | 50 cart + 200 menu | ~150ms |
Endpoints
| Endpoint | Description | Cost |
|---|---|---|
| POST /embed | Generate embeddings for menu items | 0.05 credits/item |
| POST /embed/batch | Batch embedding for large catalogs (up to 5K items) | 0.05 credits/item |
| POST /match | Check if pairs of items are the same dish | 1.0 credits/pair |
| POST /dedup | Find duplicate items in a menu | 1.0 credits/item |
| POST /classify | Classify items by cuisine | 0.05 credits/item |
| POST /search | Semantic menu search | 0.05 credits/item |
| POST /report | Full menu health report | 3.0 credits/item |
| POST /suggest | Cart upsell suggestions | 0.10 credits/item |
| GET /health | Server status check | Free |
| GET /balance | Check credit balance | Free |