AIConnect
OpenAPI 3.0 & REST API Reference

AIConnect API Specification Reference

Programmatic REST endpoints, WebSocket streaming channels, and SDK client specifications for integrating AIConnect speech, agentic, RAG, and FinOps platforms into your production stack.

API Key Authentication

All production requests require an active API bearer key supplied in the HTTP Authorization header: Authorization: Bearer <aiconnect_api_key>.

Rate Limits & SLAs

Developer Tier: 1,000 req/min. Enterprise Tier: Dedicated AWS VPC endpoint VPC Link with unlimited throughput and 99.99% Uptime SLA guarantees.

Endpoint Specifications
WS / POST01 — Whisper & Call Center AI

Real-Time PCM Audio Streaming & Diarization

wss://api.aiconnect.in/v1/speech/whisper/stream

Establishes a low-latency bi-directional WebSocket connection for streaming 16-bit 16kHz PCM audio to TensorRT-LLM Whisper v3 engine. Returns real-time transcript chunks, speaker diarization tags, and PII redaction metadata.

Request Headers

Header NameTypeRequiredDescription
AuthorizationStringRequiredBearer <aiconnect_api_key>
X-Audio-Sample-RateIntegerRequiredAudio sampling rate (default: 16000)
X-Enable-PII-MaskingBooleanOptionalEnables automatic PCI-DSS / HIPAA NER redaction (default: true)

Request Code Example

# Python Boto3 / WebSocket Client Stream Example
import websocket
import json

ws_url = "wss://api.aiconnect.in/v1/speech/whisper/stream"
headers = {"Authorization": "Bearer aic_live_9f8d7c6b5a4"}

def on_message(ws, message):
    data = json.loads(message)
    print(f"[{data['speaker_id']}] ({data['timestamp_ms']}ms): {data['transcript_redacted']}")

ws = websocket.WebSocketApp(ws_url, header=headers, on_message=on_message)
ws.run_forever()

Sample JSON Response Payload

{
  "status": "STREAMING",
  "speaker_id": "SPEAKER_01",
  "timestamp_ms": 1420,
  "transcript": "My card number is [REDACTED_PCI] for payment.",
  "pii_redacted": true,
  "confidence_score": 0.984
}
POST03 — Custom Multi-Agent Systems

Invoke Multi-Agent Cyclic Execution Graph

https://api.aiconnect.in/v1/agents/execute

Triggers a multi-agent supervisor graph (LangGraph / Bedrock Agent) with custom task parameters, OpenAPI tool bindings, and state persistence checkpointers.

Request Headers

Header NameTypeRequiredDescription
AuthorizationStringRequiredBearer <aiconnect_api_key>
Content-TypeStringRequiredapplication/json

Request Code Example

curl -X POST https://api.aiconnect.in/v1/agents/execute \
  -H "Authorization: Bearer aic_live_9f8d7c6b5a4" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_id": "agent_financial_reconciler_v2",
    "task_prompt": "Audit ledger CSV for currency mismatch in Q3",
    "hitl_approval_required": true,
    "session_id": "session_audit_8891"
  }'

Sample JSON Response Payload

{
  "execution_id": "exec_77218391",
  "session_id": "session_audit_8891",
  "state": "AWAITING_HUMAN_APPROVAL",
  "current_node": "hitl_approval_gate",
  "pending_tool_call": {
    "tool_name": "update_sap_ledger_entry",
    "parameters": { "adjustment_amount": 4500.00, "currency": "USD" }
  }
}
POST06 — Enterprise ETL & RAG Pipelines

Hybrid BM25 + k-NN OpenSearch RAG Search

https://api.aiconnect.in/v1/rag/search

Executes hybrid reciprocal rank fusion search against OpenSearch Serverless vector indices paired with Cohere cross-encoder reranking for sub-50ms context retrieval.

Request Headers

Header NameTypeRequiredDescription
AuthorizationStringRequiredBearer <aiconnect_api_key>
Content-TypeStringRequiredapplication/json

Request Code Example

curl -X POST https://api.aiconnect.in/v1/rag/search \
  -H "Authorization: Bearer aic_live_9f8d7c6b5a4" \
  -H "Content-Type: application/json" \
  -d '{
    "index_name": "enterprise-policy-v1",
    "query": "What is the failover SLA for AWS Glue PySpark jobs?",
    "top_k": 5,
    "enable_rerank": true
  }'

Sample JSON Response Payload

{
  "query": "What is the failover SLA for AWS Glue PySpark jobs?",
  "retrieved_documents": [
    {
      "doc_id": "doc_glue_sla_09",
      "score": 0.962,
      "rerank_score": 0.989,
      "text_snippet": "AWS Glue jobs automatically retry up to 3 times upon failure with state saved in S3 Iceberg."
    }
  ],
  "latency_ms": 38.4
}
POST05 — Security / DevSecOps / FinOps

Trigger Zero-Trust IAM & Cost Explorer Audit

https://api.aiconnect.in/v1/finops/security-audit

Initiates continuous CloudTrail IAM Access Analyzer policy minimization and AWS Cost Explorer compute rightsizing analysis.

Request Headers

Header NameTypeRequiredDescription
AuthorizationStringRequiredBearer <aiconnect_api_key>
Content-TypeStringRequiredapplication/json

Request Code Example

curl -X POST https://api.aiconnect.in/v1/finops/security-audit \
  -H "Authorization: Bearer aic_live_9f8d7c6b5a4" \
  -H "Content-Type: application/json" \
  -d '{
    "target_role_arn": "arn:aws:iam::123456789012:role/ProductionEksWorkerRole",
    "days_lookback": 14,
    "generate_terraform_patch": true
  }'

Sample JSON Response Payload

{
  "audit_job_id": "job_iam_ce_9011",
  "role_arn": "arn:aws:iam::123456789012:role/ProductionEksWorkerRole",
  "wildcard_permissions_found": 3,
  "proposed_terraform_pr": "https://github.com/org/infra/pull/142",
  "monthly_projected_savings_usd": 1280.00
}