API Reference

SynapseX exposes a versioned REST API through the public gateway.
APIBase URLInteractive Docs
Public Gatewayhttps://api.synapsex.ai/v1https://api.synapsex.ai/docs

Authentication

Protected endpoints accept either a bearer token or an API key header.
curl https://api.synapsex.ai/v1/agents \
  -H "Authorization: Bearer sk_..."

curl https://api.synapsex.ai/v1/agents \
  -H "X-API-Key: sk_..."
Session tokens are returned by POST /v1/auth/login. API keys are managed through /v1/auth/keys.

Base URL

https://api.synapsex.ai/v1

Key Endpoints

MethodPathDescription
POST/auth/loginLogin with email and password
POST/auth/registerRegister a user
GET/auth/meCurrent user profile
GET/auth/keysList API keys
POST/auth/keysCreate an API key
GET/agentsList agents
POST/agentsCreate or spawn an agent, depending on gateway mode
GET/agents/{id}Get agent details
PUT/agents/{id}Update agent metadata on the API Gateway
DELETE/agents/{id}Delete an agent record on the API Gateway
POST/agents/{id}/invokeInvoke an agent
GET/agents/{id}/logsFetch agent logs
POST/agents/{id}/deployDeploy an agent
GET/mcp/toolsList MCP catalog tools
GET/mcp/tools/{name}Get MCP tool details
POST/mcp/tools/executeExecute an MCP catalog tool
GET/modelsList available LLM models
POST/chat/completionsOpenAI-compatible chat completions
GET/billing/{path}Billing proxy endpoints
GET/usage/{path}Usage proxy endpoints

Response Format

The API does not use one universal envelope. Responses are endpoint-specific. Agent list endpoints can return a direct JSON array:
[
  {
    "id": "agent-123",
    "name": "ops-agent",
    "model": "gpt-4o",
    "tools": ["web-search"],
    "status": "idle",
    "description": "",
    "config": {},
    "createdAt": "2026-05-24T12:00:00",
    "updatedAt": "2026-05-24T12:00:00"
  }
]
Delete endpoints may return a small status object:
{ "success": true }

Streaming

The API Gateway includes WebSocket streaming for agent invocation:
wss://api.synapsex.ai/v1/agents/stream
Send:
{ "agentId": "agent-123", "input": "Run diagnostics" }
Receive events such as status, chunk, and done.

Rate Limits

Rate limits are enforced by the gateway and billing services. Use /v1/billing/* and /v1/usage/* endpoints for plan-specific usage and quota data.