API Reference
Base URL
- Development:
http://localhost:4020 - Production: Configurable via settings
Authentication
Token Generation
Session Management
Create Session
List Sessions
Get Session Details
Delete Session
Resize Terminal
WebSocket Connection
WebSocket v3 (/ws)
- Endpoint:
GET /ws(WebSocket upgrade) - Framing: binary v3 frames (
"VT"magic, version3, type, sessionId, payload) - Multiplexing: one socket carries multiple session subscriptions
docs/websocket.md.
Health Check
Server Status
Error Responses
| Status | Error | Description |
|---|---|---|
| 400 | Bad Request | Invalid parameters |
| 401 | Unauthorized | Missing/invalid token |
| 404 | Not Found | Session not found |
| 409 | Conflict | Session already exists |
| 500 | Server Error | Internal error |
Rate Limiting
- Session Creation: 10 per minute
- API Calls: 100 per minute
- WebSocket Messages: Unlimited
Terminal Transport (WebSocket v3)
Terminal I/O uses a single/ws WebSocket with binary v3 framing and multiplexed sessions.
Details: docs/websocket.md.