Table of Contents

Responses API

Ana Updated by Ana

Responses API

OpenAI's most advanced interface for generating model responses is now available in Landbot! The Responses API supports both text and image inputs, returning smart, context-aware text outputs. You can build stateful conversations, where the model remembers previous responses, and even enhance its abilities with tools like file search, web browsing, or access to your own systems via function calling.

How to Set Up Responses API in Landbot

Here’s a simple step-by-step guide to help you get started.

1. Start with our ready-made chatbot template

Download the template here and jump right in!

2. Take a look at the flow

You can preview the setup here:

3. Configure user input

The first block is an "Ask a Question" block where the user can type their message or question. This input is saved in a variable called @user_text.

4. Get your OpenAI API Key

If you haven’t already, create or find your OpenAI API key: here.

Paste it into the “Set a Field” block inside your bot.

5. Configure your prompt at OpenAI

Open the Webhook block in Landbot and check the body.

Here’s where you’ll need to add your prompt ID and version.

To get these, go to the Chat section of OpenAI and create a new prompt: here.

6. Write your System Message (Prompt)

This is the main instruction for how your virtual assistant should behave. We suggest starting with something simple (e.g., “You are a helpful support agent”) and testing it to see how it responds.

7. Customize as needed

You can tweak settings like the model type and tools. This is also where you can upload external files that serve as a knowledge base for your prompt.

8. Save and name your prompt

Once you're happy with your setup, click Save, give your prompt a name, and you're done!

9. Grab the Prompt ID and Version

After saving, you’ll see the prompt has been published. Copy the prompt ID and version, and paste them into the Webhook body back in Landbot.

10. Do a quick test

Say hello to your prompt and make sure everything is working smoothly (no errors!).

11. That’s it, time to test your bot!

Everything should be set up now, so go ahead Publish your last changes and start chatting. 🚀

Was this article helpful?

Create a JSON format response from OpenAI in WhatsApp

Connect OpenAI Assistant with Landbot

Contact