PermuteDocs
Go to Permute

Chats · chatsStop

Stop generation

Stop an active generation.

POST/v1/chats/{chatId}/stop
betauserworkspace

When to use

Stop an active generation.

For agents

Cancellation does not reverse an action already submitted for execution.

Example

typescript
import { PermuteAppClient } from '@permute/sdk/app';

const client = new PermuteAppClient();
const result = await client.chats.stop('chat_abcdefghijklmnopqrstuvwx');

Response

json
{
  "data": {
    "id": "chat_abcdefghijklmnopqrstuvwx",
    "status": "cancelled",
    "error": null,
    "conversation": [],
    "traceSteps": []
  }
}