internal
food_classifier

Predict an ontology path for ad-hoc free-form inputs (internal testing)

Phase 1 admin-only testing endpoint. Predicts the {level1..level4} ontology path for free-form inputs with no DB lookup. Do NOT invoke from production paths.

post/internal/food_classifier/classify_ontology_ad_hoc

Request body

canonical_namestring nullable
descriptionstring nullable
food_namestring required
mode'single_shot' | 'cascading'
nutritionobject nullable

Per-serving NFT values keyed by DBUsdaNutrition column names.

ontology_serving_size_gnumber nullable

Response

successful classification

current_ontologyobject nullable
invalid_selectionsobject[]
json_parse_failuresstring[]
llm_metadataobject[]
matches_currentboolean nullable
modestring
predictionobject required
rationale_per_levelobject
rxfood_idstring nullable
total_cost_centsnumber

Changes