API Reference

POST /embed/batch

Same as /embed but accepts up to 5000 items in a single request. Use this when embedding an entire restaurant catalog or syncing a large menu database.

Request

ParameterTypeRequiredDescription
itemsstring[]YesMenu item texts to embed. 1-5000 items, max 500 chars each.
dimensionintNoOutput vector dimension. Valid: 128, 256, 384. Default: 128.
{
  "items": ["Chicken Biryani", "Paneer Tikka", "...up to 5000 items..."],
  "dimension": 128
}

Response

FieldTypeDescription
embeddingsfloat[][]One vector per input item, in submission order
dimensionintDimension of each vector
countintNumber of items embedded

Example

import requests

# Embed a full catalog in one request
menu_items = ["Chicken Biryani", "Paneer Tikka", ...]  # up to 5000 items

response = requests.post("https://embed.statode.com/embed/batch",
    headers={"X-API-Key": "YOUR_KEY", "Content-Type": "application/json"},
    json={"items": menu_items, "dimension": 128}
)
data = response.json()
print(f"Embedded {data['count']} items")

Cost

0.05 credits per item.

Notes

  • The server handles chunking internally. You don't need to split large lists yourself.
  • For repeated searches against the same menu, embed once with this endpoint and pass the vectors to /search via corpus_embeddings to avoid re-encoding.
  • Response time scales linearly: ~400ms for 1000 items, ~2s for 5000 items.