Analytics Dashboard

๐Ÿงช
โ†‘ 12%
0
Total Test Runs
โœ…
โ†‘ 5%
0%
Average Pass Rate
โšก
0s
Avg Response Time
๐ŸŽฏ
0
Average Score
๐Ÿš€
Quick Test
๐Ÿ”ฌ
Full Test Suite
๐Ÿ“Š
View Results
๐Ÿ“š
API Docs
๐Ÿ“ˆ Test Performance
๐Ÿ“‹ Recent Test Runs
View All โ†’

Loading...

Food Analysis Testing

Single Test
Batch Test
Model Comparison
Full Regression
๐Ÿ”ฌ Consistency
๐Ÿ“ฑ Mobile Flow
๐Ÿงญ Plan Matrix
๐Ÿ–ผ๏ธ Select Image
โš™๏ธ Test Configuration

Test Results

๐Ÿ“Š All Test Runs
Test Name Status Tests Pass Rate Avg Score Duration Date Actions

System Prompts

๐Ÿ’ฌ Configured Prompts
๐Ÿ’ฌ

System prompts are configured in code

User Profiles

๐Ÿ‘ค Test Profiles

AI Model Configuration

๐Ÿค– Current Pipeline Configuration

Single comprehensive AI call handles: image validation + food detection + portion estimation + nutrition + recommendations.

โœ“ Cost-efficient: One API call instead of multiple.

ACTIVE google/gemini-3-flash-preview
Default model for comprehensive food analysis. Fast, accurate, and cost-effective.

Alternative Models (can be configured)

AVAILABLE google/gemini-2.5-pro
Higher accuracy, slightly slower and more expensive.
AVAILABLE openai/gpt-4o
OpenAI's latest vision model. Excellent quality but higher cost.
AVAILABLE anthropic/claude-3.5-sonnet
Claude's vision model. Good for detailed analysis.
๐Ÿ”Œ Core Analysis Endpoints
POST /api/v1/meal-complete
Complete meal analysis: image โ†’ nutrition โ†’ GlucIQ โ†’ insulin. Supports currentLanguage, responseLanguage, and optional inputLanguage.
POST /api/v1/menu-scan
Multilingual restaurant menu scan. Returns all detected items with nutrition, GlucIQ, portion estimates, and optional per-item insulin comparisons.
POST /api/v1/barcode-scan
Packaged food barcode lookup with country-aware provider fallback, normalized nutrition, GlucIQ, and optional insulin.
UPLOAD /api/v1/menu-scan-upload
Multipart upload variant for menu scans, useful for manual QA and Swagger testing.
GET /api/v1/result/{processingId}
Get analysis result by processing ID.
PATCH /api/v1/analysis/{processingId}/recalculate
Adjust food weights and recalculate nutrition/GlucIQ/insulin without AI.
๐Ÿ’‰ Insulin Calculation
POST /api/v1/insulin/standalone
Standalone insulin calculation for mobile app ad-hoc use. No image required.
POST /api/v1/calculate-insulin
Legacy insulin calculation endpoint.
๐Ÿ“Š GlucIQ & Scoring
POST /api/v1/gluciq-score
Calculate GlucIQ score for given nutrition data.
GET /api/v1/history/{userId}
Get analysis history for a user.
GET /health
Health check endpoint.
๐ŸŒ Language Contract

Mobile should send responseLanguage on every analysis request. Use currentLanguage as the app locale fallback. Send inputLanguage only when the source text language is known and helpful for OCR or translation.

RULE responseLanguage โ†’ preferredLanguage โ†’ currentLanguage โ†’ en
That is the server resolution order. preferredLanguage remains supported as a legacy alias.
๐Ÿงพ Sample JSON

Copy-paste request bodies for the main mobile flows.

Meal Analysis
{
  "imageBase64": "<base64>",
  "userId": "meal-user-1",
  "currentLanguage": "fr",
  "responseLanguage": "fr",
  "mealType": "dinner",
  "calculateInsulin": true,
  "currentGlucoseMgDl": 128,
  "userProfile": {
    "diabetesType": "TYPE1",
    "usesInsulin": true,
    "insulinCarbRatio": 10,
    "insulinSensitivityFactor": 45,
    "targetGlucose": 100,
    "maxBolusUnits": 15
  }
}
Menu Scan
{
  "imageBase64": "<base64>",
  "userId": "menu-user-1",
  "currentLanguage": "fr",
  "responseLanguage": "fr",
  "inputLanguage": "de",
  "mealType": "dinner",
  "calculateInsulin": true,
  "currentGlucoseMgDl": 142,
  "userProfile": {
    "diabetesType": "TYPE1",
    "usesInsulin": true,
    "insulinCarbRatio": 10,
    "insulinSensitivityFactor": 45,
    "targetGlucose": 100,
    "maxBolusUnits": 15
  }
}
Barcode Scan
{
  "barcode": "3017620422003",
  "userId": "barcode-user-1",
  "countryCode": "FR",
  "currentLanguage": "fr",
  "responseLanguage": "fr",
  "mealType": "snack",
  "calculateInsulin": true,
  "currentGlucoseMgDl": 132,
  "userProfile": {
    "diabetesType": "TYPE1",
    "usesInsulin": true,
    "insulinCarbRatio": 10,
    "insulinSensitivityFactor": 45,
    "targetGlucose": 100,
    "maxBolusUnits": 15
  }
}
โญ Meal Feedback Endpoints
POST /api/v1/analyses/{analysisId}/feedback
Create feedback for an analyzed meal. Supports mobile fields: rating, comments, selectedTags, helpfulness.
PATCH /api/v1/analyses/{analysisId}/feedback
Partially update existing feedback (rating/tags/comment/taxonomy fields).
GET /api/v1/analyses/{analysisId}/feedback
Fetch existing feedback for meal detail rendering.