Skip to content

OpenAI

Generate text responses with OpenAI models

Component key: openai.textPrompt

The Text Prompt component generates text responses using OpenAI’s language models.

  • Content generation: Generate text content, summaries, or descriptions
  • Natural language processing: Process and transform text using AI
  • Automated responses: Generate responses to user queries or events
  • Data transformation: Convert structured data into natural language
  • Model: Select the OpenAI model to use (e.g., gpt-4, gpt-3.5-turbo)
  • Prompt: The text prompt to send to the model (supports expressions)
  • Files: (Optional) Attach files from the Files tab (images, PDFs, or text). They are uploaded to the OpenAI Files API and sent alongside the prompt.
  • Structured Output: (Optional) Provide a JSON Schema for the response and the model returns JSON matching it, available on the parsed output. The schema is validated before the request and sent in OpenAI strict mode; strict mode marks every property required, so express optional fields by making their type nullable.

Returns the generated response including:

  • text: The generated text response
  • model: The model used for generation
  • usage: Token usage information (prompt tokens, completion tokens, total tokens)
  • id: Response ID for tracking
  • parsed: When Structured Output is configured, the response parsed into an object.
  • Requires a valid OpenAI API key configured in the application settings
  • Response quality and speed depend on the selected model
  • Token usage is tracked and may incur costs based on your OpenAI plan
  • Supports OpenAI-compatible providers by setting a custom Base URL in the integration settings (e.g., Azure OpenAI, Ollama, vLLM). Note: structured output uses the OpenAI Responses API text.format parameter and may not be supported by all compatible providers.
{
"data": {
"id": "cmpl-1234567890",
"model": "gpt-5.2",
"parsed": {
"language": "en",
"summary": "Hello, world!"
},
"text": "Hello, world!",
"usage": {
"input_tokens": 10,
"output_tokens": 10,
"total_tokens": 20
}
},
"timestamp": "2026-01-19T12:00:00Z",
"type": "openai.response"
}