internal
food_classifier

Classify an existing food by rxfood_id (internal testing)

Phase 1 admin-only testing endpoint for the LLM food classifier. Runs the 8-step pipeline on the food identified by rxfood_id and returns the predictions, per-step LLM metadata, deterministic overrides, disagreements with the current DB values, and total cost. Writes predictions to the DB (food / food_cc / food_ranking + food_data_source provenance) only when commit=true. Do NOT invoke from production paths.

post/internal/food_classifier/classify

Request body

commitboolean

When true, writes predictions to the DB (food / food_cc / food_ranking) and records food_data_source provenance. Fill-only-empty for clinician-reviewed foods.

model_preset'flash' | 'hybrid_pro_glycemic_index' | 'all_pro'
rxfood_idstring required

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.