Appearance
Return
Generating responses with GPT
Generate text responses with GPT from an API and show them in your interface.
TEMPLATE AVAILABLE
If you wish to skip the manual setup, there is a workflow template available called Send Prompt to OpenAI or Send Multiple Messages to OpenAI. You can find it inside the templates available when creating an API workflow.
Steps at a glance ​
- Connect your GPT provider in the
Integrationstab. - Create an API that takes user input.
- Call the GPT action and return the response.
- Display the response in your interface.
1) Connect the integration ​
- Open the
Integrationstab. - Connect the GPT integration you want to use.
- Store the API key in an environment variable.
2) Create an API to generate a response ​
- Open
Data & API → APIs. - Create an endpoint like
POST /generate. - Accept a field like
prompt(the text the user sends). - Call the GPT action with that text.
- Return the generated text.
3) Use it in the interface ​
- Add an input for the user’s question.
- On submit, call your
POST /generateAPI. - Show the returned text on the page.
Common pitfalls ​
The response is slow ​
- Keep prompts short and return only what you need.
- Show a loading state while waiting.

