Unified API: Requirements & Usage
REST Endpoints: Body & Headers
Basic Requirements
Content-Type: application/json
header when sending JSON bodies.- Include your
api_key
orauth_token
in the request body if the endpoint requires it.
Example Body
JSON{ "auth_token": "USERID:TIMESTAMP:RANDOM", "action": "get_credits" }
Some endpoints, such as /operation
, expect:
JSON{ "operation": "message", "params": { "text": "Hello!" }, "api_key": "YOUR_API_KEY", "agent_id": "YOUR_AGENT_ID" }
WebSocket Usage
The WebSocket URI generally follows:
ws://api.levangie-laboratories.com/ws/{agent_id}/{api_key}
or if using HTTPS:
wss://api.levangie-laboratories.com/ws/{agent_id}/{api_key}
You must still have valid credits and a valid API key or the connection will be closed.
Authentication Notes
Endpoints like /info
or /createapikey
require an auth token. Endpoints like /operation
or /upload_file
require an API key. Be sure to check which one is expected.