Unified API: Endpoint Examples

Proxy Endpoint (/proxy)

Used to fetch special links (docs, dashboard, etc.). No authentication needed.

BASH
POST /proxy { "action": "docs" }

Possible actions include: dashboard, billing, docs, settings, agents, support.

Create API Key (/createapikey)

Create a new API key using an auth token.

BASH
POST /createapikey { "auth_token": "USERID:TIMESTAMP:RANDOM", "key_name": "My New Key" }

Returns the new API key, which should be stored securely.

Get Info (/info)

Retrieve information about agents, credits, usage, etc.:

BASH
POST /info { "auth_token": "USERID:TIMESTAMP:RANDOM", "action": "get_credits" }

Available actions:

  • get_api_keys - Returns all API keys for the user
  • get_agents - Returns all agents for the user
  • get_agents_for_api_key - Returns agents for the user's first API key
  • get_credits - Returns credits for the user
  • get_usage - Returns usage statistics for the user
  • get_agent_info - Returns detailed information about a specific agent (requires agent_id parameter)

Operation (/operation)

Send an operation (e.g., 'message', 'stop_agent') to an agent:

BASH
POST /operation { "operation": "message", "params": { "message": "Hello Agent" }, "api_key": "YOUR_API_KEY", "agent_id": "YOUR_AGENT_ID" }

For stopping an agent:

BASH
POST /operation { "operation": "stop_agent", "params": { "message": "User requested stop", "reason": "Task completed" }, "api_key": "YOUR_API_KEY", "agent_id": "YOUR_AGENT_ID" }

Responses include WebSocket URLs for streaming.

Upload File (/upload_file)

Upload a file to an agent:

Form fields: api_key, agent_id, file_path File: Sent as multipart form data.

BASH
POST /upload_file Content-Type: multipart/form-data # form-data: api_key=YOUR_API_KEY agent_id=YOUR_AGENT_ID file_path=relative/path.txt file=@/local/path/to/file.txt

Response includes WebSocket URLs for streaming.

Agent History (/agent_history)

Retrieve an agent's chat or action history:

BASH
POST /agent_history { "api_key": "YOUR_API_KEY", "agent_id": "YOUR_AGENT_ID", "history_type": "chat", "filter_count": "5" }
  • history_type can be chat or act
  • filter_count can be 1, 5, 10, or all (default: 5)

Delete Agent (/delete_agent)

Delete an agent from the repository:

BASH
POST /delete_agent { "api_key": "YOUR_API_KEY", "agent_id": "YOUR_AGENT_ID" }

This operation is permanent and cannot be undone.

Health Check (/health)

Check the health status of the API service:

BASH
GET /health

Returns status information about database, Redis, broker connections, and active WebSocket connections.