Pollinations icon

Pollinations

Generate images, videos, text, audio, and music using Pollinations.ai

Text → Text Generation

AI-generated

Summary

Generate text from a prompt using Pollinations.ai language models

Inputs

  • textGenerationType — Type of text generation to use; determines which mode operates (simple prompt or chat completion). Default: simple.
  • textPrompt (required) — Text prompt for generation. Required when textGenerationType is simple. Ignored in chat mode.
  • textModel — AI model to use for text generation. Choose from the model list, or specify an ID via expression. Required in chat mode when textGenerationType is chat.
  • messages — Messages for the chat completion. Array of {role, content} objects. Used only when textGenerationType is chat. Default: [{role: 'user', content: ''}].
  • textAdditionalOptions — Additional generation options for chat mode. Supports jsonMode, max_tokens, reasoning_effort, seed, temperature, thinking_budget, top_p. Default: {}.

Output shape

json

Always returns a json object with at least the generated text. Simple mode returns {prompt, text: raw response string}. Chat mode returns {model, messages, response, text: extracted content from first choice message, or empty string}. PairedItem contains the original item index.

Examples

Example 1: Simple text generation

Set textGenerationType to 'simple' and provide a textPrompt. The node performs a GET request to https://gen.pollinations.ai/text/{prompt} and returns the response text.

Example 2: Chat completion

Set textGenerationType to 'chat', select a textModel, and configure messages with roles (system/user/assistant) and content. Optional textAdditionalOptions can adjust temperature, max_tokens, jsonMode, etc. The node POSTs to https://gen.pollinations.ai/v1/chat/completions and extracts the assistant message content.

Links

Discussion