API Reference
POST /classify
Predict the cuisine for each menu item. Returns one of 19 cuisine labels with a confidence score.
Request
| Parameter | Type | Required | Description |
|---|---|---|---|
items | string[] | Yes | Menu item texts to classify. 1-512 items, max 500 chars each. |
{
"items": ["Butter Chicken", "Pad Thai", "Margherita Pizza", "Sushi Roll"]
}
Response
| Field | Type | Description |
|---|---|---|
results | object[] | One result per input item, in submission order |
Each result:
| Field | Type | Description |
|---|---|---|
text | string | Original item text as submitted |
cuisine | string | Predicted cuisine label, or "uncertain" if below confidence threshold |
confidence | float | Classification confidence (0-1) |
{
"results": [
{"text": "Butter Chicken", "cuisine": "North Indian", "confidence": 0.94},
{"text": "Pad Thai", "cuisine": "Thai", "confidence": 0.91},
{"text": "Margherita Pizza", "cuisine": "Italian", "confidence": 0.88},
{"text": "Sushi Roll", "cuisine": "Japanese", "confidence": 0.92}
]
}
Supported cuisines
North Indian, South Indian, Chinese, Italian, Thai, Japanese, Mexican, Middle Eastern, Korean, American, Mughlai, Continental, Vietnamese, Mediterranean, Bakery, Beverages, SE Asian, European, Desserts.
Example
import requests
response = requests.post("https://embed.statode.com/classify",
headers={"X-API-Key": "YOUR_KEY", "Content-Type": "application/json"},
json={
"items": ["Chicken Tikka Masala", "Tom Yum Soup", "Falafel Wrap", "Croissant"]
}
)
for result in response.json()["results"]:
print(f"{result['text']}: {result['cuisine']} ({result['confidence']:.0%})")
Cost
0.05 credits per item.
Notes
- Items with confidence below the internal threshold return
"uncertain"as the cuisine. - The classifier handles multi-cuisine items pragmatically. "Indo-Chinese" dishes like Chilli Paneer typically classify as Chinese.
- Beverages and bakery items have their own classes rather than being forced into a regional cuisine.