***

title: ai_message
slug: /reference/python/rest/calling/ai-message
description: Send a message to 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

Send a message to an active AI session on a call. This injects instructions
or context into the AI agent's conversation without the caller hearing the
message directly.

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

## **Response Example**

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

## **Example**

```python {10}
from signalwire.rest import RestClient

client = RestClient(
    project="your-project-id",
    token="your-api-token",
    host="your-space.signalwire.com",
)

# Inject a system instruction into the AI session
client.calling.ai_message(
    call_id="call-id-xxx",
    message_text="The caller's account has been verified. You can proceed with the transfer.",
    role="system",
)
```