***

title: aiStop
slug: /reference/typescript/rest/calling/ai-stop
description: Stop an active AI session on a call via REST.
max-toc-depth: 3
---------------------

For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

Stop an active AI session on a call. The AI agent is disconnected but
the call itself remains active, allowing further call control operations.

<EndpointSchemaSnippet endpoint="POST /api/calling/calls" />

## **Response Example**

<EndpointResponseSnippet endpoint="POST /api/calling/calls" />

## **Example**

```typescript {10}
import { RestClient } from "@signalwire/sdk";

const client = new RestClient({
  project: "your-project-id",
  token: "your-api-token",
  host: "your-space.signalwire.com"
});

// Stop AI and then play a goodbye message
await client.calling.aiStop("call-id-xxx", { control_id: "ctrl-id" });
await client.calling.play("call-id-xxx", {
  play: [{ type: "tts", text: "Thank you for calling. Goodbye!" }]
});
await client.calling.end("call-id-xxx", { reason: "hangup" });
```