Skip to Content
Docs

Ask a running draft turn to stop

POST
/api/drafter/turns/{turn_id}/cancel

Stop the caller's draft turn: it makes no further model calls and its stream ends with end. The id is the turn_id the stream request sent, or the stream's first event (turn). A stop that arrives before the turn has started stops it as soon as it does. The stop is kept under the caller's name, so it never reaches another user's turn. Answers 202 once the request is stored, whether or not the caller has such a turn. Args: turn_id: The id the stream request sent, or the one its turn event carried.

Returns: 202 when the stop was stored, 404 for a malformed id, 503 without Redis.

Not available to personal access tokens; call it from a signed-in session.

Authorization

bearer
headerAuthorizationBearer <token>

A session token or a personal access token. Leave it empty when the instance runs without authentication (AUTH_TYPE unset).

Path Parameters

turn_id*string

Response Body

The stop was requested

Example Request
curl -X POST 'http://localhost:7091/api/drafter/turns/string/cancel'
Example Response
Empty