---
title: "Classify an existing food by rxfood_id (internal testing)"
method: POST
path: "/internal/food_classifier/classify"
tags: ["internal", "food_classifier"]
---

# Classify an existing food by rxfood_id (internal testing)

`POST /internal/food_classifier/classify`

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.

## Request body

- FoodClassifierClassifyRequest
  - `commit` boolean — 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_id` string, required

## Response `200`

successful classification

- FoodClassifierClassifyResponse
  - `committed` boolean
  - `db_rows_written` object[], nullable
  - `deterministic_overrides` object
  - `disagreements` object, nullable
  - `json_parse_failures` string[]
  - `llm_metadata` object[]
  - `model_preset` string
  - `predictions` object, required
  - `rxfood_id` string, nullable
  - `total_cost_cents` number

## Other responses

- `400` — invalid request
- `403` — not authorized
- `404` — food not found

---

[API](https://skmtc.dev/rxfoodapp/apis/inneranalytics-mnt-server.md) · [All operations](https://skmtc.dev/rxfoodapp/apis/inneranalytics-mnt-server/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/rxfoodapp/inneranalytics-mnt-server/revisions/0703cbbbefe8/schema)
