# Call OpenAI with the OpenAI pipe

> Send record data and a prompt to OpenAI with your own API key. Most calls in this pipe use a retired model; use the OpenAI Plugin call or AI Prompts.

Source: https://tadabase.com/docs/pipes/openai-pipe  
Status: Verified Nov 17, 2026. Checked against the current product

The OpenAI pipe sends text from your app to the OpenAI API with your own OpenAI API key and returns the answer.

> **Try AI Prompts first:** Tadabase has AI built in. [AI Prompts](https://tadabase.com/docs/ai-features/adding-ai-prompts-in-tadabase) let you write a prompt once and run it from a workflow with the **AI Prompt** action (see [Use an AI prompt in a workflow](https://tadabase.com/docs/ai-features/use-an-ai-prompt-in-a-workflow)), without an OpenAI account. Use the OpenAI pipe only when you need your own OpenAI account or a specific OpenAI model.

![The OpenAI pipe's install window with its list of available calls and the Install button](https://tadabase.com/docs-shots/pipes-openai-pipe-install.webp)

## Get an OpenAI API key

1. **Sign in to OpenAI** Sign in to the [OpenAI platform](https://platform.openai.com) and open the API keys page.
2. **Create a key** Create a secret key and copy it. OpenAI shows it only once. Usage is billed to your OpenAI account.

> **Warning:** Treat the key like a password. Never paste it into a page, a record or a support message.

## Install the pipe

1. **Open Pipes** In the builder, click the **Pipes** icon in the left menu. The **All Pipes** page lists every pipe you can install.
2. **Find the pipe** Type `OpenAI` in the **Search...** box and click the **OpenAI** card. The window shows what the pipe does and its **Available Actions**: the calls it offers.
3. **Click Install** Click **Install**. If your plan does not include pipes, an upgrade button shows instead.
4. **Enter the key** Paste your key into **API Key** (required) and click **Install**.

## Which calls work

Use the **OpenAI Plugin** call. It sends a system instruction, your prompt and the record content to OpenAI's chat completions endpoint with the `gpt-4o` model.

| Call | Parameters | Returns |
| --- | --- | --- |
| **OpenAI Plugin** | **Record Content** (required): the field values to answer from. **Custom Prompt**: your question or instruction. | **Response**: the model's answer |

The OpenAI pipe is **Configurable**. To use a different model or allow longer answers, open the **OpenAI Plugin** call, click **Request** and change `model` or `max_tokens` (it starts at 256). Check OpenAI's [models page](https://platform.openai.com/docs/models) for current model names.

> **Calls that no longer work:** The other calls in this pipe (**Q&A**, **Grammar Corrector**, **TL;DR Summarization**, **Translate English to Other Languages**, **Create SQL Requests** and the rest) use the `text-davinci-002` model on OpenAI's legacy completions endpoint. OpenAI shut that model down in January 2024, so these calls return an error. **Generate Image using Dall-e** names no model and relied on DALL·E, which OpenAI has also retired. Do not use these calls.

## Use it in a workflow

You can run any call of an installed pipe from a workflow with the **Trigger Pipe** action, and use what it returns in later steps. Pipes can also run in other parts of your app, as described in [Using pipes](https://tadabase.com/docs/pipes/using-pipes).

Example: summarize a job's notes into a Summary field.

1. **Start a workflow** Create a workflow that runs when a job record is updated.
2. **Add a Trigger Pipe step** Add the **Trigger Pipe** action and choose the OpenAI pipe's **OpenAI Plugin** call in **Pipe Method**. Set **Record Content** to the Notes field and **Custom Prompt** to `Summarize these notes in two sentences.`
3. **Save the answer** Add an **Update Record** step and set the Summary field to the pipe's **Response**.

## More from OpenAI

See the [OpenAI API reference](https://platform.openai.com/docs/api-reference/chat) for every option of the chat completions endpoint.
