OpenAI
OpenAI API
This node signs in with a credential: OpenAI API Key. See Connect a credential.
Actions
Steps this node can perform. Add one from Add a step, then pick the action.
Text Message
Chat with AI
Settings
| Field | Type | Required | Description |
|---|---|---|---|
| Model | Choice | Yes | The model to use Options: GPT-5.2, GPT-5.1, GPT-5, GPT-5 Mini, GPT-5 Nano, GPT-4.1, GPT-4.1 Mini, GPT-4.1 Nano, GPT-5.5Default: gpt-5.5 |
| Messages | List | Yes | The messages to send to the model |
| Temperature | Number | The temperature to use Default: 0.5 | |
| Top P | Number | The top P to use Default: 0.5 | |
| Frequency Penalty | Number | The frequency penalty to use Default: 0 | |
| Presence Penalty | Number | The presence penalty to use Default: 0 | |
| Max Tokens | Number | The maximum number of tokens to generate Default: 256 | |
| Stop | Text | The stop sequence to use | |
| Reasoning Effort | Choice | The reasoning effort to use Options: Low, Medium, HighDefault: low | |
| Verbosity | Choice | The verbosity to use Options: Low, Medium, HighDefault: low |
Output
Later steps use this data by picking this step in the $ picker. For example, model_used is $.<step ID>.output.model_used.
{
"model_used": "string",
"response": {
"choices": [
{
"finish_reason": "string",
"index": 0,
"message": {}
}
],
"created": 0,
"id": "string",
"model": "string",
"object": "chat.completion",
"usage": {
"completion_tokens": 0,
"prompt_tokens": 0,
"total_tokens": 0
}
},
"success": false,
"tokens_used": 0
}Example values show the shape of the data, not real values. See Using data from earlier steps.
Field descriptions
| Field | Type | Description |
|---|---|---|
model_used | Text | The model that produced the chat completion |
response | Object | The full chat completion response returned by OpenAI |
response.choices[] | List | A list of chat completion choices |
response.choices[].finish_reason | Text | The reason the model stopped generating tokens |
response.choices[].index | Number | The index of the choice in the list |
response.choices[].message | Object | The message generated by the model |
response.choices[].message.content | Text | The contents of the message |
response.choices[].message.role | Text | The role of the message author |
response.created | Number | The Unix timestamp (in seconds) of when the chat completion was created |
response.id | Text | A unique identifier for the chat completion |
response.model | Text | The model used for the chat completion |
response.object | Text | The object type, which is always 'chat.completion' |
response.usage | Object | Usage statistics for the completion request |
response.usage.completion_tokens | Number | Number of tokens in the generated completion |
response.usage.prompt_tokens | Number | Number of tokens in the prompt |
response.usage.total_tokens | Number | Total number of tokens used in the request |
success | Yes / No | Whether the chat completion request succeeded |
tokens_used | Number | Total number of tokens used in the request |
Deep Research
Create a new response using OpenAI's Deep Research API for stateful conversations
Settings
| Field | Type | Required | Description |
|---|---|---|---|
| Model | Choice | Yes | The model to use for the response Options: GPT-5.6 SolDefault: gpt-5.6-sol |
| Input | Text | Yes | Input text or messages for the response |
| Tools | List | Yes | Built-in tools to use (web_search) |
| Store Response | Yes / No | Whether to store the response in the database Default: false | |
| Max Tool Calls | Number | Maximum number of tool calls Default: 10 | |
| Previous Response ID | Text | ID of the previous response to use as context | |
| Metadata | Object | Metadata for the response | |
| Reasoning Effort | Choice | Reasoning effort to use Options: Medium, HighDefault: medium | |
| Execution Mode | Choice | How the action handles the deep research job. 'Background Request' submits the job and returns immediately with a response ID — the flow continues without waiting for results. 'Wait Until Finish' submits the job and polls until it reaches a terminal state (completed, failed, or cancelled) before passing control to the next node. Options: Background Request, Wait Until FinishDefault: background_request | |
| Polling Interval (seconds) | Number | Time in seconds between status checks when Execution Mode is 'Wait Until Finish'. Default is 60 seconds. OpenAI recommends at least 2 seconds between polls. Default: 60 |
Output
Later steps use this data by picking this step in the $ picker. For example, conversation_id is $.<step ID>.output.conversation_id.
{
"conversation_id": "string",
"created_at": 0,
"error": {
"message": "string",
"type": "string"
},
"id": "string",
"metadata": {},
"model": "string",
"object": "response",
"output": [
{
"content": "string",
"role": "string"
}
],
"status": "in_progress",
"usage": {
"completion_tokens": 0,
"prompt_tokens": 0,
"total_tokens": 0
}
}Example values show the shape of the data, not real values. See Using data from earlier steps.
Field descriptions
| Field | Type | Description |
|---|---|---|
conversation_id | Text | ID of the conversation this response belongs to |
created_at | Number | The Unix timestamp (in seconds) of when the response was created |
error | Object | Error information if the response failed |
error.message | Text | Error message |
error.type | Text | Error type |
id | Text | A unique identifier for the response |
metadata | Object | Additional metadata for the response |
model | Text | The model used for the response |
object | Text | The object type, which is always 'response' |
output[] | List | Array of output messages or content |
output[].content | Text | The content of the message |
output[].role | Text | The role of the message author |
status | Text | The current status of the response |
usage | Object | Usage statistics for the response |
usage.completion_tokens | Number | Number of tokens in the generated completion |
usage.prompt_tokens | Number | Number of tokens in the prompt |
usage.total_tokens | Number | Total number of tokens used |
Create Response
Create a new response using OpenAI's Responses API for stateful conversations
Settings
| Field | Type | Required | Description |
|---|---|---|---|
| Model | Choice | Yes | The model to use for the response Options: GPT-5.2, GPT-5.1, GPT-5, GPT-5 Mini, GPT-5 Nano, GPT-4.1, GPT-4.1 Mini, GPT-4.1 Nano, GPT-5.5, GPT-5.5 ProDefault: gpt-5.5 |
| Input | Text | Yes | Input text or messages for the response |
| Tools | List | Built-in tools to use (web_search) | |
| Stream Response | Yes / No | Enable streaming responses Default: false | |
| Temperature | Number | Controls randomness (0.0 to 2.0) Default: 1 | |
| Max Output Tokens | Number | Maximum tokens to generate Default: 1000 | |
| Instructions | Text | Instructions for the response | |
| Store Response | Yes / No | Whether to store the response in the database Default: false | |
| Max Tool Calls | Number | Maximum number of tool calls Default: 10 | |
| Previous Response ID | Text | ID of the previous response to use as context | |
| Metadata | Object | Metadata for the response | |
| Reasoning Effort | Choice | Reasoning effort to use Options: Low, Medium, HighDefault: low | |
| Background Processing | Yes / No | Whether to process the response in the background. When true, the API returns immediately with a response ID that can be used to retrieve the result later. Default: false | |
| Response Format | Object | Specifies the format of the model's output. Use for structured outputs with JSON Schema. |
Output
Later steps use this data by picking this step in the $ picker. For example, conversation_id is $.<step ID>.output.conversation_id.
{
"conversation_id": "string",
"created_at": 0,
"error": {
"message": "string",
"type": "string"
},
"id": "string",
"metadata": {},
"model": "string",
"object": "response",
"output": [
{
"content": "string",
"role": "string"
}
],
"status": "in_progress",
"usage": {
"completion_tokens": 0,
"prompt_tokens": 0,
"total_tokens": 0
}
}Example values show the shape of the data, not real values. See Using data from earlier steps.
Field descriptions
| Field | Type | Description |
|---|---|---|
conversation_id | Text | ID of the conversation this response belongs to |
created_at | Number | The Unix timestamp (in seconds) of when the response was created |
error | Object | Error information if the response failed |
error.message | Text | Error message |
error.type | Text | Error type |
id | Text | A unique identifier for the response |
metadata | Object | Additional metadata for the response |
model | Text | The model used for the response |
object | Text | The object type, which is always 'response' |
output[] | List | Array of output messages or content |
output[].content | Text | The content of the message |
output[].role | Text | The role of the message author |
status | Text | The current status of the response |
usage | Object | Usage statistics for the response |
usage.completion_tokens | Number | Number of tokens in the generated completion |
usage.prompt_tokens | Number | Number of tokens in the prompt |
usage.total_tokens | Number | Total number of tokens used |
Retrieve Response
Retrieve the status and results of a response from OpenAI's Responses API
Settings
| Field | Type | Required | Description |
|---|---|---|---|
| Response ID | Text | Yes | ID of the response to retrieve |
Output
Later steps use this data by picking this step in the $ picker. For example, conversation_id is $.<step ID>.output.conversation_id.
{
"conversation_id": "string",
"created_at": 0,
"error": {
"message": "string",
"type": "string"
},
"id": "string",
"metadata": {},
"model": "string",
"object": "response",
"output": [
{
"content": "string",
"role": "string"
}
],
"status": "in_progress",
"usage": {
"completion_tokens": 0,
"prompt_tokens": 0,
"total_tokens": 0
}
}Example values show the shape of the data, not real values. See Using data from earlier steps.
Field descriptions
| Field | Type | Description |
|---|---|---|
conversation_id | Text | ID of the conversation this response belongs to |
created_at | Number | The Unix timestamp (in seconds) of when the response was created |
error | Object | Error information if the response failed |
error.message | Text | Error message |
error.type | Text | Error type |
id | Text | A unique identifier for the response |
metadata | Object | Additional metadata for the response |
model | Text | The model used for the response |
object | Text | The object type, which is always 'response' |
output[] | List | Array of output messages or content |
output[].content | Text | The content of the message |
output[].role | Text | The role of the message author |
status | Text | The current status of the response |
usage | Object | Usage statistics for the response |
usage.completion_tokens | Number | Number of tokens in the generated completion |
usage.prompt_tokens | Number | Number of tokens in the prompt |
usage.total_tokens | Number | Total number of tokens used |
Generate Image
Generate an image from a text prompt using OpenAI's GPT-image models
Settings
| Field | Type | Required | Description |
|---|---|---|---|
| Prompt | Text | Yes | Text description of the desired image(s). Max 32000 characters for GPT-image models. |
| Model | Choice | Yes | The model to use for image generation. DALL-E models are deprecated and will stop being supported on 05/12/2026. Options: GPT Image 1.5 (Recommended), GPT Image 1, GPT Image 1 MiniDefault: gpt-image-1.5 |
| Quality | Choice | Image quality level. Lower quality images generate faster. Only supported for GPT-image models. Options: High, Medium, LowDefault: medium | |
| Resolution | Choice | Resolution of the generated image. Square images are faster to generate. Options: 1024x1024 (Square), 1024x1536 (Portrait), 1536x1024 (Landscape)Default: 1024x1024 | |
| Background | Choice | Background transparency. Only supported for GPT-image models. Requires png or webp output format for transparency. Options: Auto, Opaque, TransparentDefault: auto | |
| Number of Images | Number | Number of images to generate (1-10). DALL-E 3 only supports n=1. Default: 1 | |
| Moderation | Choice | Content moderation sensitivity level. Only supported for GPT-image models. Options: Auto (Standard filtering), Low (Less restrictive)Default: auto | |
| Output File | File | Yes | The configuration for the output file. The file extension will be determined by the output_type field |
| Output Type | Choice | The image file format for the output Options: PNG, WebP, JPEGDefault: png |
Output
Later steps use this data by picking this step in the $ picker. For example, created is $.<step ID>.output.created.
{
"created": 0,
"data": [
{
"fileId": "string",
"fileName": "string",
"fileSize": 0
}
],
"model": "string",
"prompt": "string"
}Example values show the shape of the data, not real values. See Using data from earlier steps.
Field descriptions
| Field | Type | Description |
|---|---|---|
created | Number | When OpenAI generated the images, in Unix seconds |
data[] | List | Generated images, saved to file storage |
data[].fileId | Text | ID of the saved image file |
data[].fileName | Text | Name of the saved image file |
data[].fileSize | Number | Image size in bytes |
model | Text | Image model used |
prompt | Text | Prompt used to generate the images |
Classify Text for Violations
Identify and flag content that might be harmful using OpenAI's moderation API
Settings
| Field | Type | Required | Description |
|---|---|---|---|
| Text Input | Text | Yes | Enter text to classify if it violates the moderation policy |
| Options | Object | Additional options for text moderation |
Output
Later steps use this data by picking this step in the $ picker. For example, flagged is $.<step ID>.output.flagged.
{
"flagged": false,
"model_used": "string",
"response": {
"id": "string",
"model": "string",
"results": [
{
"categories": "hate",
"category_scores": {},
"flagged": false
}
]
},
"success": false
}Example values show the shape of the data, not real values. See Using data from earlier steps.
Field descriptions
| Field | Type | Description |
|---|---|---|
flagged | Yes / No | Whether the first input was flagged; absent when OpenAI returned no results |
model_used | Text | Moderation model OpenAI used |
response | Object | The full OpenAI moderation response |
response.id | Text | Moderation request ID |
response.model | Text | Moderation model |
response.results[] | List | One result per input |
response.results[].categories | Object | Per-category verdicts, e.g. hate, harassment, violence |
response.results[].category_scores | Object | Per-category scores from 0 to 1 |
response.results[].flagged | Yes / No | Whether the input violates the usage policies |
success | Yes / No | True when the moderation request succeeded |
Upload File
Upload files to OpenAI for use with Assistants, Batch processing, Fine-tuning, and Vision models
Settings
| Field | Type | Required | Description |
|---|---|---|---|
| Purpose | Choice | Yes | Purpose of the file upload Options: Assistants (512 MB max), Vision (20 MB max), Batch (100 MB max), Fine-tune (1 GB max)Default: batch |
| File Content Type | Choice | Yes | Type of file content - 'reference' for FSS storage key or 'raw' for base64 data Options: Raw Content. With big data please consider using reference, Reference to a file in StorageDefault: raw |
| File Content | Text | Yes | Base64-encoded file content (if file_content_type is 'raw') or Storage Key (if file_content_type is 'reference') |
| Filename | Text | Yes | Original filename with extension (e.g., document.pdf, image.png) |
| Content Type | Text | MIME type of the file (optional, auto-detected if not provided) |
Output
Later steps use this data by picking this step in the $ picker. For example, bytes is $.<step ID>.output.bytes.
{
"bytes": 0,
"file_id": "string",
"filename": "string",
"purpose": "assistants"
}Example values show the shape of the data, not real values. See Using data from earlier steps.
Field descriptions
| Field | Type | Description |
|---|---|---|
bytes | Number | Size of the uploaded file in bytes |
file_id | Text | Unique identifier for the uploaded file |
filename | Text | Name of the uploaded file |
purpose | Text | Purpose of the uploaded file |
Transcribe Audio
Transcribe an attached or same-run reference audio file using the direct OpenAI API
Settings
| Field | Type | Required | Description |
|---|---|---|---|
| Model | Choice | Yes | OpenAI transcription model Options: GPT Transcribe, GPT-4o Transcribe, GPT-4o Mini Transcribe, Whisper 1, GPT-4o Transcribe DiarizeDefault: whisper-1 |
| Audio File | File | Yes | Audio file to transcribe (FLAC, MP3, MP4, MPEG, MPGA, M4A, OGG, WAV, or WEBM; max 25 MiB) Options: Reference, Attach new |
| Response Format | Choice | Format of the transcription response. Use 'diarized_json' for speaker separation with gpt-4o-transcribe-diarize. Options: JSON, Diarized JSONDefault: json | |
| Prompt | Text | Optional text to guide the model's style or vocabulary (e.g. proper nouns). Note: not supported for diarization models. | |
| Chunking Strategy | Choice | Chunking strategy for audio. Set to 'auto' for inputs longer than 30 seconds with gpt-4o-transcribe-diarize. Options: Auto |
Output
Later steps use this data by picking this step in the $ picker. For example, model_used is $.<step ID>.output.model_used.
{
"model_used": "string",
"segments": [
{
"end": 0,
"id": "string",
"speaker": "Speaker 1",
"start": 0,
"text": "string"
}
],
"text": "string"
}Example values show the shape of the data, not real values. See Using data from earlier steps.
Field descriptions
| Field | Type | Description |
|---|---|---|
model_used | Text | OpenAI transcription model used |
segments[] | List | Segments with timestamps and speaker labels when using diarized_json or verbose_json |
segments[].end | Number | End timestamp in seconds |
segments[].id | Any | Segment ID |
segments[].speaker | Text | Speaker label (e.g. Speaker 1, Speaker 2) |
segments[].start | Number | Start timestamp in seconds |
segments[].text | Text | Transcribed segment text |
text | Text | Transcribed audio text |
Create Batch Job
Create batch jobs for asynchronous processing of large volumes of requests at 50% reduced cost. Requires a file uploaded with purpose 'batch'. Completion window is automatically set to 24h. Automatically polls batch status every 1 minute until it reaches 'in_progress' or 'failed' state.
Settings
| Field | Type | Required | Description |
|---|---|---|---|
| Input File ID | Text | Yes | The ID of an uploaded file that contains requests for the new batch. File must be in JSONL format, uploaded with purpose 'batch', contain up to 50,000 requests, and be up to 200 MB in size. |
| Endpoint | Choice | Yes | OpenAI API endpoint for the batch requests Options: Chat Completions, Embeddings, CompletionsDefault: /v1/chat/completions |
| Metadata | Object | Custom metadata for tracking the batch job (up to 16 key-value pairs) |
Output
Later steps use this data by picking this step in the $ picker. For example, batch_id is $.<step ID>.output.batch_id.
{
"batch_id": "string",
"input_file_id": "string",
"status": "validating"
}Example values show the shape of the data, not real values. See Using data from earlier steps.
Field descriptions
| Field | Type | Description |
|---|---|---|
batch_id | Text | Unique identifier for the batch job |
input_file_id | Text | The ID of the input file used for the batch |
status | Text | Current status of the batch job |
Retrieve Batch Job
Retrieve the status and details of a batch job by batch ID
Settings
| Field | Type | Required | Description |
|---|---|---|---|
| Batch ID | Text | Yes | The ID of the batch job to retrieve |
Output
Later steps use this data by picking this step in the $ picker. For example, completion_window is $.<step ID>.output.completion_window.
{
"completion_window": "24h",
"created_at": 0,
"endpoint": "string",
"error_file_id": "string",
"errors": {
"data": [
{
"code": "string",
"line": 0,
"message": "string",
"param": "string"
}
],
"object": "string"
},
"expires_at": 0,
"id": "string",
"input_file_id": "string",
"metadata": {},
"object": "batch",
"output_file_id": "string",
"request_counts": {
"completed": 0,
"failed": 0,
"total": 0
},
"status": "validating"
}Example values show the shape of the data, not real values. See Using data from earlier steps.
Field descriptions
| Field | Type | Description |
|---|---|---|
completion_window | Text | The time window for batch completion (e.g., '24h') |
created_at | Number | Unix timestamp (in seconds) of when the batch was created |
endpoint | Text | The API endpoint that the batch is targeting |
error_file_id | Text | The ID of the error file containing processing errors (null if no errors) |
errors | Object | Error information if the batch failed |
errors.data[] | List | Array of error details |
errors.data[].code | Text | Error code |
errors.data[].line | Number | Line number where the error occurred |
errors.data[].message | Text | Error message |
errors.data[].param | Text | Parameter related to the error |
errors.object | Text | The object type |
expires_at | Number | Unix timestamp (in seconds) when the batch will expire |
id | Text | The unique identifier for the batch |
input_file_id | Text | The ID of the input file used for the batch |
metadata | Object | Custom metadata for tracking the batch job |
object | Text | The object type, which is always 'batch' |
output_file_id | Text | The ID of the output file containing batch results (null if not completed) |
request_counts | Object | Counts of requests by status |
request_counts.completed | Number | Number of completed requests |
request_counts.failed | Number | Number of failed requests |
request_counts.total | Number | Total number of requests in the batch |
status | Text | The current status of the batch |
Cancel Batch Job
Cancel a batch job that is in progress. The batch will be in status 'cancelling' for up to 10 minutes and then change to 'cancelled' status.
Settings
| Field | Type | Required | Description |
|---|---|---|---|
| Batch ID | Text | Yes | The ID of the batch job to cancel |
Output
Later steps use this data by picking this step in the $ picker. For example, completion_window is $.<step ID>.output.completion_window.
{
"completion_window": "24h",
"created_at": 0,
"endpoint": "string",
"error_file_id": "string",
"errors": {
"data": [
{
"code": "string",
"line": 0,
"message": "string",
"param": "string"
}
],
"object": "string"
},
"expires_at": 0,
"id": "string",
"input_file_id": "string",
"metadata": {},
"object": "batch",
"output_file_id": "string",
"request_counts": {
"completed": 0,
"failed": 0,
"total": 0
},
"status": "validating"
}Example values show the shape of the data, not real values. See Using data from earlier steps.
Field descriptions
| Field | Type | Description |
|---|---|---|
completion_window | Text | The time window for batch completion (e.g., '24h') |
created_at | Number | Unix timestamp (in seconds) of when the batch was created |
endpoint | Text | The API endpoint that the batch is targeting |
error_file_id | Text | The ID of the error file containing processing errors (null if no errors) |
errors | Object | Error information if the batch failed |
errors.data[] | List | Array of error details |
errors.data[].code | Text | Error code |
errors.data[].line | Number | Line number where the error occurred |
errors.data[].message | Text | Error message |
errors.data[].param | Text | Parameter related to the error |
errors.object | Text | The object type |
expires_at | Number | Unix timestamp (in seconds) when the batch will expire |
id | Text | The unique identifier for the batch |
input_file_id | Text | The ID of the input file used for the batch |
metadata | Object | Custom metadata for tracking the batch job |
object | Text | The object type, which is always 'batch' |
output_file_id | Text | The ID of the output file containing batch results (null if not completed) |
request_counts | Object | Counts of requests by status |
request_counts.completed | Number | Number of completed requests |
request_counts.failed | Number | Number of failed requests |
request_counts.total | Number | Total number of requests in the batch |
status | Text | The current status of the batch |
Retrieve File
Retrieve metadata and information about a previously uploaded file by its ID
Settings
| Field | Type | Required | Description |
|---|---|---|---|
| File ID | Text | Yes | The ID of the file to retrieve |
Output
Later steps use this data by picking this step in the $ picker. For example, bytes is $.<step ID>.output.bytes.
{
"bytes": 0,
"created_at": 0,
"expires_at": 0,
"filename": "string",
"id": "string",
"object": "file",
"purpose": "assistants",
"status": "uploaded",
"status_details": "string"
}Example values show the shape of the data, not real values. See Using data from earlier steps.
Field descriptions
| Field | Type | Description |
|---|---|---|
bytes | Number | Size of the file in bytes |
created_at | Number | Unix timestamp (in seconds) of when the file was created |
expires_at | Number | Unix timestamp (in seconds) when the file will expire |
filename | Text | Name of the uploaded file |
id | Text | Unique identifier for the file |
object | Text | The object type, which is always 'file' |
purpose | Text | Intended purpose of the file |
status | Text | Current processing status of the file |
status_details | Text | Additional details about the file status (deprecated) |
Delete File
Delete a file from OpenAI storage. Returns a deletion status object.
Settings
| Field | Type | Required | Description |
|---|---|---|---|
| File ID | Text | Yes | The ID of the file to delete |
Output
Later steps use this data by picking this step in the $ picker. For example, deleted is $.<step ID>.output.deleted.
{
"deleted": false,
"file_id": "string",
"object": "string"
}Example values show the shape of the data, not real values. See Using data from earlier steps.
Field descriptions
| Field | Type | Description |
|---|---|---|
deleted | Yes / No | Whether OpenAI deleted the file |
file_id | Text | ID of the deleted file |
object | Text | Object type returned by OpenAI, usually file |
Retrieve File Content
Retrieve the actual contents of a file. Returns the file content as a string.
Settings
| Field | Type | Required | Description |
|---|---|---|---|
| File ID | Text | Yes | The ID of the file whose content to retrieve |
Output
Later steps use this data by picking this step in the $ picker. For example, content is $.<step ID>.output.content.
{
"content": "string",
"file_id": "string",
"size": 0
}Example values show the shape of the data, not real values. See Using data from earlier steps.
Field descriptions
| Field | Type | Description |
|---|---|---|
content | Text | File content as text |
file_id | Text | ID of the file |
size | Number | Content size in bytes |