Intelligence, ready to plug in.

Add memory, identity, behavior and emotional intelligence to your AI product.

InputYOUR PRODUCT
HOOCUP API
Relational Core
OutputYOUR AI EXPERIENCE
COMMERCIAL API TIERS

Choose your plan.

Scale memory vectors, affective modeling, and multi-modal behavior with developer-first predictability.

TRIAL2,000 Tokens/Day

Free Trial

Instant access upon sign up. 2,000 free tokens/day.

ALLOWANCE
$0 / Free
2,000 tokens/day · Resets daily at 00:00 UTC
  • Core REST API & WebSocket access
  • Short-term conversational memory
  • Single identity & persona bounds
  • Standard community & docs support
Recommended
PRODUCTIONMost Popular

Premium

For production products scaling active users.

RATES & CAPACITY
$0.004/ 1k input
1,000,000 tokens/day · $0.012/1k out · 10 GB Storage
  • Everything in Starter
  • Persistent 1536-D vector memory
  • Behavioral cadence & micro-pause telemetry
  • Real-time emotional valence & adaptive tone
  • Synchronous multimodal convergence
ENTERPRISEDedicated

Enterprise

For companies deploying high-throughput AI at scale.

RATES & CAPACITY
$0.003/ 1k input
10,000,000 tokens/day · $0.009/1k out · 100 GB Storage
  • Dedicated private VPC deployment
  • Guaranteed <80ms priority routing
  • Custom fine-tuned emotion weights
  • 24/7 dedicated engineering & 99.9% SLA
PLUG & PLAY

Works with what you already have.

Connect Hoocup to your existing AI stack without rebuilding your product.

YOUR APP→HOOCUP API→YOUR AI
01 Connect

Add your API key.

02 Send

Send your request.

03 Build

Receive contextual intelligence.

API Reference

The Hoocup Commercial API is a RESTful interface for Artificial Emotional Intelligence (AEI), 180-dimension UIP digital twin, and tenant-isolated Hybrid RAG. All requests require JSON payloads and the X-API-Key header.

Quickstart Integration

Start integrating in under 5 minutes with our client SDKs.

Zero-dependency browser script (~3KB) with automatic keystroke biometric capture (WPM, backspaces, hesitation pauses).

Browser CDN Drop-in
<!-- Include the Hoocup AEI SDK -->
<script src="https://ai.hoocup.in/sdk/js/hoocup-aei.min.js"></script>
<!-- OR self-host: -->
<script src="/sdk/js/hoocup-aei.min.js"></script>

<textarea id="chatInput" placeholder="Type your message..."></textarea>
<button id="sendBtn">Send</button>

<script>
  const client = new Hoocup.Client({
    apiKey: "hcup_your_api_key_here",
    baseUrl: "https://ai.hoocup.in"
  });

  // Attach telemetry tracker — auto-measures WPM, backspaces, delays
  const tracker = Hoocup.attach(document.getElementById("chatInput"));

  document.getElementById("sendBtn").addEventListener("click", async () => {
    const input = document.getElementById("chatInput");
    const res = await client.chat({
      userId: "usr_web_101",
      message: input.value,
      tracker: tracker, // auto-extracts & resets typing physics
      kbMode: "hybrid"
    });

    console.log("Reply:", res.reply);
    console.log("Detected Emotion:", res.aei_applied.detected_emotion);
    console.log("Current Need:", res.aei_applied.current_need);

    // Fetch live 180-signal persistent UIP digital twin
    const uip = await client.getUIP("usr_web_101");
    console.log("User Archetype:", uip.profile.communication_archetype);
  });
</script>
Base URL:https://ai.hoocup.in
SDK:

Authentication

Authenticate requests by including your secret API key in the X-API-Key request header. All requests must use HTTPS in production.

