curl --request POST \
--url https://api.capout.ai/ws/token \
--header 'capout-api-key: <api-key>'{
"token": "rt_123",
"organization_id": "org_123",
"expires_at": "2026-04-14T14:45:00Z",
"ws_url": "/ws/status",
"sse_url": "/sse/status"
}Mint a short-lived realtime token for WebSocket or SSE authentication.
Connection flow:
POST /ws/token with your capout-api-key.token, ws_url, and sse_url from the response.wss://api.capout.ai/ws/status?token=<token> for WebSocket updates, or https://api.capout.ai/sse/status?token=<token> for Server-Sent Events.document_id=<document_id> repeated one or more times, or recent=10 to subscribe to the most recent organization-owned documents.After a WebSocket connection is established, clients can send JSON commands such as {"action":"subscribe","document_ids":["doc_123"]}.
curl --request POST \
--url https://api.capout.ai/ws/token \
--header 'capout-api-key: <api-key>'{
"token": "rt_123",
"organization_id": "org_123",
"expires_at": "2026-04-14T14:45:00Z",
"ws_url": "/ws/status",
"sse_url": "/sse/status"
}Organization-scoped API key used for REST endpoints and for minting realtime tokens.
Successful response
Response body for POST /ws/token.
Short-lived realtime token for query-parameter auth.
"rt_123"
Organization bound to this realtime token.
"org_123"
UTC expiration time for the realtime token.
"2026-04-14T14:45:00Z"
WebSocket path to connect to with ?token=<token>.
"/ws/status"
SSE path to connect to with ?token=<token>.
"/sse/status"