FoodVivo REST API Documentation
FoodVivo provides institutional-grade nutritional intelligence across natural language text, plate photos, hybrid barcodes, and multi-photo nutrition labels with sub-second response times, zero-overhead portion scaling, and verified mathematical integrity.
https://foodvivo-api.flappybird-assets.workers.devSign up on the dashboard to generate your sk_live_... credential.
Call /v1/food/analyze or /v1/food/barcode with JSON payload.
Receive USDA-calibrated macros with 4-4-9 caloric verification & allergen flags.
API Reference & Endpoints
Explore request bodies, definition schemas, and interactive code terminals for each endpoint.
/v1/food/analyze
Decompose natural language food descriptions, plate photos, or mixed restaurant meals into discrete ingredients with USDA-calibrated macros, FoodVivo neural grounding, and 4-4-9 caloric mathematical verification.
Headers
Body Parameters
Natural language meal description (e.g. '2 scrambled eggs with avocado toast and coffee'). Required if image is not provided.
Public URL of a meal or plate photo for multimodal visual analysis.
Direct base64 data-URI string of the image (up to 10MB).
Optional meal context descriptor (e.g., 'Breakfast', 'Chipotle Post-Workout', 'Homemade Recipe').
/v1/food/barcode
Hybrid barcode lookup combining FoodVivo Catalog Engine with proprietary serving size arbiter to normalize packaging portions (e.g. 2 scoops / 1 can instead of 100g default) with deterministic multiplier scaling.
Headers
Body Parameters
8 to 14 digit UPC, EAN-13, or GTIN product barcode.
Multiplier scaling factor (e.g. 0.5 for half portion, 2.0 for double serving).
/v1/food/label
Nutrition Facts label OCR with multi-photo panoramic stitching for curved, cylindrical, or reflective packaging (e.g. hot sauce bottles, soda cans, multi-angle supplement tubs).
Headers
Body Parameters
Array of 1 to 5 image objects ({ url?: string, base64?: string }) captured at different angles.
Optional product hint (e.g., 'Sriracha 482g bottle').
/v1/meal/portion/estimate
Recalculate nutrition and macro breakdown for adjusted portion or weight multipliers in 0ms without AI overhead or token costs.
Headers
Body Parameters
Valid FoodItem object returned from /v1/food/analyze or /v1/food/barcode.
Desired serving count (e.g. 1.5, 2.0).
Target scale weight in grams (e.g. 250).
/v1/meal/daily/analyze
Batch analyze multi-course daily food intake (breakfast, lunch, dinner, snacks) and calculate goal compliance against target calorie and macronutrient budgets.
Headers
Body Parameters
Array of meal objects with 'meal_type' ('breakfast'|'lunch'|'dinner'|'snack') and 'input' ({ text, image_url, image_base64 }).
Optional target nutrition budget ({ target_calories, target_protein_g, target_carbs_g, target_fat_g }).
/v1/feedback
Submit end-user accuracy ratings, thumbs up/down, or clinician scale corrections to continuous golden eval benchmarks with zero regression drift.
Headers
Body Parameters
Trace request ID from /v1/food/analyze or /v1/food/barcode.
1 for positive/accurate, -1 for issue reported (or 1 to 5 integer rating).
Category: 'accurate' | 'inaccurate_macros' | 'wrong_portion' | 'missing_item' | 'hallucination' | 'general'.
Original meal text or context submitted by user.
Corrected ground-truth values (e.g. { actual_calories: 450, verified_grams: 180 }).
Developer or user notes explaining the adjustment.
/v1/feedback/stats
Returns aggregate feedback statistics, satisfaction rate, and accuracy benchmark metrics for the authenticated customer account.
Headers
/v1/keys
Programmatically generate a new scoped live or test API key for an enterprise customer or development environment.
Headers
Body Parameters
Descriptive label for the API key (e.g. 'Production iOS App').
Unique customer/organization identifier.
Plan tier: 'starter' | 'hobby' | 'developer' | 'growth' | 'scale'.
Set to true to generate a test mode key (prefixed with sk_test_).
/v1/health
Public health check endpoint returning edge network status, neural inference engine availability, and cluster latency telemetry.
Headers
/v1/payments/config
Retrieve public Razorpay configuration, key IDs, supported currencies (INR, USD), and current tier pricing matrices.
Headers
/v1/payments/create-subscription
Generate a recurring Razorpay subscription checkout session for Hobby, Developer, or Growth plans.
Headers
Body Parameters
Target plan tier: 'hobby' | 'developer' | 'growth'.
Unique account ID of the customer.
Email address for transaction receipts.
'INR' or 'USD'.
/v1/payments/verify-subscription
Verify Razorpay subscription HMAC SHA-256 signature and instantly upgrade monthly request quotas and RPM limits.
Headers
Body Parameters
Subscription ID from Razorpay checkout.
Payment transaction ID.
HMAC SHA-256 signature.
Customer account ID.
'hobby' | 'developer' | 'growth'.
/v1/payments/create-order
Generate a new one-time Razorpay checkout order for plan upgrades (Hobby, Developer, Growth).
Headers
Body Parameters
'hobby' | 'developer' | 'growth'
Customer account ID
Optional receipt email
'INR' | 'USD'
/v1/payments/verify
Verify Razorpay one-time payment HMAC signature and instantly upgrade monthly quota and RPM limits.
Headers
Body Parameters
Razorpay Order ID
Razorpay Payment ID
HMAC SHA-256 Signature
Customer account ID
'hobby' | 'developer' | 'growth'
/v1/payments/history/:customerId
Fetch billing history, payment invoices, and transaction receipts for a specific customer account.
Headers
Body Parameters
Customer account identifier in URL path.