Nodes

AI Generate

The AI Generate node provides simple, straightforward text generation using AI models. It's ideal for content creation, summarization, and text transformation tasks.

Overview

AI Generate uses the AI SDK v6 for reliable text generation with support for multiple providers. Unlike the AI Agent node, it focuses purely on text generation without tool calling capabilities.

Configuration

Model Selection

ProviderModelsCredential Type
OpenAIGPT-4.1, GPT-4.1 Mini, GPT-4o, o1, o3OpenAI
AnthropicClaude Sonnet 4, Claude 3.7, Claude 3.5 HaikuAnthropic
GoogleGemini 2.5 Pro, Gemini 2.5 Flash, Gemini 2.0 FlashGoogle AI

Settings

FieldDescriptionDefault
NameNode identifier for output reference"AI Generate"
ModelAI model to usegpt-4o
CredentialStored credential for the AI providerOptional
System PromptInstructions for the AI"You are a helpful assistant."
PromptDirect text input-
Input VariableVariable from workflow context-
TemperatureCreativity level (0-2)0.7
Max TokensMaximum output lengthProvider default

Input Options

You can provide input in two ways:

Direct Prompt:

Write a product description for a wireless headphone with noise cancellation.

Input Variable: Reference data from previous nodes:

previousNode.output

Authentication

Option 1: Stored Credentials (Recommended)

  1. Create a credential in the Credentials page
  2. Select it in the node settings

Option 2: Environment Variables

  • OPENAI_API_KEY for OpenAI models
  • ANTHROPIC_API_KEY for Anthropic models
  • GOOGLE_GENERATIVE_AI_API_KEY for Google models

Output

The node outputs to the workflow context using its name:

{
  "AI Generate": {
    "text": "Generated content here...",
    "usage": {
      "promptTokens": 50,
      "completionTokens": 150,
      "totalTokens": 200
    },
    "finishReason": "stop"
  }
}

Example Use Cases

Content Generation

System Prompt: You are a marketing copywriter.
Prompt: Write a compelling email subject line for a summer sale.
Temperature: 0.8

Summarization

System Prompt: Summarize the following text in 3 bullet points.
Input Variable: httpRequest.body
Temperature: 0.3

Translation

System Prompt: Translate the following text to Spanish.
Input Variable: userInput.text
Temperature: 0.1

Best Practices

  1. Use appropriate temperature - Lower (0.1-0.3) for factual tasks, higher (0.7-1.0) for creative content
  2. Be specific in system prompts - Clear instructions yield better results
  3. Set max tokens - Prevent unexpectedly long outputs and control costs
  4. Use credentials - More secure than environment variables

On this page