📖 API Reference

Complete reference for the EmojiHouse ML API

🔐 Authentication

All API requests require authentication using your API key in the request header:

X-API-Key: your_api_key_here

⚠️ Security: Never expose your API key in client-side code. Always make requests from your server.

Get your API key from the Dashboard → API Keys

🌐 Base URL

https://api.emojihouse.com

🤖 ML Prediction API

POST /api/ml/predict

Analyze user behavior and generate EmojiScore trust rating (0-100)

Request Body

{
  "session_data": {
    "user_engagement": 0.75,      // 0.0-1.0 engagement level
    "session_duration": 180,      // seconds
    "scroll_depth": 0.8,          // 0.0-1.0 (optional)
    "interaction_count": 15,      // number of interactions (optional)
    "page_views": 5,              // number of pages viewed (optional)
    "return_visitor": true        // boolean (optional)
  }
}

Response

{
  "emoji_score": 87.5,
  "trust_level": "high",          // "high", "medium", "low"
  "confidence": 0.92,
  "revenue_attribution": 0.0325,  // USD earned by developer
  "processing_time_ms": 2.3,
  "session_id": "sess_abc123",
  "timestamp": "2025-10-28T10:30:00Z"
}

Pricing

$0.05 per API call - You earn 68-70% revenue share

Example: 10,000 calls/month = $500 revenue → You earn $340-$350

📢 Ad Serving API (Optional)

POST /api/ads/request

Request ad to display (enables hybrid monetization)

Request Body

{
  "format": "banner",           // "banner", "native", "interstitial"
  "placement": "feed",          // "feed", "sidebar", "fullscreen"
  "user_context": {
    "app_category": "gaming",   // optional
    "emoji_score": 87.5         // optional (from ML API)
  }
}

Response

{
  "ad_id": "ad_xyz789",
  "creative": {
    "headline": "Boost Your Productivity",
    "description": "Try our award-winning task manager",
    "image_url": "https://cdn.emojihouse.com/creative/123.jpg",
    "cta_text": "Try Free",
    "click_url": "https://track.emojihouse.com/click/xyz789"
  },
  "impression_tracking_url": "https://track.emojihouse.com/imp/xyz789",
  "estimated_revenue": 0.012    // USD you'll earn on click
}

⏱️ Rate Limits

Tier Requests/Hour Burst Limit
Starter 1,000 50/minute
Growth 10,000 200/minute
Scale 100,000 1000/minute

❌ Error Codes

Code Meaning
400 Bad Request - Invalid parameters
401 Unauthorized - Invalid API key
429 Rate Limit Exceeded
500 Server Error - Retry with exponential backoff

Need Help?

Our team responds in under 30 minutes

Contact Support