# OpenAI (ChatGPT) — Pipedream Connect

> OpenAI is an AI research and deployment company with the mission to ensure that artificial general intelligence benefits all of humanity. They are the makers of popular models like ChatGPT, DALL-E, and Whisper.

- API slug: `openai` (use in MCP headers and tool keys)
- Auth: API key (Pipedream-managed)
- Categories: Artificial Intelligence (AI)
- Website: https://openai.com/
- This page (HTML): https://pipedream.com/apps/openai
- Tools: 46 actions · 4 triggers

## Connect via MCP (recommended)

- Endpoint: `https://remote.mcp.pipedream.net/v3`
- Headers: `Authorization: Bearer <token>` · `x-pd-project-id` · `x-pd-environment` · `x-pd-external-user-id` · `x-pd-app-slug: openai`

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "openai",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// e.g. run Chat:
const result = await mcp.callTool({
  name: "openai-chat",
  arguments: {
    modelId: "Model",
    userMessage: "User Message",
  },
})
```

Docs: [MCP guide](https://pipedream.com/docs/connect/mcp/developers.md)

## API proxy

For a OpenAI (ChatGPT) endpoint with no pre-built tool, the proxy forwards your request with the connected user's credentials attached.

```bash
# The path segment is the target URL, URL-safe base64 encoded:
# https://api.openai.com/v1/models

curl "https://api.pipedream.com/v1/connect/{project_id}/proxy/aHR0cHM6Ly9hcGkub3BlbmFpLmNvbS92MS9tb2RlbHM?external_user_id={external_user_id}&account_id=apn_xxxxxxx" \
  -H "Authorization: Bearer {access_token}" \
  -H "x-pd-environment: production"
```

Docs: [API proxy guide](https://pipedream.com/docs/connect/api-proxy.md)

## SDK

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "openai-chat",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    openai: { authProvisionId: "apn_xxxxxxx" },
    modelId: "Model",
    userMessage: "User Message",
  },
})
```

