Developers

Build with Affective AI

Integrate real-time sentiment analysis into your applications with our REST API. Simple authentication, clear responses, and SDKs in your favourite languages.

Quick Start

POST/v1/analyze
curl -X POST https://api.affectiveai.com/v1/analyze \
  -H "Authorization: Bearer aai_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "I absolutely love this product! Amazing quality."
  }'
Response200 OK
{
  "success": true,
  "data": {
    "sentiment": "positive",
    "confidence": 0.94,
    "scores": {
      "positive": 0.89,
      "negative": 0.02,
      "neutral": 0.09
    },
    "emotions": {
      "joy": 0.82,
      "anger": 0.01,
      "sadness": 0.02,
      "fear": 0.01,
      "surprise": 0.14
    },
    "coaching": [
      {
        "type": "positive",
        "message": "Conversation is going well. Good opportunity to upsell."
      }
    ]
  }
}

API Endpoints

POST/v1/analyzeAnalyze text or audio for sentiment and emotions
GET/v1/usageCheck API usage and quota
POST/v1/keysCreate new API key
GET/v1/keysList your API keys
DELETE/v1/keysRevoke an API key

Authentication

API Keys

All API requests require an API key. Include it in the Authorization header:

Authorization: Bearer aai_xxxxx...

Rate Limits

Rate limits vary by plan. Check headers for current status:

X-RateLimit-Limit60
X-RateLimit-Remaining58

Ready to integrate?

Get your API key and start building in minutes.

Get API Access