Analyze a meal photo in the Hosted Flow and retrieve structured nutrition estimates.
Create an Inquiry with workflowId: "ai-nutrition". GOFA hosts the welcome page,
declaration, meal-photo selection or capture, analysis, result, and completion page.
This Hosted Inquiry service covers one meal-photo analysis. It does not expose
nutrition chat, meal plans, or a customer-configurable workflow.
The enterprise API does not accept image uploads. The user supplies the image directly inside the Hosted Flow. For a failed or unreadable meal, follow the on-screen retry action; see Lifecycle and retries.
| Field | Value or meaning |
|---|---|
id | Saved result identifier. |
type | ai-nutrition. |
version | 1. |
source | server_ai. |
language | en or zh-Hant. |
text | Human-readable meal analysis. |
foodData | Structured nutrition estimates. |
completedAt | ISO 8601 completion time. |
Required foodData fields are name, calories, protein, carbs, and fats.
The numeric values are nonnegative estimates: calories is in kcal; protein,
carbs, fats, and optional sugar are in grams. Optional fields include dishName,
cuisineType, visibleIngredients, portionLabel, portionConfidence,
estimationBasis, disclaimer, sugar, mealGrade, and localizedText.
Do not require optional fields or derive numerical values by parsing text.
Portion estimates and uncertainty should remain visible when you present the
result. The deprecated healthScore field is not a required integration field.
Illustrative data.result:
{
"id": "01234567-89ab-4cde-8fab-0123456789ab",
"type": "ai-nutrition",
"version": 1,
"source": "server_ai",
"language": "en",
"text": "A chicken salad with vegetables and dressing. Values are estimates based on the visible portion.",
"foodData": {
"name": "Chicken salad",
"calories": 420,
"protein": 32,
"carbs": 24,
"fats": 22
},
"completedAt": "2026-11-11T02:03:00.000Z"
}The example describes the API shape, not a measured meal or a nutritional promise. Refreshing your result page should retrieve this saved result, not trigger another analysis or credit deduction.
Existing authenticated GOFA applications use separate AI Nutrition client APIs. Those endpoints and credentials are not part of the Hosted Inquiry contract described here.