Endpoint reference
A focused reference for the supported system, session, screenshot and chat routes.
Conventions
Paths are relative to the dynamically assigned local origin, for example http://127.0.0.1:53142. Unless an endpoint is marked Bootstrap, send X-OpenSS-Session. JSON error responses use the same envelope across the local server.
System and session
/api/pingCheck that the process responds.
{"ok":true}/api/versionRead the desktop, engine and local API versions.
{"desktopVersion":"0.2.8","engineVersion":"0.2.8","apiVersion":1}/api/session/exchangeExchange a one-time local launch token for a session token.
{"launchToken":"<one-time-launch-token>"}{"sessionToken":"<session-token>"}401 INVALID_LAUNCH_TOKEN/api/healthRead local health, history backend and configured providers.
{"status":"ok","ok":true,"historyBackend":"sqlite","configuredProviders":["openai"]}401 INVALID_GUI_SESSIONScreenshots
/api/screenshots/captureCapture a supported target and run local OCR.
{"target":"chrome","fullSlide":false}{"screenshotId":"<id>","previewDataUrl":"data:image/png;base64,...","target":"chrome","createdAt":"2026-07-29T12:00:00","ocrText":"..."}401 INVALID_GUI_SESSION413 REQUEST_TOO_LARGE400 capture error/api/screenshots/{screenshot_id}Delete a temporary server-owned screenshot.
{"deleted":true}404 INVALID_SCREENSHOT_IDChat
/api/chatRun a non-streaming local provider request.
{"message":"Explain this","source":"manual","sessionId":null}{"text":"...","provider":"openai","model":"...","sessionId":"...","autocopy":{"mode":"off","kind":null,"text":null}}404 INVALID_SCREENSHOT_ID400 SCREENSHOT_REQUIRED/api/chat/streamStream incremental model output over Server-Sent Events.
{"message":"Explain this","source":"manual","screenshotId":null,"sessionId":null}text/event-stream; data: {"delta":"..."}\n\ndata: {"done":true,"text":"...","sessionId":"...","autocopy":{...}}404 INVALID_SCREENSHOT_ID422 INVALID_REQUEST/api/chat/cancelAcknowledge cancellation for a request ID.
{"requestId":"request-123"}{"cancelled":true,"requestId":"request-123"}Hosted AI
/api/hosted-ai/respondProxy an account-authenticated request to OpenSS-hosted AI.
{"message":"Explain this","source":"text","modelTier":"mini"}{"text":"...","provider":"openss","model":"hosted","sessionId":"...","autocopy":{...}}401 ACCOUNT_SIGN_IN_REQUIRED503 HOSTED_AI_UNAVAILABLEProviders and models
/api/providersList providers, configuration state and masked keys.
{"providers":[{"id":"openai","displayName":"OpenAI","configured":true,"maskedKey":"sk-...","models":[...]}]}/api/modelsList supported models and the default model.
{"defaultModel":"...","models":[{"id":"...","supportsVision":true,...}]}/api/models/defaultSet the local default model.
{"model":"<model-id>"}{"defaultModel":"<model-id>"}History and chat context
/api/historyList up to 50 recent local sessions.
{"sessions":[{"id":"...","title":"...","lastActive":"..."}]}/api/history/{session_id}Read messages for a local session.
{"sessionId":"...","messages":[{"role":"user","text":"...","timestamp":"..."}]}/api/chatsCreate a local chat record.
{"title":"Research notes"}{"chatId":"..."}409 HISTORY_DISABLEDCore request fields
| Field | Type and limit | Use |
|---|---|---|
| launchToken | string, 1–512 | One-time bootstrap exchange |
| target | string or null, max 32 | Capture target, for example chrome |
| fullSlide | boolean | PowerPoint full-slide capture |
| message | string or null, max 32,000 | Current instruction or manual prompt |
| screenshotId | string or null, max 128 | Temporary capture to analyze |
| sessionId | string or null, max 128 | Existing conversation history |
| modelTier | mini | luna | terra | sol | Hosted model tier when applicable |
| source | manual | capture | voice | How the request originated |
| chatContext | string or null, max 4,000 | Pro-only persistent context path |
OpenSS/src/openss/gui/server.py and schemas.py.