Chat

Cancel a chat turn

POST
/api/v1/chat/{session_id}/cancel

Stop the turn running in a conversation. stopped is false when nothing was running — the turn had already finished — which is not an error. A turn inside a long model call stops when that call returns; its stream ends with cancelled, then done.

apiKey
headerAuthorizationBearer <token>

An API key, sk-syn- and 32 characters. On SynapseOrch Cloud an owner or admin makes it under Settings → Developer; on a self-hosted install, under Settings → API Keys.

session_id*string

The conversation.

Response Body

The cancel was requested.

application/json
  1. response
status?string
session_id?string
stopped?boolean
curl -X POST "https://api.synapseorch.com/api/v1/chat/chat_01a1205c3e8f7a2b9d4c6e1f0a3b5d7c/cancel" \  -H "Authorization: Bearer sk-syn-..."
{  "status": "cancellation_requested",  "session_id": "stream-test",  "stopped": true}