OpenSS Local Engine API
A focused contract for connecting a local OpenSS desktop or browser interface to its Python processing engine.
A local integration surface
The OpenSS Local Engine API is an authenticated REST API served by the OpenSS process on your Mac. It connects a desktop or localhost browser interface to capture, OCR, chat, provider configuration, history and selected account-backed operations.
Contract at a glance
| Property | Value |
|---|---|
| Transport | HTTP on 127.0.0.1 |
| Base URL | The origin printed by openss gui or assigned by the desktop engine |
| Format | JSON requests and responses; text/event-stream for chat streaming |
| Authentication | One-time launch token exchanged for X-OpenSS-Session |
| Account access | X-OpenSS-Account-Token for hosted AI and account-backed entitlements |
| Discovery | Manually documented; OpenAPI, Swagger UI and ReDoc are disabled |
| Request limits | 12 MiB total body cap; chat message max 32,000 characters |
| API version | GET /api/version returns apiVersion: 1 |
The supported workflow
- 01Start the engine
Run openss gui or launch the desktop app. The engine binds to 127.0.0.1 and chooses an available port.
- 02Check compatibility
Call GET /api/version before using protected routes. This exposes desktopVersion, engineVersion and apiVersion without account data.
- 03Exchange the launch token
Send the launch token supplied by the local launch flow to POST /api/session/exchange. Keep the returned session token in memory.
- 04Capture locally
Call POST /api/screenshots/capture. The engine captures a supported window, runs OCR and returns a temporary screenshot ID.
- 05Stream an answer
POST the screenshot ID and an instruction to /api/chat/stream, then consume delta events until the final done event.
- 06Release the resource
Delete the screenshot with DELETE /api/screenshots/{screenshot_id} when the analysis is finished. The engine also expires temporary captures after 30 minutes.
What else is exposed
- System: /api/ping, /api/version and authenticated /api/health.
- Providers and models: /api/providers, /api/providers/status, /api/providers/validate, /api/providers/key, /api/models and /api/models/default.
- Chat and history: /api/chat, /api/chat/stream, /api/chat/cancel, /api/chats and /api/history.
- Settings and diagnostics: /api/settings, /api/doctor, /api/diagnostics and capture or permission settings.
- Meetings: a proxy surface under /api/meetings for account-backed meeting workflows; it is outside this quickstart.
Implementation source
The reference is maintained from the FastAPI server and Pydantic request schemas in OpenSS/src/openss/gui/server.py and OpenSS/src/openss/gui/schemas.py. When source and an older example disagree, the current engine behavior is authoritative.
OpenSS/src/openss/gui/server.py and schemas.py.