Supported Image Types
Mizen accepts common image formats:- JPG/JPEG - Standard photo format
- PNG - Screenshots and graphics
- WEBP - Modern web format
- GIF - Animated or static images
/home/daytona/workspace/source/src/app/api/parseRecipeFromImage/route.ts:61-79.
How to Use
Parse the recipe
Click “Parse Recipe from Image” to begin processing. This typically takes 3-5 seconds.
What Gets Extracted
The AI vision model extracts:- Title - Recipe name from image
- Ingredients - Complete ingredient list with:
- Amounts (quantities)
- Units (cups, tablespoons, etc.)
- Ingredient names
- Grouped sections (if present)
- Instructions - Step-by-step directions
- Metadata - When visible:
- Servings/yield
- Prep time
- Cook time
- Author
- Cuisine type
- Summary - AI-generated recipe overview
/home/daytona/workspace/source/src/app/api/parseRecipeFromImage/route.ts:44-226.
Processing Pipeline
Client-Side
Client logic in
/home/daytona/workspace/source/src/components/search/recipe-search-form.tsx:122-155.
Server-Side
Server processing in
/home/daytona/workspace/source/src/app/api/parseRecipeFromImage/route.ts:102-119.
Image Requirements
For best results, ensure images:Are Clear and Readable
- Text should be in focus
- Adequate lighting and contrast
- Minimal glare or shadows
- Straight orientation (not rotated)
Contain Complete Information
- Full ingredient list visible
- All instruction steps shown
- No text cut off at edges
Have Good Resolution
- Minimum 800x600 recommended
- Higher resolution improves accuracy
- Avoid heavily compressed images
Error Handling
Common errors and solutions:ERR_INVALID_FILE_TYPE
Cause: Unsupported file format Solution: Convert to JPG, PNG, WEBP, or GIFERR_FILE_TOO_LARGE
Cause: Image exceeds 10MB Solution: Compress or resize the imageERR_NO_RECIPE_FOUND
Cause: AI couldn’t extract recipe text Solutions:- Improve image quality
- Ensure recipe text is visible
- Try a different image
ERR_RATE_LIMIT
Cause: Too many requests Solution: Wait before trying again (retry-after timestamp provided) Error codes in/home/daytona/workspace/source/src/app/api/parseRecipeFromImage/route.ts:129-161.
Response Format
Image Storage
Parsed images are stored:- Base64 in localStorage - For recipe preview
- Filename preserved - Original name retained
- Source reference - Stored as
image:filename
- Recipe thumbnail display
- Source tracking
- Re-access without re-upload
Images are stored locally in your browser. They are not uploaded to external servers beyond the initial parsing request.
AI Model
Mizen uses Groq’s vision API for image parsing:- Provider: Groq
- Model: Vision-enabled model
- Input: Base64-encoded images
- Output: Structured JSON recipe data
Limitations
Text Recognition
- Handwritten recipes may have lower accuracy
- Unusual fonts may cause parsing issues
- Decorative text can confuse the AI
Image Quality
- Blurry images reduce accuracy
- Low contrast makes text harder to read
- Heavy compression loses detail
Language Support
- Optimized for English recipes
- Other languages may work but with reduced accuracy
API Dependencies
- Requires valid Groq API key
- Subject to API rate limits
- Network connection required
Performance
- Typical parse time: 3-5 seconds
- Network upload: ~1 second (depends on image size)
- AI processing: ~2-4 seconds
- Timeout: 2 minutes maximum
Privacy
Image parsing privacy considerations:- Images sent to Groq API for processing
- No permanent storage on Mizen servers
- Base64 data stored in browser localStorage only
- Can be cleared by user at any time