> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vectorshift.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# LLM tools

> Generate and analyze images, audio, and documents.

Add these tools with `AgentTools.<tool>(tool_name="...", ...)` or `agent.add_tool.<tool>(tool_name="...", ...)`. Every tool requires a unique `tool_name=`. Each entry lists the tool's configuration parameters. See the [Agent reference](https://docs.vectorshift.ai/sdk/agent/reference.md) for attaching and running tools.

## `ai_image_to_image` — Image to Image

Modify and edit images using AI by providing modification instructions

> [!NOTE]
>
> Platform docs: [Image to Image](https://docs.vectorshift.ai/platform/pipelines/multi-modal/image-to-image)

```python Sync theme={"languages":{}}
AgentTools.ai_image_to_image(tool_name="...", use_personal_api_key=True, provider="google", api_key="...")
```

**Parameters**

**use\_personal\_api\_key** `bool` *required*

Use your personal API key

**provider** `str` *required*

Select the model provider.
One of: `google`, `openai`

**aspect\_ratio** `str`

Select the aspect ratio for the output image.

**images** `list[str]`

Array of input images to modify. Provide 1-3 images for best results.

**model** `str`

Select the image-to-image model

**prompt** `str`

Tell the AI model how you would like it to modify the images. Be as specific as possible. For example, you can instruct the model to change colors, add elements, apply artistic styles, or blend multiple images. Must not be empty.

**size** `str`

Select the size.

**api\_key** `str` *required*

Input your personal API key from the model provider. Note: if you do not have access to the selected model, the workflow will not run

## `ai_image_to_text` — Image to Text

Generate Text from Image using AI

> [!NOTE]
>
> Platform docs: [Image to Text](https://docs.vectorshift.ai/platform/pipelines/multi-modal/image-to-text)

```python Sync theme={"languages":{}}
AgentTools.ai_image_to_text(tool_name="...", use_personal_api_key=True, json_response=True, stream=True, image="...")
```

**Parameters**

**use\_personal\_api\_key** `bool` *required*

Use your personal API key

**json\_response** `bool` *required*

Return the response as a JSON object

**stream** `bool` *required*

Stream the response

**image** `str` *required*

The image to analyze. For agent tool calls, pass an existing file reference such as $history.MESSAGE_ID, $tool.CALL\_ID.OUTPUT\_KEY, or \$input.NAME; never pass an empty string.

**max\_tokens** `int`

The maximum number of tokens to generate

**prompt** `str`

Instructions on what you want to analyze from the image.

**system** `str`

Tell the AI model how you would like it to respond. Be as specific as possible. For example, you can instruct the model on what tone to respond in or how to respond given the information you provide

**temperature** `float`

The temperature of the model

**top\_p** `float`

The top-p value

**json\_schema** `str` *required*

The JSON schema to use for the response

**api\_key** `str` *required*

Input your personal API key from the model provider. Note: if you do not have access to the selected model, the workflow will not run

## `ai_speech_to_text` — Speech to Text

Generate Text from Audio using AI

> [!NOTE]
>
> Platform docs: [Speech to Text](https://docs.vectorshift.ai/platform/pipelines/multi-modal/speech-to-text)

```python Sync theme={"languages":{}}
AgentTools.ai_speech_to_text(tool_name="...", use_personal_api_key=True, provider="deepgram", audio="...", api_key="...")
```

**Parameters**

**use\_personal\_api\_key** `bool` *required*

Use your personal API key

**provider** `str` *required*

Select the model provider.
One of: `deepgram`, `openai`

**audio** `str` *required*

The audio for conversion

**model** `str`

Select the speech-to-text model

**tier** `str`

Select the tier

**api\_key** `str` *required*

Input your personal API key from the model provider. Note: if you do not have access to the selected model, the workflow will not run

## `ai_text_to_image` — Text to Image

Generate Image from Text using AI

> [!NOTE]
>
> Platform docs: [Text to Image](https://docs.vectorshift.ai/platform/pipelines/multi-modal/text-to-image)

```python Sync theme={"languages":{}}
AgentTools.ai_text_to_image(tool_name="...", use_personal_api_key=True, provider="flux", api_key="...")
```

**Parameters**

**use\_personal\_api\_key** `bool` *required*

Use your personal API key

**provider** `str` *required*

Select the model provider.
One of: `flux`, `openai`, `stabilityai`, `xai`

**aspect\_ratio** `str`

Select the aspect ratio.

**prompt** `str`

Tell the AI model how you would like it to respond. Be as specific as possible. For example, you can instruct the model to use bright colors. Must not be empty.

**size** `str`

Select the size.

**api\_key** `str` *required*

Input your personal API key from the model provider. Note: if you do not have access to the selected model, the workflow will not run

## `ai_text_to_speech` — Text To Speech

Generate Audio from text using AI

> [!NOTE]
>
> Platform docs: [Text To Speech](https://docs.vectorshift.ai/platform/pipelines/multi-modal/text-to-speech)

```python Sync theme={"languages":{}}
AgentTools.ai_text_to_speech(tool_name="...", use_personal_api_key=True, text="...", api_key="...")
```

**Parameters**

**use\_personal\_api\_key** `bool` *required*

Use your personal API key

**text** `str` *required*

The string input for conversion.

**model** `str`

Select the text-to-speech model

**voice** `str`

Select the voice

**api\_key** `str` *required*

Input your personal API key from the model provider. Note: if you do not have access to the selected model, the workflow will not run

## `reducto_extract` — Reducto Extract

Extract structured data from documents using Reducto

```python Sync theme={"languages":{}}
AgentTools.reducto_extract(tool_name="...")
```

**Parameters**

**api\_key** `str` (default: '')

Your personal Reducto API key.

**deep\_extract** `Any`

Enable agentic deep extraction for higher accuracy. Uses iterative verification against the source material.

**files** `Any`

Documents to extract data from (up to 2,500 pages per document).

**json\_schema** `Any`

A JSON schema defining the structure of data to extract. Use descriptive field names.

**system\_prompt** `Any`

Instructions for how the AI should extract and verify data from the documents.

**use\_personal\_api\_key** `bool` (default: False)

Use your own Reducto API key instead of the platform default.

**return\_citations** `bool` (default: False)

Return citation bounding boxes for extracted fields.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.