Skip to content
For LLMsView as Markdown·

OpenAI ​

Generate text, create embeddings, and moderate content with the OpenAI API.

DetailValue
CategoryAI
Base URLhttps://api.openai.com/v1
AuthenticationBearer Token
Endpoints6
Connector keyopenai

Using OpenAI in a workflow ​

  1. Go to Connections and click New Connection.
  2. Pick OpenAI from the marketplace.
  3. Enter your credentials (see Authentication above for what's expected).
  4. In a workflow, drop an API Call node and select this connection.
  5. Pick the operation you need from the Operation dropdown. The full list is below.

Available endpoints ​

EndpointSummary
POST /chat/completionsCreate a chat completion
POST /embeddingsCreate an embedding vector
POST /images/generationsGenerate an image
POST /moderationsClassify text for moderation
GET /modelsList available models
POST /audio/transcriptionsTranscribe audio to text

Each endpoint is documented in full below. Use the outline on the right to jump to one.

POST /chat/completions ​

Create a chat completion

DetailValue
Operation IDai.createChatCompletion
MethodPOST
Path/chat/completions

Parameters ​

No parameters.

Request Body ​

FieldType
modelstring
messagesarray
temperaturenumber

Using this endpoint in a workflow ​

  1. Add an API Call node to your workflow.
  2. Pick your OpenAI connection from the Connection dropdown.
  3. In the Operation dropdown, select ai.createChatCompletion.
  4. Fill in the parameter fields that appear. Use {{...}} to reference upstream values.

Required fields are marked: fill them or the call will fail at runtime.

What it returns ​

The API Call node writes the response to the workflow context:

{
  status: 200,
  success: true,
  data: { ...response body from the API... },
  latencyMs: 142
}

Reference response fields downstream as {{nodeId.data.path}}. The exact response shape is documented on the upstream OpenAI API reference.

POST /embeddings ​

Create an embedding vector

DetailValue
Operation IDai.createEmbedding
MethodPOST
Path/embeddings

Parameters ​

No parameters.

Request Body ​

FieldType
modelstring
inputstring

Using this endpoint in a workflow ​

  1. Add an API Call node to your workflow.
  2. Pick your OpenAI connection from the Connection dropdown.
  3. In the Operation dropdown, select ai.createEmbedding.
  4. Fill in the parameter fields that appear. Use {{...}} to reference upstream values.

Required fields are marked: fill them or the call will fail at runtime.

What it returns ​

The API Call node writes the response to the workflow context:

{
  status: 200,
  success: true,
  data: { ...response body from the API... },
  latencyMs: 142
}

Reference response fields downstream as {{nodeId.data.path}}. The exact response shape is documented on the upstream OpenAI API reference.

POST /images/generations ​

Generate an image

DetailValue
Operation IDai.generateImage
MethodPOST
Path/images/generations

Parameters ​

No parameters.

Request Body ​

FieldType
modelstring
promptstring
ninteger
sizestring

Using this endpoint in a workflow ​

  1. Add an API Call node to your workflow.
  2. Pick your OpenAI connection from the Connection dropdown.
  3. In the Operation dropdown, select ai.generateImage.
  4. Fill in the parameter fields that appear. Use {{...}} to reference upstream values.

Required fields are marked: fill them or the call will fail at runtime.

What it returns ​

The API Call node writes the response to the workflow context:

{
  status: 200,
  success: true,
  data: { ...response body from the API... },
  latencyMs: 142
}

Reference response fields downstream as {{nodeId.data.path}}. The exact response shape is documented on the upstream OpenAI API reference.

POST /moderations ​

Classify text for moderation

DetailValue
Operation IDai.createModeration
MethodPOST
Path/moderations

Parameters ​

No parameters.

Request Body ​

FieldType
inputstring
modelstring

Using this endpoint in a workflow ​

  1. Add an API Call node to your workflow.
  2. Pick your OpenAI connection from the Connection dropdown.
  3. In the Operation dropdown, select ai.createModeration.
  4. Fill in the parameter fields that appear. Use {{...}} to reference upstream values.

Required fields are marked: fill them or the call will fail at runtime.

What it returns ​

The API Call node writes the response to the workflow context:

{
  status: 200,
  success: true,
  data: { ...response body from the API... },
  latencyMs: 142
}

Reference response fields downstream as {{nodeId.data.path}}. The exact response shape is documented on the upstream OpenAI API reference.

GET /models ​

List available models

DetailValue
Operation IDai.listModels
MethodGET
Path/models

Parameters ​

No parameters.

Using this endpoint in a workflow ​

  1. Add an API Call node to your workflow.
  2. Pick your OpenAI connection from the Connection dropdown.
  3. In the Operation dropdown, select ai.listModels.
  4. Fill in the parameter fields that appear. Use {{...}} to reference upstream values.

What it returns ​

The API Call node writes the response to the workflow context:

{
  status: 200,
  success: true,
  data: { ...response body from the API... },
  latencyMs: 142
}

Reference response fields downstream as {{nodeId.data.path}}. The exact response shape is documented on the upstream OpenAI API reference.

POST /audio/transcriptions ​

Transcribe audio to text

DetailValue
Operation IDai.transcribeAudio
MethodPOST
Path/audio/transcriptions

Parameters ​

No parameters.

Request Body ​

FieldType
filestring
modelstring

Using this endpoint in a workflow ​

  1. Add an API Call node to your workflow.
  2. Pick your OpenAI connection from the Connection dropdown.
  3. In the Operation dropdown, select ai.transcribeAudio.
  4. Fill in the parameter fields that appear. Use {{...}} to reference upstream values.

Required fields are marked: fill them or the call will fail at runtime.

What it returns ​

The API Call node writes the response to the workflow context:

{
  status: 200,
  success: true,
  data: { ...response body from the API... },
  latencyMs: 142
}

Reference response fields downstream as {{nodeId.data.path}}. The exact response shape is documented on the upstream OpenAI API reference.