API Endpoints

Base URL:
https://api.synapsex.ai/v1

Auth

Login

POST /v1/auth/login
Content-Type: application/json

{ "email": "user@example.com", "password": "..." }

Register

POST /v1/auth/register
Content-Type: application/json

{ "email": "user@example.com", "password": "...", "fullName": "User" }

Current User

GET /v1/auth/me
Authorization: Bearer eyJ...

API Keys

GET /v1/auth/keys
POST /v1/auth/keys
DELETE /v1/auth/keys/{key_id}
Create key body:
{ "name": "my-app", "description": "Production integration" }

Agents (API Gateway)

Create Agent

POST /v1/agents
Authorization: Bearer sk_...
Content-Type: application/json

{
  "name": "ops-agent",
  "model": "gpt-4o",
  "tools": ["web-search", "file-read"],
  "description": "Agent for platform operations",
  "config": {}
}

List Agents

GET /v1/agents

Get Agent

GET /v1/agents/{agent_id}

Update Agent

PUT /v1/agents/{agent_id}
Content-Type: application/json

{ "description": "Updated description", "tools": ["web-search"] }

Delete Agent

DELETE /v1/agents/{agent_id}

Invoke Agent

POST /v1/agents/{agent_id}/invoke
Content-Type: application/json

{ "input": "Check service health", "stream": false }

Logs

GET /v1/agents/{agent_id}/logs?lines=100

Deploy

POST /v1/agents/{agent_id}/deploy

Agents (MCP Gateway / Orchestrator Proxy)

Some deployments expose orchestrator-backed agent routes through the MCP Gateway. These routes use agent names and proxy to the orchestrator service.
GET /v1/agents
POST /v1/agents
GET /v1/agents/{agent_name}
GET /v1/agents/{agent_name}/logs?tail=100
POST /v1/agents/{agent_name}/pause
POST /v1/agents/{agent_name}/resume
POST /v1/agents/{agent_name}/cancel
GET /v1/agents/{agent_name}/stream
GET /v1/agents/{agent_name}/diff
GET /v1/agents/{agent_name}/files
POST /v1/agents/{agent_name}/commit
POST /v1/agents/{agent_name}/pr

MCP Catalog

List Tools

GET /v1/mcp/tools
GET /v1/mcp/tools?category=filesystem

Get Tool

GET /v1/mcp/tools/{name}

Execute Tool

POST /v1/mcp/tools/execute?tool=file-read
Content-Type: application/json

{ "args": { "path": "/var/log/app.log" } }

Intelligent MCP Routing

GET /v1/mcp/servers
POST /v1/mcp/servers
GET /v1/mcp/router/tools
POST /v1/mcp/route
POST /v1/mcp/plan
GET /v1/mcp/plans
POST /v1/mcp/execute
POST /v1/mcp/ask
Route request:
{
  "input": "run QAOA for this graph",
  "tenantId": "tenant-123",
  "preferredMcp": "qcos-mcp"
}
Ask request with execution approval:
{
  "input": "get CPU metrics",
  "preferredMcp": "synapsex-ops-mcp",
  "vmId": "vm-123",
  "approve": true,
  "toolInput": {}
}

Models And Chat

Models

GET /v1/models

Chat Completions

POST /v1/chat/completions
Content-Type: application/json

{
  "model": "gpt-4o",
  "messages": [{ "role": "user", "content": "Explain this incident" }],
  "stream": false
}

Billing And Usage

Get Usage

GET /v1/billing/usage
GET /v1/usage/{path}

Billing Proxy

GET /v1/billing/{path}
POST /v1/billing/{path}
PUT /v1/billing/{path}
PATCH /v1/billing/{path}
DELETE /v1/billing/{path}

Platform Foundation

Tenants

GET /v1/tenants
POST /v1/tenants
GET /v1/tenants/{tenant_id}
PATCH /v1/tenants/{tenant_id}
POST /v1/tenants/{tenant_id}/members
GET /v1/tenants/{tenant_id}/members
DELETE /v1/tenants/{tenant_id}/members/{member_id}
Create tenant body:
{
  "slug": "acme",
  "name": "Acme Corp",
  "plan": "team",
  "region": "westeurope",
  "limits": { "agents": 20, "tokensPerMonth": 10000000 }
}

Events

GET /v1/events
POST /v1/events
POST /v1/events/consume?topic=agent.run&consumer=worker-1
POST /v1/events/{event_id}/ack
POST /v1/events/{event_id}/nack
Publish body:
{
  "tenantId": "tenant-123",
  "topic": "agent.run",
  "type": "agent.started",
  "source": "orchestrator-service",
  "payload": { "agentId": "agent-123" }
}

Workspaces

GET /v1/workspaces
POST /v1/workspaces
GET /v1/workspaces/{workspace_id}
PATCH /v1/workspaces/{workspace_id}?status=archived
POST /v1/workspaces/{workspace_id}/artifacts
GET /v1/workspaces/{workspace_id}/artifacts

Webhooks

GET /v1/webhooks/subscriptions
POST /v1/webhooks/subscriptions
POST /v1/webhooks/dispatch
GET /v1/webhooks/deliveries
POST /v1/webhooks/deliveries/{delivery_id}/retry

Updates

GET /v1/updates/releases
POST /v1/updates/releases
POST /v1/updates/rollouts
GET /v1/updates/check?component=vm-agent&currentVersion=1.0.0&channel=stable

Model Registry

GET /v1/model-registry/models
POST /v1/model-registry/models
GET /v1/model-registry/models/{model_id}
GET /v1/model-registry/models/{model_id}/health
GET /v1/models remains the LLM Router’s runtime model endpoint. Use /v1/model-registry/models for catalog metadata and provider control-plane data.

Telemetry

GET /v1/telemetry/events
POST /v1/telemetry/events
GET /v1/telemetry/summary

WebSocket Streaming

wss://api.synapsex.ai/v1/agents/stream
Send:
{ "agentId": "agent-123", "input": "Run diagnostics" }
Receive:
{ "type": "chunk", "content": "..." }