HTTP API
Complete guide to Mix's HTTP REST API for programmatic integration and automation.
Mix provides a REST API interface for programmatic integration and automation. The recommended way to interact with the server is throught the generated client SDK's.
HTTP Endpoints Reference
Core API Endpoints
Endpoint | Method | Purpose | Content Type |
---|---|---|---|
/health | GET | Monitor server status and service health | application/json |
/doc | GET | View OpenAPI documentation | application/json |
/stream | GET | Server-sent events streaming endpoint | text/event-stream |
/stream/message | GET | Message queue endpoint for persistent SSE | text/event-stream |
/api/video/export-url | GET | URL video export endpoint | application/json |
/api/file-types | GET | Get supported file types | application/json |
/input/ | GET | Serve input asset files | */* |
/output/ | GET | Serve output asset files | */* |
Sessions API
Endpoint | Method | Purpose | Content Type |
---|---|---|---|
/api/sessions | GET | List all sessions | application/json |
/api/sessions | POST | Create a new session | application/json |
/api/sessions/{id} | GET | Get session details | application/json |
/api/sessions/{id} | DELETE | Delete a session | application/json |
/api/sessions/{id}/fork | POST | Fork an existing session | application/json |
Messages API
Endpoint | Method | Purpose | Content Type |
---|---|---|---|
/api/sessions/{id}/messages | GET | List session messages | application/json |
/api/sessions/{id}/messages | POST | Send message to session | application/json |
/api/messages/history | GET | Get global message history | application/json |
/api/sessions/{id}/cancel | POST | Cancel agent processing | application/json |
Authentication API
Endpoint | Method | Purpose | Content Type |
---|---|---|---|
/api/auth/login | POST | OAuth authentication | application/json |
/api/auth/apikey | POST | Set API key | application/json |
/api/auth/api-key | POST | Store API key for a specific provider | application/json |
/api/auth/{provider} | DELETE | Delete provider credentials | application/json |
/api/auth/status | GET | Get authentication status | application/json |
/api/auth/validate | GET | Validate preferred provider | application/json |
/api/auth/oauth/{provider} | POST | Start OAuth authentication | application/json |
/api/auth/oauth-callback | POST | Handle OAuth callback | application/json |
Preferences API
Endpoint | Method | Purpose | Content Type |
---|---|---|---|
/api/preferences | GET | Get user preferences | application/json |
/api/preferences | POST | Update user preferences | application/json |
/api/preferences/providers | GET | Get available providers | application/json |
/api/preferences/reset | POST | Reset preferences to defaults | application/json |
System API
Endpoint | Method | Purpose | Content Type |
---|---|---|---|
/api/mcp | GET | List MCP servers | application/json |
/api/commands | GET | List available commands | application/json |
/api/commands/{name} | GET | Get specific command | application/json |
/api/permissions/{id}/grant | POST | Grant permission | application/json |
/api/permissions/{id}/deny | POST | Deny permission | application/json |