# Sandbox.Services.Ai.Query

An AI request created by Config.CreateQuery. Add input and images, then Run it independently
or send its message to a chat. Build and submit on the calling game context.

- Kind: class
- Assembly: `Sandbox.Engine`
- Modifiers: sealed

## Properties

- [`Input`](/api/Sandbox.Services.Ai.Query/Input): Text to send. May be omitted when images are supplied.

## Methods

- [`AddImage`](/api/Sandbox.Services.Ai.Query/AddImage): Adds an HTTP(S) image URL or a base64 image data URL in JPEG, PNG, WebP or GIF format. HTTP(S) URLs are forwarded to the AI provider without downloading them locally.
- [`Run`](/api/Sandbox.Services.Ai.Query/Run): Runs the query and any configured tools. After an interrupted tool turn, Run again on this query to resume the retained submission without rerunning completed tools. Reaching MaxToolRounds is terminal for this query; create a new query with a higher configured limit if needed.
