Unified API: Setup

Base URL & Authentication

Our Unified API is reachable at https://api.levangielaboratories.com. Each request requires either:

  • API Key in the JSON body (api_key) if using endpoints like /operation or /upload_file.
  • Auth Token (auth_token) for the newer /info, /createapikey, /delete_agent, and /agent_history endpoints.

Always use HTTPS for secure transmission.

REST and WebSockets

We provide both REST endpoints and WebSocket connections for streaming. Generally:

  • REST endpoints handle creation, file uploads, and other one-off calls.
  • WebSockets offer continuous streaming of agent responses in real time.

For WebSockets, we now use a broker service for improved performance. The API response will include both session-specific and persistent WebSocket URLs.

Broker Service Integration

The API now uses a broker service to manage communication with agents. This allows for:

  • Improved reliability with reduced connection drops
  • Better scaling for high-traffic applications
  • Real-time streaming without polling
  • Persistent connections that survive page refreshes

You don't need to change your code - the API handles broker communication automatically.