> ## Documentation Index
> Fetch the complete documentation index at: https://docs.avicenna.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate Text

> Use AI to generate text from a prompt within your flow.

The **Generate Text** action allows you to generate text dynamically during your endpoint execution using your connected ChatGPT integration.

At runtime, this block sends your prompt to the selected model and stores the generated output for use in later blocks.

<Callout icon="puzzle">
  This action requires the **ChatGPT Integration** to be configured in order to run. Your endpoint flow will ignore this block if the integration is not properly configured.
</Callout>

<Frame>
  <img src="https://mintcdn.com/avicenna-a10e7e50/5pBk2GgcYokY4NXx/images/Screenshot2026-02-26at6.48.48PM.png?fit=max&auto=format&n=5pBk2GgcYokY4NXx&q=85&s=fb2090d6a5bb15e904b1306a54e8a96e" alt="Screenshot2026 02 26at6 48 48PM" width="816" height="348" data-path="images/Screenshot2026-02-26at6.48.48PM.png" />
</Frame>

***

### Prompt

The **prompt** field is the instruction sent to the model. You write constant instructions that will always be the same, or use variables within your instructions to customize the generated text every time the endpoint is run!

For example:

```text theme={null}
Write a short welcome email for {params.partner}.
```

### Model

The **model** dropdown defines which model generates the response.

Different models can vary in speed, cost, output quality, or context length. Choose the model that best fits your use case.

### Temperature

The **temperature** value controls how deterministic or creative the output is.

* `0.0` → Very deterministic and predictable
* `0.5` → Balanced
* `1.0` → More creative and varied

Lower values are ideal for structured or factual outputs. Higher values are better for brainstorming or creative writing.

### Reference Variable

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/avicenna-a10e7e50/images/Screenshot2026-02-26at7.01.06PM.png" alt="Screenshot2026 02 26at7 01 06PM" />
</Frame>

This variable allows you to refer to the result of the text generation in future action blocks down your endpoint's flow. This variable must be assigned a custom name.

<Tip>
  Make your reference variable names as descriptive and unique as possible to prevent your endpoint flow from becoming cluttered. If a future variable is assigned the same name, the value of your reference variable will be overriden.
</Tip>
