API Reference

POST /classify

Predict the cuisine for each menu item. Returns one of 19 cuisine labels with a confidence score.

Request

ParameterTypeRequiredDescription
itemsstring[]YesMenu item texts to classify. 1-512 items, max 500 chars each.
{
  "items": ["Butter Chicken", "Pad Thai", "Margherita Pizza", "Sushi Roll"]
}

Response

FieldTypeDescription
resultsobject[]One result per input item, in submission order

Each result:

FieldTypeDescription
textstringOriginal item text as submitted
cuisinestringPredicted cuisine label, or "uncertain" if below confidence threshold
confidencefloatClassification 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.