internal
food_classifier

Classify ad-hoc free-form food inputs (internal testing, never writes)

Phase 1 admin-only testing endpoint. Runs the classifier against free-form inputs with no DB lookup and never writes to the DB — useful for prompt iteration. Do NOT invoke from production paths.

post/internal/food_classifier/classify_ad_hoc

Request body

canonical_namestring nullable
descriptionstring nullable
food_namestring required
model_preset'flash' | 'hybrid_pro_glycemic_index' | 'all_pro'
nutritionobject nullable

Per-serving NFT values keyed by DBUsdaNutrition column names.

ontologyobject nullable

Optional dict with keys level1..level4.

ontology_serving_size_gnumber nullable

Response

successful classification

committedboolean
db_rows_writtenobject[] nullable
deterministic_overridesobject
disagreementsobject nullable
json_parse_failuresstring[]
llm_metadataobject[]
model_presetstring
predictionsobject required
rxfood_idstring nullable
total_cost_centsnumber

Changes

No recorded changes to this endpoint across all 1 revision of this API.