Docs: [Managed auth guide](https://pipedream.com/docs/connect/managed-auth/quickstart.md) · [Tools guide](https://pipedream.com/docs/connect/components.md)

## Actions (46)

### `openai-chat` — Chat (Write)

The Chat API, using the gpt-3.5-turbo or gpt-4 model. See the documentation

Full schema: https://pipedream.com/apps/openai/actions/chat.md

### `openai-chat-using-web-search` — Chat using Web Search (Read-only)

Chat using the web search tool. See the documentation

Full schema: https://pipedream.com/apps/openai/actions/chat-using-web-search.md

### `openai-chat-using-functions` — Chat using Functions (Write)

Chat with your models and allow them to invoke functions. Optionally, you can build and invoke workflows as functions. See the documentation

Full schema: https://pipedream.com/apps/openai/actions/chat-using-functions.md

### `openai-chat-using-file-search` — Chat using File Search (Read-only)

Chat with your files knowledge base (vector stores). See the documentation

Full schema: https://pipedream.com/apps/openai/actions/chat-using-file-search.md

### `openai-summarize` — Summarize Text (Read-only)

Summarizes text using the Chat API. See the documentation

Full schema: https://pipedream.com/apps/openai/actions/summarize.md

### `openai-classify-items-into-categories` — Classify Items into Categories (Read-only)

Classify items into specific categories using the Chat API. See the documentation

Full schema: https://pipedream.com/apps/openai/actions/classify-items-into-categories.md

### `openai-translate-text` — Translate Text (Whisper) (Read-only)

Translate text from one language to another using the Chat API. See the documentation

Full schema: https://pipedream.com/apps/openai/actions/translate-text.md

### `openai-create-transcription` — Create Transcription (Write)

Transcribes audio into the input language. See the documentation

Full schema: https://pipedream.com/apps/openai/actions/create-transcription.md

### `openai-create-image` — Create Image (Dall-E) (Write)

Creates an image given a prompt returning a URL to the image. See the documentation

Full schema: https://pipedream.com/apps/openai/actions/create-image.md

### `openai-create-embeddings` — Create Embeddings (Read-only)

Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms. See the documentation

Full schema: https://pipedream.com/apps/openai/actions/create-embeddings.md

### `openai-send-prompt` — Create Completion (Send Prompt) (Write)

OpenAI recommends using the Chat action for the latest gpt-3.5-turbo API, since it's faster and 10x cheaper. This action creates a completion for the provided prompt and parameters using the older /completions API. See the documentation

Full schema: https://pipedream.com/apps/openai/actions/send-prompt.md

### `openai-analyze-image-content` — Analyze Image Content (Write)

Send a message or question about an image and receive a response. See the documentation

Full schema: https://pipedream.com/apps/openai/actions/analyze-image-content.md

### `openai-cancel-run` — Cancel Run (Assistants) (Write)

Cancels a run that is in progress. See the documentation

Full schema: https://pipedream.com/apps/openai/actions/cancel-run.md

### `openai-chat-with-assistant` — Chat with Assistant (Write)

Sends a message and generates a response, storing the message history for a continuous conversation. See the documentation

Full schema: https://pipedream.com/apps/openai/actions/chat-with-assistant.md

### `openai-chat-with-responses-api` — Chat With Responses API (Write)

Send a chat via the Responses API, mixing built-in tools and MCP server tools. See the documentation.

Full schema: https://pipedream.com/apps/openai/actions/chat-with-responses-api.md

### `openai-convert-text-to-speech` — Convert Text to Speech (TTS) (Write)

Generates audio from the input text. See the documentation

Full schema: https://pipedream.com/apps/openai/actions/convert-text-to-speech.md

### `openai-create-assistant` — Create Assistant (Write)

Creates an assistant with a model and instructions. See the documentation

Full schema: https://pipedream.com/apps/openai/actions/create-assistant.md

### `openai-create-batch` — Create Batch (Write)

Creates and executes a batch from an uploaded file of requests. See the documentation

Full schema: https://pipedream.com/apps/openai/actions/create-batch.md

### `openai-create-fine-tuning-job` — Create Fine Tuning Job (Write)

Creates a job that fine-tunes a specified model from a given dataset. See the documentation

Full schema: https://pipedream.com/apps/openai/actions/create-fine-tuning-job.md

### `openai-create-moderation` — Create Moderation (Write)

Classifies if text is potentially harmful. See the documentation

Full schema: https://pipedream.com/apps/openai/actions/create-moderation.md

### `openai-create-thread` — Create Thread (Assistants) (Write)

Creates a thread with optional messages and metadata, and optionally runs the thread using the specified assistant. See the documentation

Full schema: https://pipedream.com/apps/openai/actions/create-thread.md

### `openai-create-vector-store` — Create Vector Store (Write)

Create a vector store. See the documentation

Full schema: https://pipedream.com/apps/openai/actions/create-vector-store.md

### `openai-create-vector-store-file` — Create Vector Store File (Write)

Create a vector store file. See the documentation

Full schema: https://pipedream.com/apps/openai/actions/create-vector-store-file.md

### `openai-delete-file` — Delete File (Write)

Deletes a specified file from OpenAI. See the documentation

Full schema: https://pipedream.com/apps/openai/actions/delete-file.md

### `openai-delete-vector-store` — Delete Vector Store (Write)

Delete a vector store. See the documentation

Full schema: https://pipedream.com/apps/openai/actions/delete-vector-store.md

### `openai-delete-vector-store-file` — Delete Vector Store File (Write)

Deletes a vector store file. See the documentation

Full schema: https://pipedream.com/apps/openai/actions/delete-vector-store-file.md

### `openai-list-files` — List Files (Read-only)

Returns a list of files that belong to the user's organization. See the documentation

Full schema: https://pipedream.com/apps/openai/actions/list-files.md

### `openai-list-messages` — List Messages (Assistants) (Read-only)

Lists the messages for a given thread. See the documentation

Full schema: https://pipedream.com/apps/openai/actions/list-messages.md

### `openai-list-assistant-model-options` — List Model Options (Read-only)

Retrieves available options for the Model field.

Full schema: https://pipedream.com/apps/openai/actions/list-assistant-model-options.md

### `openai-list-chat-completion-model-id-options` — List Model Options (Read-only)

Retrieves available options for the Model field.

Full schema: https://pipedream.com/apps/openai/actions/list-chat-completion-model-id-options.md

### `openai-list-completion-model-id-options` — List Model Options (Read-only)

Retrieves available options for the Model field.

Full schema: https://pipedream.com/apps/openai/actions/list-completion-model-id-options.md

### `openai-list-embeddings-model-id-options` — List Model Options (Read-only)

Retrieves available options for the Model field.

Full schema: https://pipedream.com/apps/openai/actions/list-embeddings-model-id-options.md

### `openai-list-responses-model-id-options` — List Model Options (Read-only)

Retrieves available options for the Model field.

Full schema: https://pipedream.com/apps/openai/actions/list-responses-model-id-options.md

### `openai-list-run-steps` — List Run Steps (Assistants) (Read-only)

Returns a list of run steps belonging to a run. See the documentation

Full schema: https://pipedream.com/apps/openai/actions/list-run-steps.md

### `openai-list-runs` — List Runs (Assistants) (Read-only)

Returns a list of runs belonging to a thread. See the documentation

Full schema: https://pipedream.com/apps/openai/actions/list-runs.md

### `openai-list-vector-store-files` — List Vector Store Files (Read-only)

Returns a list of vector store file. See the documentation

Full schema: https://pipedream.com/apps/openai/actions/list-vector-store-files.md

### `openai-list-vector-stores` — List Vector Stores (Read-only)

Returns a list of vector stores. See the documentation

Full schema: https://pipedream.com/apps/openai/actions/list-vector-stores.md

### `openai-modify-assistant` — Modify an Assistant (Write)

Modifies an existing OpenAI assistant. See the documentation

Full schema: https://pipedream.com/apps/openai/actions/modify-assistant.md

### `openai-retrieve-file` — Retrieve File (Read-only)

Retrieves a specific file from OpenAI. See the documentation

Full schema: https://pipedream.com/apps/openai/actions/retrieve-file.md

### `openai-retrieve-file-content` — Retrieve File Content (Read-only)

Retrieves the contents of the specified file. See the documentation

Full schema: https://pipedream.com/apps/openai/actions/retrieve-file-content.md

### `openai-retrieve-run` — Retrieve Run (Assistants) (Read-only)

Retrieves a specific run within a thread. See the documentation

Full schema: https://pipedream.com/apps/openai/actions/retrieve-run.md

### `openai-retrieve-run-step` — Retrieve Run Step (Assistants) (Read-only)

Retrieve a specific run step in a thread. See the documentation

Full schema: https://pipedream.com/apps/openai/actions/retrieve-run-step.md

### `openai-retrieve-vector-store` — Retrieve Vector Store (Read-only)

Retrieve a vector store. See the documentation

Full schema: https://pipedream.com/apps/openai/actions/retrieve-vector-store.md

### `openai-retrieve-vector-store-file` — Retrieve Vector Store File (Read-only)

Retrieve a vector store file. See the documentation

Full schema: https://pipedream.com/apps/openai/actions/retrieve-vector-store-file.md

### `openai-submit-tool-outputs-to-run` — Submit Tool Outputs to Run (Assistants) (Write)

Submits tool outputs to a run that requires action. See the documentation

Full schema: https://pipedream.com/apps/openai/actions/submit-tool-outputs-to-run.md

### `openai-upload-file` — Upload File (Write)

Upload a file that can be used across various endpoints/features. The size of individual files can be a maximum of 512mb. See the documentation

Full schema: https://pipedream.com/apps/openai/actions/upload-file.md

## Triggers (4)

### `openai-new-batch-completed` — New Batch Completed (Polling)

Emit new event when a new batch is completed in OpenAI. See the documentation

Full schema: https://pipedream.com/apps/openai/triggers/new-batch-completed.md

### `openai-new-file-created` — New File Created (Polling)

Emit new event when a new file is created in OpenAI. See the documentation

Full schema: https://pipedream.com/apps/openai/triggers/new-file-created.md

### `openai-new-fine-tuning-job-created` — New Fine Tuning Job Created (Polling)

Emit new event when a new fine-tuning job is created in OpenAI. See the documentation

Full schema: https://pipedream.com/apps/openai/triggers/new-fine-tuning-job-created.md

### `openai-new-run-state-changed` — New Run State Changed (Polling)

Emit new event every time a run changes its status. See the documentation

Full schema: https://pipedream.com/apps/openai/triggers/new-run-state-changed.md

---

- All apps: https://pipedream.com/apps — index: https://pipedream.com/llms.txt
- Pipedream docs for agents: https://pipedream.com/docs/llms.txt
