AIConnect
OpenAPI 3.0 & REST API Reference

AIConnect API Specification Reference

Programmatic REST endpoints, WebSocket streaming channels, and SDK client specifications across all 6 AIConnect core domains: Whisper voice streaming, air-gapped local AI, multi-agent workflows, AWS cloud automation, FinOps security auditing, and enterprise RAG.

API Key & Local IPC Authentication

Cloud endpoints require an active bearer key in the HTTP Authorization header: Authorization: Bearer <aiconnect_api_key>. Local edge daemons authenticate via Unix domain socket tokens.

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 (All 6 Core Domains)
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
}
POST02 — Local AI Agents

Air-Gapped Local Hardware Inference & MCP Tool Invocation

http://127.0.0.1:11435/v1/local/inference

Invokes local quantized LLM weights (Llama 3.3 70B / Qwen 2.5 Coder) hosted on private edge workstations via Ollama and vLLM with zero cloud egress validation.

Request Headers

Header NameTypeRequiredDescription
X-Local-IPC-TokenStringRequiredLocal Unix domain socket auth token
X-Enforce-Zero-EgressBooleanRequiredRejects request if external network interfaces are detected (true)
Content-TypeStringRequiredapplication/json

Request Code Example

# Python Local IPC Client Example via Unix Socket / Localhost
import urllib.request
import json

req_payload = {
    "model": "qwen2.5-coder:32b-instruct-q8_0",
    "prompt": "Inspect local audit log /var/log/secure for unauthorized sudo calls",
    "temperature": 0.1,
    "max_tokens": 1024
}

req = urllib.request.Request(
    "http://127.0.0.1:11435/v1/local/inference",
    data=json.dumps(req_payload).encode('utf-8'),
    headers={
        "X-Local-IPC-Token": "local_ipc_sec_e8b19a2c",
        "X-Enforce-Zero-Egress": "true",
        "Content-Type": "application/json"
    }
)

with urllib.request.urlopen(req) as resp:
    print(json.loads(resp.read().decode('utf-8'))['response'])

Sample JSON Response Payload

{
  "model": "qwen2.5-coder:32b-instruct-q8_0",
  "egress_status": "AIR_GAPPED_VERIFIED",
  "inference_device": "NVIDIA RTX 4090 (24GB VRAM)",
  "prompt_eval_count": 48,
  "eval_count": 184,
  "tokens_per_second": 58.2,
  "response": "No unauthorized sudo anomalies detected in /var/log/secure."
}
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" }
  }
}
POST04 — AWS AI Cloud Automation

Trigger EventBridge Autonomous Terraform Drift Remediation

https://api.aiconnect.in/v1/cloud/drift-remediation

Dispatches AWS EventBridge event-driven automation to inspect CloudTrail diffs, generate idempotent Terraform plan patches, and open verified GitHub pull requests.

Request Headers

Header NameTypeRequiredDescription
AuthorizationStringRequiredBearer <aiconnect_api_key>
Content-TypeStringRequiredapplication/json

Request Code Example

curl -X POST https://api.aiconnect.in/v1/cloud/drift-remediation \
  -H "Authorization: Bearer aic_live_9f8d7c6b5a4" \
  -H "Content-Type: application/json" \
  -d '{
    "environment": "production-us-east-1",
    "aws_account_id": "123456789012",
    "target_modules": ["vpc-peering", "eks-security-groups"],
    "auto_remediate_low_risk": true
  }'

Sample JSON Response Payload

{
  "remediation_id": "rem_tf_90821",
  "drift_detected": true,
  "affected_resources": [
    "aws_security_group_rule.ingress_eks_api"
  ],
  "terraform_plan_status": "PLAN_GENERATED",
  "remediation_pr_url": "https://github.com/aiconnect/infra-core/pull/289",
  "auto_applied": false
}
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
}
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
}