Back to Home

API Reference

Integrate OperatiqAI into your applications with our comprehensive REST API.

Base URL

All API requests should be made to this base URL

https://nexusai-platform-omega.vercel.app/api

Authentication

Secure your requests with a Bearer token

All API endpoints require authentication via a Bearer token. You can generate API keys from your dashboard under Settings > API Keys. Include the token in the Authorization header of every request.

Authorization Header
curl -X POST https://nexusai-platform-omega.vercel.app/api/chat \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"message": "Hello, OperatiqAI"}'

Keep your API keys secure. Never expose them in client-side code, public repositories, or browser requests. Use environment variables and server-side calls instead.

Endpoints

Complete reference for all available API endpoints

POST/api/chat

Send a message and get an AI-generated response. Optionally continue an existing chat session.

Request

POST /api/chat
{
  "message": "Summarize the key risks in our Q4 report",
  "chatSessionId": "sess_abc123"  // optional
}

Response

200 OK
{
  "id": "msg_xyz789",
  "role": "assistant",
  "content": "Based on the Q4 report, the key risks include...",
  "chatSessionId": "sess_abc123",
  "timestamp": "2026-03-25T14:30:00Z"
}
GET/api/chat/sessions

Retrieve a list of all chat sessions for the authenticated user, sorted by most recently updated.

Request

No request body required

Response

200 OK
[
  {
    "id": "sess_abc123",
    "title": "Q4 Risk Analysis",
    "updated_at": "2026-03-25T14:30:00Z"
  },
  {
    "id": "sess_def456",
    "title": "Marketing Strategy Review",
    "updated_at": "2026-03-24T09:15:00Z"
  }
]
POST/api/documents

Upload a document for AI-powered analysis. Supports PDF, DOCX, TXT, and CSV formats up to 25MB.

Request

POST /api/documents
// FormData
const formData = new FormData();
formData.append("file", selectedFile);

fetch("/api/documents", {
  method: "POST",
  headers: { "Authorization": "Bearer YOUR_API_KEY" },
  body: formData,
});

Response

200 OK
{
  "id": "doc_ghi012",
  "name": "Q4-Financial-Report.pdf",
  "status": "analyzed",
  "analysis": {
    "summary": "The Q4 financial report shows...",
    "key_points": ["Revenue grew 23% YoY", "..."],
    "action_items": ["Review budget allocation", "..."]
  }
}
GET/api/dashboard

Retrieve dashboard statistics including usage metrics, daily activity, recent actions, and user profile information.

Request

No request body required

Response

200 OK
{
  "stats": {
    "total_queries": 1247,
    "documents_analyzed": 89,
    "active_sessions": 12,
    "api_calls_today": 156
  },
  "dailyUsage": [
    { "date": "2026-03-25", "queries": 42 },
    { "date": "2026-03-24", "queries": 38 }
  ],
  "activity": [
    { "type": "chat", "title": "Q4 Risk Analysis", "time": "2m ago" }
  ],
  "profile": {
    "name": "Jane Smith",
    "email": "jane@acme.com",
    "plan": "professional"
  }
}
POST/api/research

Run a comprehensive AI research analysis on a given query. Optionally scope to a workspace or specific data sources.

Request

POST /api/research
{
  "query": "Competitive landscape analysis for AI SaaS platforms in 2026",
  "workspace_id": "ws_abc123",      // optional
  "source_ids": ["doc_a1", "doc_b2"] // optional
}

Response

200 OK
{
  "executive_summary": "The AI SaaS market is experiencing...",
  "key_findings": [
    "Market size projected to reach $185B by 2027",
    "Enterprise adoption accelerated 40% in Q1 2026"
  ],
  "open_questions": [
    "How will regulation impact growth in EU markets?",
    "What is the timeline for AGI-capable platforms?"
  ],
  "sources": ["doc_a1", "doc_b2"],
  "confidence_score": 0.87
}
GET/api/templates

List available prompt templates. Filter by category to find templates relevant to your use case.

Request

No request body required

Response

200 OK
// GET /api/templates?category=sales

[
  {
    "id": "tpl_001",
    "name": "Sales Call Summary",
    "category": "sales",
    "prompt": "Analyze the following sales call transcript...",
    "variables": ["transcript", "deal_stage"]
  },
  {
    "id": "tpl_002",
    "name": "Proposal Generator",
    "category": "sales",
    "prompt": "Generate a business proposal for...",
    "variables": ["client_name", "product", "budget"]
  }
]
POST/api/meetings

Analyze a meeting transcript and extract structured insights including action items, decisions, and follow-ups.

Request

POST /api/meetings
{
  "transcript": "Meeting started at 10:00 AM. John: Let's discuss...",
  "type": "standup"  // standup | review | planning | general
}

Response

200 OK
{
  "summary": "15-minute standup covering sprint progress...",
  "attendees": ["John", "Sarah", "Mike"],
  "action_items": [
    { "owner": "Sarah", "task": "Update the API docs", "due": "2026-03-28" }
  ],
  "decisions": [
    "Postpone v2.1 release to April 5"
  ],
  "follow_ups": [
    "Schedule design review with product team"
  ],
  "sentiment": "positive",
  "duration_estimate": "15 minutes"
}

Rate Limits

API requests are rate-limited based on your plan. If you exceed the limit, requests will return a 429 Too Many Requests status.

PlanRate LimitDaily Quota
Starter60 requests/min1,000 requests
Professional300 requests/min10,000 requests
EnterpriseCustomUnlimited

Error Codes

The API returns standard HTTP status codes along with a JSON error object.

Error Response
{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid or expired API key",
    "status": 401
  }
}
StatusDescription
400Bad Request — Invalid parameters or malformed JSON
401Unauthorized — Missing or invalid API key
403Forbidden — Insufficient permissions for this resource
404Not Found — Resource does not exist
429Too Many Requests — Rate limit exceeded
500Internal Server Error — Something went wrong on our end