Bubble’s API Connector plugin is an essential tool for setting up outgoing RESTful API connections with external apps. In other words, this means you can hook up your Bubble app to external data sources or trigger certain actions based on events.

But sometimes, manually setting up your API connections and calls can be clunky and time-consuming. Good news: Many services provide a call response in cURL format in their documentation that you can copy and paste as a shortcut. In this walk-through, we’ll show you what those look like so you can be on the lookout for it next time you use the API connector. This example demonstrates how to use a cURL command to connect your API Connector with OpenAI and begin building AI into your app.

Follow along with these step-by-step instructions:

  1. Install the API Connector plugin to your Bubble project.
  2. Head to OpenAI’s developer reference on chat completion. You’ll need an OpenAI account and an authorization token for this exercise.
  3. Look in the upper-right of the demo editor to copy the example call response in cURL.
  4. Switch back to your Bubble API Connector tab and click on Import another call from cURL.
  5. Paste your example call and click Import.
  6. Ta-da — you now have the framework for a customizable OpenAI API call!