AI Nodes
Meadow provides visual scripting nodes for integrating AI capabilities directly into your experiences. You can send text and image prompts to large language models and use text-to-speech to generate audio โ all from within your visual scripting graphs.
Requirements
All AI nodes require an API key from the respective provider. You are responsible for your own API usage and costs. Keep your API keys secure and be mindful of rate limits.
- ChatGPT / ChatGPT TTS: OpenAI API key
- Claude: Anthropic API key
- Gemini / Gemini TTS: Google AI API key
Chat Nodes
The chat nodes send a text prompt (and optionally an image) to an AI model and return a text response. All three chat nodes share the same interface pattern.
ChatGPT
Sends a request to OpenAIโs ChatGPT API.
Inputs:
- Message:
stringโ The user prompt to send. - Image (optional):
Texture2Dโ An image to include with the prompt (vision). - System Prompt (optional):
stringโ Instructions that guide the AIโs behaviour. - API Key:
stringโ Your OpenAI API key. - Model:
ChatGPTModelโ Which model to use. Options:- GPT-5.2, GPT-5.1, GPT-5, GPT-5 Mini, GPT-5 Nano
- GPT-4.1, GPT-4.1 Mini, GPT-4.1 Nano
- o4 Mini
- Max Tokens:
intโ Maximum length of the response (default: 1024).
Outputs:
- Success โ Control flow on successful response.
- Failure โ Control flow on error.
- Response:
stringโ The AIโs text response. - Error:
stringโ Error message if the request failed.
Claude
Sends a request to Anthropicโs Claude API.
Inputs:
- Message:
stringโ The user prompt to send. - Image (optional):
Texture2Dโ An image to include with the prompt (vision). - System Prompt (optional):
stringโ Instructions that guide the AIโs behaviour. - API Key:
stringโ Your Anthropic API key. - Model:
ClaudeModelโ Which model to use. Options:- Claude Sonnet 4.5, Claude Opus 4.5, Claude Opus 4.1
- Claude Sonnet 4, Claude Opus 4
- Claude 3.5 Haiku
- Max Tokens:
intโ Maximum length of the response (default: 1024).
Outputs:
- Success โ Control flow on successful response.
- Failure โ Control flow on error.
- Response:
stringโ The AIโs text response. - Error:
stringโ Error message if the request failed.
Gemini
Sends a request to Googleโs Gemini API.
Inputs:
- Message:
stringโ The user prompt to send. - Image (optional):
Texture2Dโ An image to include with the prompt (vision). - System Prompt (optional):
stringโ Instructions that guide the AIโs behaviour. - API Key:
stringโ Your Google AI API key. - Model:
GeminiModelโ Which model to use. Options:- Gemini 3 Flash (Preview), Gemini 3 Pro (Preview)
- Gemini 2.5 Flash, Gemini 2.5 Pro
- Gemini 2.0 Flash
- Max Tokens:
intโ Maximum length of the response (default: 1024).
Outputs:
- Success โ Control flow on successful response.
- Failure โ Control flow on error.
- Response:
stringโ The AIโs text response. - Error:
stringโ Error message if the request failed.
Text-to-Speech Nodes
The TTS nodes convert text into spoken audio, returning an AudioClip that you can play with an AudioSource component.
ChatGPT TTS
Generates speech using OpenAIโs TTS API.
Inputs:
- Text:
stringโ The text to convert to speech (max 4096 characters). - API Key:
stringโ Your OpenAI API key. - Model:
ChatGPTTTSModelโ Which TTS model to use. Options:- GPT-4o Mini TTS
- TTS-1
- TTS-1 HD
- Voice:
ChatGPTTTSVoiceโ The voice to use. Options:- Alloy, Ash, Ballad, Coral, Echo, Sage, Shimmer, Verse, Marin, Cedar
- Speed:
floatโ Playback speed (0.25 to 4.0, default: 1.0).
Outputs:
- Success โ Control flow on successful response.
- Failure โ Control flow on error.
- Audio Clip:
AudioClipโ The generated speech audio. - Error:
stringโ Error message if the request failed.
Gemini TTS
Generates speech using Googleโs Gemini TTS API.
Inputs:
- Text:
stringโ The text to convert to speech. - API Key:
stringโ Your Google AI API key. - Voice:
GeminiTTSVoiceโ The voice to use. Options:- Aoede, Charon, Fenrir, Kore, Puck, Leda, Orus, Zephyr
Outputs:
- Success โ Control flow on successful response.
- Failure โ Control flow on error.
- Audio Clip:
AudioClipโ The generated speech audio. - Error:
stringโ Error message if the request failed.
Playing TTS Audio
To play the audio clip returned by a TTS node:
- Add an
AudioSourcecomponent to a GameObject in your scene. - After the TTS nodeโs Success output, use a Set AudioSource Clip node to assign the audio clip.
- Use a Play AudioSource node to play it.
Tips
- System prompts are useful for setting the AIโs personality, language, or constraining its output format. For example: โYou are a friendly museum guide. Keep responses under 50 words.โ
- Vision works by connecting a
Texture2Dto the Image input. This could be a camera capture, a rendered texture, or any image in your scene. The AI will describe or respond based on the image content. - Smaller models are faster and cheaper. Use GPT-5 Nano, Claude 3.5 Haiku, or Gemini 2.0 Flash for quick interactions. Save the larger models for complex reasoning.
- API calls take time. Consider showing a loading indicator while waiting for responses, especially on slower connections.
- All AI nodes are found under the XREF โ AI category in the visual scripting fuzzy finder.