# Sandbox.Services.Ai.Chat.Send

## Overload 1

```csharp
System.Threading.Tasks.Task<Response> Send(string input = null, IEnumerable<string> images = null, System.Threading.CancellationToken cancellationToken = null)
```

### Parameters

- `input` (`string`), default `null`
- `images` (`IEnumerable<string>`), default `null`
- `cancellationToken` (`System.Threading.CancellationToken`), default `null`

### Returns

`System.Threading.Tasks.Task<Response>`

## Overload 2

```csharp
System.Threading.Tasks.Task<Response> Send(Query query, System.Threading.CancellationToken cancellationToken = null)
```

Sends a prepared query's input and images, executing registered tool callbacks automatically.
Uses the query's input and images; the chat retains its own configuration.

### Parameters

- `query` (`Query`): A message builder with Input and/or images. Its contents are captured before the turn begins.
- `cancellationToken` (`System.Threading.CancellationToken`), default `null`: Cancels image preparation, network requests and asynchronous tool callbacks for this turn.

### Returns

`System.Threading.Tasks.Task<Response>`: The final assistant response after all automatically handled tool rounds.

Declared in [Sandbox.Services.Ai.Chat](/api/Sandbox.Services.Ai.Chat).
Assembly: `Sandbox.Engine`.
