Stop a generation.
POST
/api/runs/{id}/cancel
const url = 'http://localhost:5173/api/runs/example/cancel';const options = { method: 'POST', headers: {cookie: 'authjs.session-token=<authjs.session-token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:5173/api/runs/example/cancel \ --cookie authjs.session-token=<authjs.session-token>Whatever the model had already written still comes back through the stream, as an ending rather than as nothing.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Responses
Section titled “Responses”The run

