Documentation

V1 Legacy API Reference

Deprecated

Reference documentation for the Synapse SDK V1 API. V1 is deprecated and will be sunset on March 31, 2026. Please migrate to V2 for new features and long-term support.

V1 Sunset Date: March 31, 2026

All V1 endpoints will stop functioning after this date. Migrate to V2 to access new features like 6 EQ dimensions, trajectory tracking, and conversation mode detection.

V1 to V2 Migration Guide
ChangeV1V2
Base URL/v1/.../v2/...
Emotion Modelemotion-v1emotion-v2
Analysis Endpoint/analyse/analysis
Response Objectemotions.analyseemotions.analysis
Batch Endpoint/batch-analyse/batch-analysis

New V2 Response Fields

  • intensity - Emotion strength (0.0-1.0)
  • intensityLevel - critical, high, moderate, subtle, minimal
  • valence - Emotional tone (-1.0 to +1.0)
  • arousal - Energy level (0.0-1.0)
  • complexity - simple, layered, paradoxical, transcendent
  • wonderIndex - Curiosity level (0.0-1.0)
  • discoveryLevel - routine, normal, significant, breakthrough, transcendent
  • conversationMode - Detected mode and response strategy
  • trajectory - Emotional trends and breakthroughs
Chat API Migration

V1 (Deprecated):

curl -X POST https://api.kaikostudios.xyz/v1/chat/completions \
  -H "x-api-key: $KAIKO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4",
    "emotion_model": "emotion-v1",
    "context_id": "chat-123",
    "messages": [
      {"role": "user", "content": "Hello!"}
    ]
  }'

V2 (Recommended):

curl -X POST https://api.kaikostudios.xyz/v2/chat/completions \
  -H "x-api-key: $KAIKO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4",
    "emotion_model": "emotion-v2",
    "context_id": "chat-123",
    "messages": [
      {"role": "user", "content": "Hello!"}
    ]
  }'
Emotion Analysis Migration

V1 (Deprecated):

curl -X POST https://api.kaikostudios.xyz/v1/emotions/:context_id/analyse \
  -H "x-api-key: $KAIKO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "emotion-v1",
    "messages": [{"content": {"text": "Hello!"}}]
  }'

V2 (Recommended):

curl -X POST https://api.kaikostudios.xyz/v2/emotions/:context_id/analysis \
  -H "x-api-key: $KAIKO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "emotion-v2",
    "messages": [{"content": {"text": "Hello!"}}]
  }'
Response Format Changes

V1 Response:

{
  "emotions": {
    "user": {
      "category": "joy",
      "raw": {
        "joy": 0.85,
        "love": 0.25,
        "sadness": 0.02,
        "anger": 0.01,
        "fear": 0.02,
        "surprise": 0.15
      }
    }
  }
}

V2 Response (enhanced):

{
  "emotions": {
    "user": {
      "category": "joy",
      "intensity": 0.85,
      "intensityLevel": "high",
      "valence": 0.78,
      "arousal": 0.72,
      "complexity": "simple",
      "wonderIndex": 0.45,
      "discoveryLevel": "normal",
      "raw": {
        "joy": 0.85,
        "love": 0.25,
        "sadness": 0.02,
        "anger": 0.01,
        "fear": 0.02,
        "surprise": 0.15
      }
    }
  },
  "conversationMode": {
    "mode": "conversational",
    "confidence": 0.75
  }
}
V1 Endpoints Reference

These endpoints remain functional until the March 31, 2026 sunset date.

MethodV1 EndpointV2 Equivalent
POST/v1/chat/completions/v2/chat/completions
POST/v1/emotions/analyse/v2/emotions/analysis
POST/v1/emotions/:id/analyse/v2/emotions/:id/analysis
GET/v1/emotions/:id/v2/emotions/:id
GET/v1/emotions/:id/message/:msgId/v2/emotions/:id/message/:msgId
POST/v1/emotions/batch-analyse/v2/emotions/batch-analysis
Migration Checklist
  • 1.Update base URL from /v1/ to /v2/
  • 2.Change emotion_model from emotion-v1 to emotion-v2
  • 3.Update endpoint spellings: /analyse/analysis
  • 4.Update response parsing to handle new V2 fields (intensity, valence, arousal, etc.)
  • 5.(Optional) Leverage new V2 features like conversationMode and trajectory tracking
  • 6.Test in staging environment before production deployment