API Documentation & Explorer

Interactive documentation for the SentimentAsAService API powered by Claude AI

API Endpoints

Public Endpoints

Enterprise Endpoints

Research Endpoints

POST /api/sentiment/analyze

Analyze sentiment of text using Claude AI with healthcare and relationship context.

Request Body

{
  "text": "I'm feeling much better after starting the new treatment",
  "includeEmotions": true,
  "includeKeyTerms": true,
  "healthcareContext": true,
  "relationshipContext": true
}

Response

{
  "sentiment": {
    "score": 0.75,
    "category": "positive",
    "confidence": 0.89
  },
  "emotions": {
    "primary": "hope",
    "secondary": ["relief", "gratitude"],
    "emotional_intensity": 0.72
  },
  "healthcareContext": {
    "indicators": [
      {
        "term": "treatment",
        "sentiment_impact": 0.4,
        "context": "Medical treatment mentioned positively"
      }
    ],
    "health_status_trend": "improving",
    "treatment_sentiment": "positive"
  },
  "crisisAssessment": {
    "risk_level": "none",
    "indicators": [],
    "recommended_action": "none"
  },
  "insights": {
    "overall_assessment": "Positive treatment response with good emotional state",
    "recommendations": ["Continue current treatment plan"]
  },
  "processingTime": 847,
  "provider": "claude-ai"
}

Try it out: