How do I add an LLM step to a workflow to write prompts or captions?

Add an LLM step to a workflow with the Run any LLM or Enhance Prompt node, then wire its text into an image or video node to write prompts or captions.

Last updated View as Markdown

To add an LLM step to a workflow, put a Run any LLM or Enhance Prompt node on the canvas, wire your brief into its Prompt input, and wire its text output into the Prompt input of the image or video node that should use it. When the workflow runs, upstream nodes run first and their outputs feed the nodes downstream, so the image or video node gets the text the LLM step just wrote.

Open the node picker with the + button or a right-click on the canvas, then search for each node by name. Type your brief into a Text Input node, the same way you type a prompt for an image model.

Which nodes write or rewrite text in a workflow?

Four nodes give you new text to wire into other nodes: Run any LLM answers your prompt with the language model you pick, Enhance Prompt rewrites a prompt for a text-to-image model, Bagel Understand describes an image, and Prompt Concatenator joins two texts into one.

Node What it does, per its node page Text inputs Text output
Run any LLM Runs a large language model: GPT, Claude, Gemini and more Prompt (required), System Prompt Response
Enhance Prompt node Enhances text prompts for text-to-image models Prompt (required), System Prompt Enhanced Prompt
Bagel Understand node Image understanding and visual Q&A: analyzes an image and gives a text description Prompt (required), plus an image on Image Url (required) Response Text
Prompt Concatenator node Joins multiple text inputs into one output Prompt 1, Prompt 2 Combined Text

Run any LLM and Enhance Prompt have the same inputs and setting fields, with different model lists in Model. Both also take images on Frames and Image 1, and in both you pick the language model in Model and can set Max Tokens, Reasoning and Temperature (0 to 2).

For a caption, ask Run any LLM for the caption itself, such as a one-line post caption, instead of an image prompt. To caption a picture you already have, wire the picture into Bagel Understand's Image Url and a question such as "Describe this product photo in one sentence" into its Prompt.

How do I pass the text into an image or video node?

Drag from the LLM node's text output, such as Response on Run any LLM, to the Prompt input of the image or video node, just as you would connect a Text Input. The connection carries the text when the workflow runs.

This example turns a short product brief into an image prompt and adds a fixed style line before the image model sees it:

Node Wire its output into
Text Input, labelled "Brief" Run any LLM, Prompt
Text Input, labelled "Instructions" Run any LLM, System Prompt
Run any LLM (output Response) Prompt Concatenator, Prompt 1
Text Input, labelled "Style" Prompt Concatenator, Prompt 2
Prompt Concatenator (output Combined Text) Nano Banana 2 node, Prompt

Example text for the "Instructions" input:

Write one image prompt for a product photo, based on the brief.
Describe the product, the setting and the light in under 60 words.
Answer with the prompt only.

If you only want a short idea expanded into a fuller image prompt, put Enhance Prompt in the same spot: wire the idea into its Prompt and its Enhanced Prompt output into the image node.

Click Run in the toolbar. Results appear on each node when it completes, so you can read the text the LLM step wrote on its node before you look at the image.

How do I write one prompt per scene from a single brief?

Wire the brief into Run any LLM's Prompt and an instruction into its System Prompt that asks for one image prompt per scene, returned as a JSON array. The node gives the whole list back on Response as one piece of text.

An instruction to start from:

You write image prompts for a short product video.
Split the brief into 4 scenes, in order.
Answer with only a JSON array of 4 strings, one image prompt per scene.
Describe the subject, the setting and the light in each prompt.

A brief to test it with:

A 20-second video for a reusable coffee cup: a commuter fills it at home,
carries it on a morning train, and drinks from it at her desk at sunset.

To send each scene prompt to the image node on its own, the list has to be split out of that text. The AI factory pattern shows the chain: an LLM writes its records as JSON, a JSON Extract step pulls out the array of image prompts, and a loop step sends the prompts to the image model. To wire a list into one image node with the Text Iterator node, see run one workflow over a list.

How do I run it again from the API with a new brief?

Call POST /api/v1/workflows/{id}/run with the new brief as the value of the Text Input that holds it. Wireflow loads the saved workflow, puts your text into that input and runs the whole workflow, LLM step included.

1. Find the input id. GET the same /run URL. A Text Input with no incoming connection is listed as an input of type text, unless the workflow has published input settings, which expose only the inputs they name.

curl https://www.wireflow.ai/api/v1/workflows/YOUR_WORKFLOW_ID/run \
  -H "Authorization: Bearer $WIREFLOW_API_KEY"

2. Start a run with the new brief. Use the id from step 1 in place of node-brief. Inputs you leave out, such as the instructions and the style line, keep the value saved in the workflow.

curl -X POST https://www.wireflow.ai/api/v1/workflows/YOUR_WORKFLOW_ID/run \
  -H "Authorization: Bearer $WIREFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"inputs": {"node-brief": "A 15-second video for a trail running shoe: mud, a river crossing and a sunrise finish."}}'

3. Get the result. The reply is 202 Accepted with an executionId and a poll path. Poll that path, or add a webhook block to the run: each delivery lists every node that ran in nodeStates, with its text or its output URLs. Check when a run is finished covers both.

The API key needs the workflows:execute scope, or Full access, and the key owner's credits pay for each AI model node that runs. Run Workflows has the full request and response.

What does a text step cost?

Run any LLM and Enhance Prompt cost about 3 credits a run and Bagel Understand about 16, while Text Input and utility nodes such as Prompt Concatenator are free.

Node Price on its node page Price on the pricing page
Run any LLM About 3 credits per unit 3 credits per run
Enhance Prompt About 3 credits per unit 3 credits per run
Bagel Understand About 16 credits per request 16 credits per run
Prompt Concatenator No price listed Not listed

A text step is charged each time it runs, like any AI model node, and the image or video node it feeds is charged at its own price. The cost depends on the model and its settings, so check the credit estimate before you run and see the pricing page for current credits.

For AI agents: the full documentation index is at /llms.txt, and most docs pages are available as Markdown by adding .md to the URL.

© 2026 Wireflow. All rights reserved.