API Documentation

Complete guide to MegaVision's image analysis endpoints. Food, OCR, moderation, and more.

Getting Started
Learn how to authenticate and make your first API call

Authentication

All API requests require authentication using your API key. Include your API key in the Authorization header:

curl -H "Authorization: Bearer YOUR_API_KEY" \
https://api.megavision.ai/v1/analysis/food

Base URL

All API endpoints are relative to:

https://api.megavision.ai/v1
Image Analysis Endpoints
Specialized AI-powered analysis for different use cases
POST/analysis/food

Analyze food images to detect dishes, ingredients, and nutrition information.

Request Body
Field
Type
Description
image
string
Base64 encoded image or URL
detailed
boolean
Include detailed nutrition (optional)
Example Request
curl -X POST \
https://api.megavision.ai/v1/analysis/food \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"image": "base64_data..."}'
Example Response
{
  "dish_name": "Grilled Chicken Salad",
  "ingredients": [
    "chicken breast", "mixed greens", 
    "tomatoes", "cucumber", "olive oil"
  ],
  "nutrition": {
    "calories": 385,
    "protein": 42,
    "carbs": 12,
    "fat": 18
  },
  "confidence": 0.94
}
NEW
Other Endpoints
Additional analysis capabilities
POST/analysis/ocrExtract text from images and documents
POST/analysis/moderationDetect NSFW content and policy violations
POST/analysis/describeGenerate descriptions and tags for any image
Error Handling
Understanding API error responses

The API uses conventional HTTP response codes to indicate success or failure of requests.

200Success
400Bad Request
401Unauthorized
429Rate Limited
Rate Limits
API usage limits and best practices

Rate limits are enforced per API key. Exceeded limits return 429 status.

Free
  • 10 images/day
  • 1 req/5 seconds
Basic
  • 100 images/day
  • 1 req/second
Developer
  • 1,000 images/day
  • 5 req/second

Ready to get started?

Create your account and get your first API key in under a minute.