HeaderFormatDescription
X-API-Keyhcup_...Your commercial API key (SHA-256 verified). Required on all developer endpoints.
Content-Typeapplication/jsonRequired for all POST and PUT endpoints.
X-Admin-Secret<secret>Required for admin provisioning endpoints only (/api/v1/admin/*).
Rate Limits & Daily Quotas
PlanReq / MinuteDaily Tokens
Free / Starter60 rpm100,000
Premium / Growth180 rpm500,000
EnterpriseCustomCustom
POST

/api/v1/chat

Adaptive Emotional Intelligence Chat

Primary conversational endpoint. Analyzes client-side typing dynamics (WPM, backspaces, deliberation ratio, pause-before-send) to adapt tone, empathy level, and communication rhythm. Set stream: true for Server-Sent Events (SSE).

FieldTypeRequiredDescription
messagestringYesInput text (1 to 4,000 characters).
user_idstringYesUnique user identifier for persistent AEI profile tracking (UIP Digital Twin).
bot_namestringNo (generic)Assistant persona: generic, aiko, ivy, etc.
streambooleanNo (false)When true, streams token-by-token via Server-Sent Events (SSE).
kb_modestringNo (disabled)RAG mode: disabled, augment, strict, or hybrid.
typing.typing_speed_wpmfloatNoKeystroke rate in words per minute.
typing.backspace_countintegerNoBackspace / delete actions — hesitation & self-censorship signal.
typing.compose_time_msintegerNoTotal ms from first keystroke to submit.
typing.pause_before_send_msintegerNoIdle ms before clicking send (final hesitation cue).
typing.deliberation_ratiofloatNoRatio of long pause intervals (>500ms) to total composition time.
typing.platformstringNo (web)web, mobile (adjusts backspace weighting), or voice (bypasses keystroke metrics).
aei.empathy_levelstringNo (auto)auto, low, medium, high, or maximum.
aei.crisis_safetybooleanNo (true)Enables zero-latency crisis safety guardrails.
Example Request
curl -X POST "https://ai.hoocup.in/api/v1/chat" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: hcup_your_api_key_here" \
  -d '{
    "message": "I have been working 14 hours and feeling overwhelmed.",
    "user_id": "usr_99882",
    "bot_name": "generic",
    "kb_mode": "hybrid",
    "typing": {
      "typing_speed_wpm": 28.5,
      "backspace_count": 8,
      "compose_time_ms": 9400,
      "pause_before_send_ms": 1400,
      "platform": "web"
    },
    "aei": { "empathy_level": "auto", "crisis_safety": true }
  }'
Response (200 OK)
{
  "reply": "I hear you — fourteen hours is grueling. Please step away for a minute. What is the single most urgent blocker right now?",
  "request_id": "req_9a03204f",
  "model_used": "gpt-4o-mini",
  "processing_time_ms": 1140,
  "billing": {
    "cost_usd": 0.00042,
    "tokens_used": 84,
    "quota_remaining": 499916,
    "plan": "premium"
  },
  "aei_applied": {
    "detected_emotion": "exhaustion",
    "secondary_emotions": ["anxiety", "stress"],
    "intensity": 0.82,
    "valence": -0.68,
    "trajectory": "escalating",
    "current_need": "grounding_and_safety",
    "intent": "conversational",
    "empathy_level": "maximum",
    "crisis_detected": false,
    "archetype": "processor",
    "linguistic_distress_score": 0.45
  },
  "citations": []
}
Streaming via SSE — set "stream": true

Response header becomes Content-Type: text/event-stream. Each event is data: { "token": "..." } terminated by data: { "done": true, "billing": {...}, "aei_applied": {...} }.

POST

/api/v1/extract

NLP & Entity Extraction

Extracts named entities, intent, and emotional valence without generating an assistant response. Cost-effective for tagging and metadata pipelines.

Request
curl -X POST "https://ai.hoocup.in/api/v1/extract" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: hcup_your_api_key_here" \
  -d '{
    "text": "I booked flight tickets to Tokyo for next Friday to meet Dr. Tanaka at Sony.",
    "extract_entities": true,
    "extract_intent": true,
    "extract_emotion": true
  }'
Response (200 OK)
{
  "entities": [
    {"text": "Tokyo", "label": "GPE", "confidence": 0.98},
    {"text": "next Friday", "label": "DATE", "confidence": 0.95},
    {"text": "Dr. Tanaka", "label": "PERSON", "confidence": 0.99},
    {"text": "Sony", "label": "ORG", "confidence": 0.97}
  ],
  "intent": {
    "intent_type": "travel_planning",
    "confidence": 0.92
  },
  "emotion": {
    "primary": "anticipation",
    "intensity": 0.65,
    "valence": 0.4
  },
  "language": "en",
  "processing_time_ms": 115
}
POST

/api/v1/moderate

Content Moderation <2ms

Zero-LLM overhead defensive screening (<2ms latency) across 13 languages. Detects toxicity, abuse, threats, and self-harm.

Request
curl -X POST "https://ai.hoocup.in/api/v1/moderate" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: hcup_your_api_key_here" \
  -d '{"text": "Is this message compliant with our standards?"}'
Response (200 OK)
{
  "safe": true,
  "flagged": false,
  "severity": "NONE",
  "offense_type": null,
  "elapsed_ms": 1.45
}
GET

/api/v1/uip/{user_id}

User Intelligence Profile — 180+ Dimensions

Retrieves the user's persistent psychological digital twin across 7 core domains (~180 statistical parameters). Sub-millisecond Redis cache read with MongoDB cold fallback.

Request
curl -X GET "https://ai.hoocup.in/api/v1/uip/usr_99882" \
  -H "X-API-Key: hcup_your_api_key_here"
Response (200 OK)
{
  "status": "success",
  "source": "redis_cache",
  "user_id": "usr_99882",
  "profile": {
    "communication_archetype": "processor",
    "mood_trend_7d": "stabilizing",
    "loneliness_index": 0.22,
    "linguistic_distress_score": 0.35,
    "active_relations": [
      {"name": "Pooja", "role": "colleague", "closeness": 0.75}
    ],
    "circadian": {
      "peak_chat_hour": 21,
      "late_night_vulnerability": 0.28
    },
    "typing_baseline": {
      "avg_wpm": 44.5,
      "deliberation_ratio": 0.34,
      "editing_style": "light_editor"
    },
    "preferred_empathy_level": "medium",
    "total_interactions": 38
  }
}
POST

/api/v1/kb/ingest

Document Ingestion — Tenant-Isolated RAG

Upload documents (PDF, DOCX, TXT, CSV, MD) or submit raw text / web URLs for automatic chunking and embedding into your dedicated Qdrant collection: kb_cust_{customer_id}.

Ingest via Multipart Form (cURL)
curl -X POST "https://ai.hoocup.in/api/v1/kb/ingest" \
  -H "X-API-Key: hcup_your_api_key_here" \
  -F "file=@Product_FAQ.pdf" \
  -F "category=pricing"

# Or via JSON (raw text):
curl -X POST "https://ai.hoocup.in/api/v1/kb/ingest" \
  -H "X-API-Key: hcup_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Our enterprise refund policy allows cancellations within 30 days.",
    "category": "policies",
    "title": "Refund Policy 2026"
  }'
Response (201 Created)
{
  "status": "success",
  "doc_id": "doc_9281a7b4",
  "chunks_indexed": 4,
  "storage_kb_used": 12.4
}
GET

/api/v1/kb/documents

List all ingested documents in your tenant knowledge base with chunk counts and metadata.

Request
curl -X GET "https://ai.hoocup.in/api/v1/kb/documents" \
  -H "X-API-Key: hcup_your_api_key_here"
GET

/api/v1/kb/status

Current number of indexed chunks, document counts, and vector storage usage for your tenant collection.

Request
curl -X GET "https://ai.hoocup.in/api/v1/kb/status" \
  -H "X-API-Key: hcup_your_api_key_here"
GET

/api/v1/usage

Inspect current billing cycle consumption, remaining tokens, request counts, and cost breakdown.

Get Usage Request
curl -X GET "https://ai.hoocup.in/api/v1/usage" \
  -H "X-API-Key: hcup_your_api_key_here"
Response (200 OK)
{
  "customer_id": "cust_VrYnihQE-ShTibvp",
  "period_start": "2026-10-01T00:00:00Z",
  "period_end": "2026-10-31T23:59:59Z",
  "total_requests": 3410,
  "total_tokens": {
    "input": 245000,
    "output": 112000,
    "total": 357000
  },
  "total_cost": 1.78,
  "quota": 500000,
  "remaining": 143000,
  "usage_percentage": 71.4
}
GET

/api/v1/health

Public — No Auth Required

Public health probe verifying operational status of the Commercial API Gateway and all downstream microservices. No authentication required.

Health Check (Status 200 OK)
{
  "status": "healthy",
  "version": "1.0.0",
  "timestamp": "2026-10-14T08:57:39.207724Z",
  "services": {
    "commercial_api": "healthy",
    "gateway": "healthy",
    "langchain_service": "healthy",
    "context_service": "healthy"
  }
}

HTTP Error Codes & Problem Details (RFC 7807)

All errors conform to the RFC 7807 standard JSON error envelope:

Error Response Shape
{
  "error": "quota_exceeded",
  "message": "Daily token quota exhausted. Please upgrade your plan.",
  "status_code": 429,
  "documentation": "https://ai.hoocup.in/docs",
  "request_id": "req_err_4812a"
}
CodeError KeyMeaning & Resolution
401 Unauthorizedinvalid_api_keyOmitted or invalid X-API-Key header. Generate a key in the dashboard.
403 Forbiddenaccount_not_activeAccount suspended. Contact support.
429 Too Many Requestsrate_limit_exceededExceeded requests/minute sliding window. Implement exponential backoff.
429 Too Many Requestsquota_exceededDaily token quota exhausted. Resets at midnight UTC.
422 Unprocessablescanned_pdfScanned image-only PDF uploaded. Provide searchable text documents.
500 Internal Errorinternal_server_errorDownstream processing exception. Retry with backoff.
503 Unavailableauth_service_unavailableMongoDB or Redis connectivity timeout. Check /api/v1/health.