POST /analyze
Image → PredictionsRuns a real model on your base64 image and returns the top prediction plus all class probabilities.
Request body
{
"image_base64": "data:image/jpeg;base64,<base64>",
"model_type": "autodetect" // optional: corn | tomato | cassava | cacao | guava | apple | banana | orange
}
Tip: convert a File to base64 with FileReader in the browser.
Response body
{
"disease_detected": "Late Blight",
"confidence": 92,
"predictions": [
{ "className": "Late Blight", "probability": 92 },
{ "className": "Early Blight", "probability": 7 }
],
"model_used": "https://.../models/tomato/",
"analysis_timestamp": "2025-09-28T16:34:22.120Z"
}