Skip to content

Updating visuals

If you see any images containing outdated UI, please bear with us.

We are updating all content as quickly as possible to mirror our new UI.

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 ​

  1. Connect your GPT provider in the Integrations tab.
  2. Create an API that takes user input.
  3. Call the GPT action and return the response.
  4. Display the response in your interface.

1) Connect the integration ​

  1. Open the Integrations tab.
  2. Connect the GPT integration you want to use.
  3. Store the API key in an environment variable.

2) Create an API to generate a response ​

  1. Open Data & API → APIs.
  2. Create an endpoint like POST /generate.
  3. Accept a field like prompt (the text the user sends).
  4. Call the GPT action with that text.
  5. Return the generated text.

3) Use it in the interface ​

  1. Add an input for the user’s question.
  2. On submit, call your POST /generate API.
  3. 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.