OpenAI Component

Interact with OpenAI's models and build AI Agents
Component key: openai
Description
OpenAI is an artificial intelligence research laboratory that develops AI models and APIs. It has produced models including GPT-4 and GPT-3.5 Turbo for text generation, and DALL·E 3 for image generation.
This component wraps some of OpenAI's REST API endpoints. Additional endpoints can be referenced in their API documentation. You can use the Raw Request action to interact with endpoints that are not covered by other actions.
AI Agents
The agent system is built on the OpenAI Agents SDK and provides a visual way to create conversational AI agents with tools and multi agent workflows. Build AI agents using OpenAI's Agents SDK with Prismatic's drag and drop Designer interface. Create agents with custom instructions, tools, and multi agent workflows without writing code.
Quick Start
Create a simple AI assistant in three steps:
-
Add "Agent: Create" action from the OpenAI component
- Set Name: "Assistant"
- Set Instructions: "You are a helpful assistant"
- Select Model: "gpt-4o-mini" (fast and cost-effective)
-
Add "Agent: Run" action
- Set OpenAI Connection: Select your configured connection
- Set Agent Configuration: Reference the Create Agent output:
{{$agentCreate.results}}
- Set User Input: "What is the weather in San Francisco?"
-
Test your flow - The agent's response will be in
{{$agentRun.results.finalOutput}}
Core Concepts
Agent Configuration
Agents are configured and executed in two steps:
- Agent Configuration: Created using the "Agent: Create" action, which outputs a configuration object defining the agent's behavior, tools, and capabilities
- Agent Execution: The "Agent: Run" action executes the configured agent with user input and returns the response
Tools
Tools extend agent capabilities:
- Flow Tools: Let agents trigger other Prismatic flows
- Approval Tools: Require human approval before proceeding
- Built in Tools: Web search, code interpreter, file search, and image generation
MCP Servers
Model Context Protocol servers connect agents to external systems:
- Local MCP: Run tools over STDIO
- Remote MCP: Connect to remote HTTPS servers
Configuration Examples
Understanding the configuration objects helps you work with agent actions.
Tool Configurations
Flow Tool - Output from "Agent: Create Flow Tool" action:
{
"type": "flow",
"tool": {
"type": "function",
"function": {
"name": "send_email",
"description": "Send a welcome email to a new customer",
"parameters": {
"type": "object",
"properties": {
"to": { "type": "string" },
"subject": { "type": "string" },
"body": { "type": "string" }
}
}
}
},
"toolName": "send_email"
}
Approval Tool - Output from "Agent: Create Human Approval Tool" action:
{
"type": "approval",
"tool": {
"type": "function",
"function": {
"name": "delete_confirmation",
"description": "Confirm before deleting records",
"needsApproval": true
}
},
"toolName": "delete_confirmation"
}
MCP Server Configurations
Local MCP Server - Output from "Agent: Add Local MCP Server" action:
{
"mcpServer": {
"type": "stdio",
"label": "sequential-thinking",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-sequential-thinking"]
}
}
Remote MCP Server - Output from "Agent: Add Remote MCP Server" action:
{
"mcpServer": {
"type": "http",
"label": "company-data-server",
"url": "https://api.company.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_TOKEN"
}
}
}
Agent Configurations
Simple Agent:
{
"agent": {
"name": "Assistant",
"instructions": "You are a helpful assistant",
"model": "gpt-4o-mini"
}
}
Agent with Structured Output:
{
"agent": {
"name": "Email Classifier",
"instructions": "Classify emails by priority and sentiment",
"model": "gpt-4o",
"outputType": {
"type": "json_schema",
"name": "EmailClassification",
"strict": true,
"schema": {
"type": "object",
"properties": {
"priority": {
"type": "string",
"enum": ["high", "medium", "low"]
},
"sentiment": {
"type": "string",
"enum": ["positive", "negative", "neutral"]
}
}
}
}
}
}
Common Workflows
Simple Q&A Bot
-
Add Agent: Create action
- Name: "Q&A Bot"
- Instructions: "Answer questions about our product. Be helpful and concise."
- Model: "gpt-4o-mini"
-
Add Agent: Run action
- Agent Configuration:
{{$agentCreate.results}}
- User Input:
{{$trigger.body.question}}
- Agent Configuration:
-
Add Webhook Reply action
- Response Body:
{{$agentRun.results.finalOutput}}
- Response Body:
Message Triage with Structured Output
-
Add Agent: Create action with output schema:
{
"type": "object",
"properties": {
"priority": {
"type": "string",
"enum": ["high", "medium", "low"]
},
"sentiment": {
"type": "string",
"enum": ["positive", "negative", "neutral"]
},
"summary": {
"type": "string"
}
},
"required": ["priority", "sentiment", "summary"]
} -
Add Agent: Run action
- User Input:
{{$trigger.body.emailContent}}
- User Input:
-
Use the structured output:
- Priority:
{{$agentRun.results.finalOutput.priority}}
- Sentiment:
{{$agentRun.results.finalOutput.sentiment}}
- Priority:
Multi Agent Customer Support
-
Create specialist agents:
- Billing Agent: "Handle billing and payment questions"
- Technical Agent: "Solve technical problems"
-
Create main triage agent:
- Instructions: "Route questions to the right specialist"
-
Run with handoffs:
- Agent Configuration:
{{$triageAgent.results}}
- Handoffs:
[{{$billingAgent.results}}, {{$techAgent.results}}]
- Agent Configuration:
Human Approval Workflow
-
Add Agent: Create Human Approval Tool
- Name: "Delete Confirmation"
-
Add Agent: Create with tools:
- Tools:
{{$approvalTool.results}}
- Tools:
-
Add Agent: Run action
-
Add Branch on Expression:
- If
{{$agentRun.results.hasInterruptions}}
is true:- Send approval request
- Add Agent: Resume Run with approval response
- If
Multi Turn Conversation
-
Initial message:
- Add Agent: Run with user input
- Store:
{{$firstRun.results.history}}
-
Follow up message:
- Add Agent: Run with same configuration
- History:
{{$firstRun.results.history}}
- Agent will maintain conversation context
Flow Tool Integration
-
Add Agent: Create Flow Tool
- Select existing flow (e.g., "Send Email")
- Tool Description: "Send emails to customers"
-
Add Agent: Create with tools:
- Tools:
{{$flowTool.results}}
- Tools:
-
Agent will invoke your flow when appropriate
Using Configurations in Designer
When actions output configurations, reference them in subsequent actions:
- Tool outputs:
{{$createFlowTool.results}}
or{{$approvalTool.results}}
- MCP Server outputs:
{{$addLocalMcp.results}}
or{{$addRemoteMcp.results}}
- Agent configuration:
{{$createAgent.results}}
Pass multiple tools/servers as a list:
- Tools:
[{{$tool1.results}}, {{$tool2.results}}]
- MCP Servers:
[{{$mcp1.results}}, {{$mcp2.results}}]
File Processing with Agents
The OpenAI component supports file uploads and processing, allowing agents to work with documents, images, and other files.
Uploading Files
Use the File: Upload action to upload files to OpenAI:
-
Add File: Upload action
- File: Your file data (binary or base64)
- Filename: "document.pdf"
- Purpose: "assistants" (for use with agents)
-
Store the file ID:
{{$uploadFile.results.id}}
Processing Files with Agents
Pass file IDs to agents for processing PDFs, images, and other documents:
-
Upload your files first:
File: Upload → Returns file ID
-
Add Agent: Create action:
- Instructions: "Analyze the provided documents and extract key information"
- Model: "gpt-4o" (for best document understanding)
-
Add Agent: Run action:
- Agent Configuration:
{{$agentCreate.results}}
- User Input: "Summarize the main points from the attached document"
- File IDs:
[{{$uploadFile.results.id}}]
- Agent Configuration:
Common File Processing Workflows
PDF Analysis:
- Upload PDF with File: Upload
- Create agent with document analysis instructions
- Run agent with file ID to extract text, tables, or answer questions
Image Processing:
- Upload image with File: Upload
- Create agent with vision capabilities (gpt-4o model)
- Run agent with file ID to describe, analyze, or extract text from images
Multi-File Processing:
- Upload multiple files
- Pass array of file IDs:
[{{$file1.results.id}}, {{$file2.results.id}}]
- Agent can reference and compare across multiple documents
Connections
OpenAI API Key
Integrations can authenticate with OpenAI using API keys. Generate an API key at platform.openai.com/account/api-keys.
If your user is associate with one organization, you can leave the connection's organization field blank. Otherwise, specify your organization's ID.
Input | Notes | Example |
---|---|---|
API Key password / Required apiKey | Generate an API key at https://platform.openai.com/account/api-keys | |
Organization string organization | Your organization ID. If you have just one organization, this value is optional. | org-9AeeV8Yj8WK9tW6QEZNHDI8Z |
Triggers
Tool Flow Trigger
Marks this flow as a tool that can be called by AI agents | key: toolFlowTrigger
Data Sources
List Models
Lists the currently available models, and provides basic information about each one such as the owner and availability. | key: listModels | type: picklist
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | OpenAI Connection | ||
Timeout (ms) string timeout | 10000 | The maximum amount of time (in MS) to wait for a response. | 10000 |
{
"result": [
{
"label": "gpt-4-turbo-preview",
"key": "gpt-4-turbo-preview"
},
{
"label": "gpt-4",
"key": "gpt-4"
},
{
"label": "gpt-3.5-turbo",
"key": "gpt-3.5-turbo"
},
{
"label": "dall-e-3",
"key": "dall-e-3"
}
]
}
Actions
Agent: Add Local MCP Server
Configure a local MCP server that runs via command line | key: addLocalMcpServer
Input | Default | Notes | Example |
---|---|---|---|
Arguments string Value List args | Arguments to pass to the command | -y | |
Command string / Required command | npx | Command to execute the MCP server (currently only npx is supported) | |
Server Label text / Required serverLabel | Unique identifier for the MCP server | sequential-thinking | |
Tool Filter string Value List toolFilter | List of specific tool names to expose. If empty, all tools are exposed. | think_forward |
Agent: Add Remote MCP Server
Configure a remote MCP server accessed via HTTP | key: addRemoteMcpServer
Input | Notes | Example |
---|---|---|
Headers string Key Value List headers | HTTP headers for authentication or other needs. Key = header name, Value = header value | Authorization -> Bearer YOUR_TOKEN |
Server Label text / Required serverLabel | Unique identifier for the MCP server | company-data-server |
Server URL text / Required serverUrl | URL endpoint for the MCP server | https://api.company.com/mcp |
Tool Filter string Value List toolFilter | List of specific tool names to expose. If empty, all tools are exposed. | query_database |
Agent: Classify and Branch
Use AI to analyze input and route to the appropriate branch | key: classifyAndBranch
Input | Notes | Example |
---|---|---|
MCP Servers code Value List agentMcpServers | List of MCP server configurations. Each should be the output from an Add MCP Server action. | |
Tools code Value List agentTools | List of tools available to the agent. Each tool should be the output from a Create Tool action. | |
Branch Definitions string / Required Key Value List branches | Define branches and their classification criteria. Key = branch name, Value = description of when to use this branch | needs_reply -> Email requires a response or action informational -> FYI only, no action needed spam -> Unsolicited commercial email urgent -> Time-sensitive, requires immediate attention |
Classification Instructions text classificationInstructions | Additional instructions for how to classify the input | Consider the sender, subject urgency, and whether a response is explicitly requested. Prioritize 'urgent' for anything mentioning deadlines today or tomorrow. |
File IDs string Value List fileIds | File IDs from previously uploaded files to OpenAI. Use the Upload File action to get these IDs. | file-abc123 |
Input Text text / Required inputText | The text to analyze and classify (e.g., email content) | Can you make the urgent meeting tomorrow morning at 10am? |
Model string / Required model | Select an OpenAI model to use for the request. The list of available models will be fetched from your OpenAI account. | gpt-5-mini-2025-08-07 |
OpenAI Connection connection / Required openaiConnection | Connection to OpenAI API with your API key |
Agent: Create
Create an AI agent with customizable instructions. | key: createAgent
Input | Default | Notes | Example |
---|---|---|---|
Handoff Description text handoffDescription | Description for handoff routing. Used by other agents to understand when to hand off to this agent. | Handles technical support questions | |
Instructions text / Required instructions | System instructions that define the agent's behavior and capabilities | You are a helpful customer support agent. Answer questions politely and accurately. | |
MCP Servers code Value List mcpServers | List of MCP server configurations. Each should be the output from an Add MCP Server action. | ||
Model string / Required modelName | Select an OpenAI model to use for the request. The list of available models will be fetched from your OpenAI account. | gpt-5-mini-2025-08-07 | |
Name text / Required name | The name of the agent | Customer Support Agent | |
Output Schema code outputSchema | JSON Schema for structured output. Forces the agent to respond with data matching this schema. | ||
Output Schema Name text outputSchemaName | output | Name for the output schema | response |
Output Schema Strict boolean outputSchemaStrict | false | If true, enforces strict schema validation | true |
Tools code Value List tools | List of tools available to the agent. Each tool should be the output from a Create Tool action. |
Agent: Create Code Interpreter Tool
Create a code interpreter tool that allows agents to execute Python code | key: createCodeInterpreterTool
Input | Default | Notes |
---|---|---|
Container ID text containerId | Specific container ID (only used if containerType is 'specific') | |
Container Type string containerType | auto | Container type for code execution |
File IDs string Value List fileIds | Comma-separated list of file IDs to include in the container | |
Tool Name text name | Code Interpreter | Custom name for the code interpreter tool |
Agent: Create File Search Tool
Create a file search tool that searches through vector stores | key: createFileSearchTool
Input | Default | Notes |
---|---|---|
Include Search Results boolean includeSearchResults | true | Include search results in the LLM output |
Max Results string maxNumResults | Maximum number of results to return | |
Tool Name text name | File Search | Custom name for the file search tool |
Ranking Algorithm text rankingAlgorithm | Algorithm for ranking search results | |
Score Threshold string scoreThreshold | Minimum score threshold for results (0-1) | |
Vector Store IDs string / Required Value List vectorStoreIds | Comma-separated list of vector store IDs to search |
Agent: Create Flow Tool
Create a tool configuration that allows an agent to invoke another flow | key: createFlowTool
Input | Default | Notes | Example |
---|---|---|---|
Flow Name flow / Required flowName | The flow that this tool will invoke when called by an agent | ||
Requires Approval boolean requiresApproval | false | If true, the tool will require human approval before the agent can execute the flow | |
Strict Mode boolean strictMode | false | If true, requires exact parameter matching. If false, allows flexibility in agent inputs. | |
Tool Description text / Required toolDescription | Description that helps the agent understand when to use this tool | Send a welcome email to a new customer with their account details |
Agent: Create Human Approval Tool
Create a tool that requires human approval before the agent can proceed | key: createHumanApprovalTool
Input | Default | Notes | Example |
---|---|---|---|
Tool Description text description | Request human approval before proceeding with this action | Description that helps the agent understand when to use this tool | |
Tool Name text name | Human Approval | Name for the approval tool | |
Parameters Schema code parameters | Optional JSON schema for parameters the agent should provide when calling this tool. If not provided, the tool will accept a 'reason' string parameter. |
Agent: Create Image Generation Tool
Create an image generation tool that allows agents to generate images | key: createImageGenerationTool
Input | Default | Notes |
---|---|---|
Background string background | auto | Background type for generated images |
Input Fidelity string inputFidelity | Input fidelity level | |
Model text model | gpt-image-1 | Model to use for generation |
Moderation string moderation | auto | Moderation level for content filtering |
Tool Name text name | Image Generation | Custom name for the image generation tool |
Output Compression string outputCompression | Compression level 0-100 (higher = more compression) | |
Output Format string outputFormat | png | Image output format |
Partial Images string partialImages | Number of partial images to generate | |
Quality string quality | auto | Quality level for generated images |
Size string size | auto | Image dimensions |
Agent: Create Web Search Tool
Create a web search tool that allows agents to search the web | key: createWebSearchTool
Input | Default | Notes |
---|---|---|
User City text city | City for location-aware searches | |
User Country text country | Country for location-aware searches | |
Tool Name text name | Web Search | Custom name for the web search tool |
User Region text region | Region/state for location-aware searches | |
Search Context Size string searchContextSize | medium | Amount of context to return from searches |
User Timezone text timezone | Timezone for time-sensitive searches (e.g., 'America/New_York') |
Agent: Resume Run
Resume an interrupted agent run with approval decisions | key: resumeRun
Input | Default | Notes | Example |
---|---|---|---|
Agent Configuration code / Required agentConfig | Agent configuration object from Create Agent action. Should be the same configuration used in the original run. | ||
Approval Responses code / Required approvalResponses | Array of approval responses with updated approvalRequest objects containing functionId and approved status. | ||
Handoff Agents code Value List handoffs | Same handoff agents configuration used in the original run, if any. | ||
Max Turns string maxTurns | 10 | Maximum number of conversation turns the agent can take from this point. Prevents infinite loops. | 20 |
OpenAI Connection connection / Required openaiConnection | Connection to OpenAI API with your API key | ||
Run State code / Required state | State from the interrupted run, containing the execution context and interruptions. |
Agent: Run
Run an agent | key: runAgent
Input | Default | Notes | Example |
---|---|---|---|
Agent Configuration code / Required agentConfig | Agent configuration object from Create Agent action | ||
File IDs string Value List fileIds | File IDs from previously uploaded files to OpenAI. Use the Upload File action to get these IDs. | file-abc123 | |
Handoff Agents code Value List handoffs | List of agent configurations that can be handed off to. Each should be the output from a Create Agent action. | ||
History code history | Previous conversation history. Use this to continue a conversation from a previous run. Should be the history array from a previous agent run result. | ||
Max Turns string maxTurns | 10 | Maximum number of conversation turns the agent can take. Prevents infinite loops. | 20 |
OpenAI Connection connection / Required openaiConnection | Connection to OpenAI API with your API key | ||
Previous Response ID text previousResponseId | ID of the previous response to continue the conversation. Alternative to passing full history array. | resp_abc123 | |
User Input text / Required userInput | The message or question to send to the agent | What is the weather like today? |
Create Chat Completion
Create a completion for the chat message | key: createChatCompletion
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | OpenAI Connection | ||
Messages code / Required messages | |||
Model string / Required model | gpt-3.5-turbo | Select an OpenAI model to use for the request. The list of available models will be fetched from your OpenAI account. | gpt-5-mini-2025-08-07 |
Number of choices string numChoices | 1 | How many chat completion choices to generate for each input message. | |
Temperature string temperature | 1 | What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. | 0.7 |
Timeout (ms) string timeout | 10000 | The maximum amount of time (in MS) to wait for a response. | 10000 |
top_p string topP | 1 | An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. | 0.9 |
{
"data": {
"id": "chatcmpl-6vf993Onyn1Bwq67AYDTR6fIjzvBu",
"object": "chat.completion",
"created": 1679200883,
"model": "gpt-3.5-turbo-0301",
"usage": {
"prompt_tokens": 56,
"completion_tokens": 21,
"total_tokens": 77
},
"choices": [
{
"message": {
"role": "assistant",
"content": "The 2020 World Series was played at the Globe Life Field in Arlington, Texas, USA."
},
"finish_reason": "stop",
"index": 0
}
]
}
}
Create Image
Create image(s) given a prompt | key: createImage
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | OpenAI Connection | ||
Image Size string imageSize | 1024x1024 | The size of the generated images. Must be one of 256x256, 512x512, or 1024x1024. | |
Number of Images string / Required numImages | 1 | The number of images to generate. Must be between 1 and 10. | |
Prompt string / Required prompt | A text description of the desired image(s). The maximum length is 1000 characters. | A cute baby sea otter | |
Timeout (ms) string timeout | 10000 | The maximum amount of time (in MS) to wait for a response. | 10000 |
{
"data": {
"created": 1589478378,
"data": [
{
"url": "https://..."
},
{
"url": "https://..."
}
]
}
}
Create Response
Create a response using the responses endpoint | key: createFunctionCallingResponse
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | OpenAI Connection | ||
Input string / Required input | The input text to process | ||
Model string / Required model | gpt-4.1 | Select an OpenAI model to use for the request. The list of available models will be fetched from your OpenAI account. | gpt-5-mini-2025-08-07 |
Timeout (ms) string timeout | 10000 | The maximum amount of time (in MS) to wait for a response. | 10000 |
{
"data": {
"id": "resp-123",
"object": "response",
"created": 1677652288,
"model": "gpt-4.1",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Here is the response to your input."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 82,
"completion_tokens": 18,
"total_tokens": 100
}
}
}
Delete File
Delete a previously uploaded file | key: deleteFile
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | OpenAI Connection | ||
File ID string / Required fileId | The ID of the file to delete | file-abc123 | |
Timeout (ms) string timeout | 10000 | The maximum amount of time (in MS) to wait for a response. | 10000 |
{
"data": {
"id": "file-abc123",
"object": "file",
"deleted": true
}
}
Get Model by ID
Get model by ID | key: getModelById
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | OpenAI Connection | ||
Model string / Required model | Select an OpenAI model to use for the request. The list of available models will be fetched from your OpenAI account. | gpt-5-mini-2025-08-07 | |
Timeout (ms) string timeout | 10000 | The maximum amount of time (in MS) to wait for a response. | 10000 |
{
"data": {
"id": "davinci",
"object": "model",
"created": 1649359874,
"owned_by": "openai",
"permission": [
{
"id": "modelperm-U6ZwlyAd0LyMk4rcMdz33Yc3",
"object": "model_permission",
"created": 1669066355,
"allow_create_engine": false,
"allow_sampling": true,
"allow_logprobs": true,
"allow_search_indices": false,
"allow_view": true,
"allow_fine_tuning": false,
"organization": "*",
"group": null,
"is_blocking": false
}
],
"root": "davinci",
"parent": null
}
}
List Files
List previously uploaded files | key: listFiles
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | OpenAI Connection | ||
Purpose string purpose | Filter files by purpose | ||
Timeout (ms) string timeout | 10000 | The maximum amount of time (in MS) to wait for a response. | 10000 |
{
"data": {
"object": "list",
"data": [
{
"id": "file-abc123",
"object": "file",
"bytes": 120000,
"created_at": 1677610602,
"filename": "training_data.jsonl",
"purpose": "fine-tune",
"status": "processed",
"status_details": null
},
{
"id": "file-xyz456",
"object": "file",
"bytes": 250000,
"created_at": 1677610702,
"filename": "validation_data.jsonl",
"purpose": "fine-tune",
"status": "processed",
"status_details": null
}
]
}
}
List Models
List all available models | key: listModels
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | OpenAI Connection | ||
Timeout (ms) string timeout | 10000 | The maximum amount of time (in MS) to wait for a response. | 10000 |
{
"data": {
"object": "list",
"data": [
{
"id": "davinci",
"object": "model",
"created": 1649359874,
"owned_by": "openai",
"permission": [
{
"id": "modelperm-U6ZwlyAd0LyMk4rcMdz33Yc3",
"object": "model_permission",
"created": 1669066355,
"allow_create_engine": false,
"allow_sampling": true,
"allow_logprobs": true,
"allow_search_indices": false,
"allow_view": true,
"allow_fine_tuning": false,
"organization": "*",
"group": null,
"is_blocking": false
}
],
"root": "davinci",
"parent": null
}
]
}
}
Raw Request
Send raw HTTP request to OpenAI | key: rawRequest
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | OpenAI Connection | ||
Data string data | The HTTP body payload to send to the URL. | {"exampleKey": "Example Data"} | |
Debug Request boolean debugRequest | false | Enabling this flag will log out the current request. | |
File Data string Key Value List fileData | File Data to be sent as a multipart form upload. | [{key: "example.txt", value: "My File Contents"}] | |
File Data File Names string Key Value List fileDataFileNames | File names to apply to the file data inputs. Keys must match the file data keys above. | ||
Form Data string Key Value List formData | The Form Data to be sent as a multipart form upload. | [{"key": "Example Key", "value": new Buffer("Hello World")}] | |
Header string Key Value List headers | A list of headers to send with the request. | User-Agent: curl/7.64.1 | |
Max Retry Count string maxRetries | 0 | The maximum number of retries to attempt. Specify 0 for no retries. | |
Method string / Required method | The HTTP method to use. | ||
Query Parameter string Key Value List queryParams | A list of query parameters to send with the request. This is the portion at the end of the URL similar to ?key1=value1&key2=value2. | ||
Response Type string / Required responseType | json | The type of data you expect in the response. You can request json, text, or binary data. | |
Retry On All Errors boolean retryAllErrors | false | If true, retries on all erroneous responses regardless of type. This is helpful when retrying after HTTP 429 or other 3xx or 4xx errors. Otherwise, only retries on HTTP 5xx and network errors. | |
Retry Delay (ms) string retryDelayMS | 0 | The delay in milliseconds between retries. This is used when 'Use Exponential Backoff' is disabled. | |
Timeout string timeout | The maximum time that a client will await a response to its request | 2000 | |
URL string / Required url | /v1/models | Input the path only (/v1/images/generations), The base URL is already included (https://api.openai.com). For example, to connect to https://api.openai.com/v1/images/generations, only /v1/images/generations is entered in this field. | /v1/images/generations |
Use Exponential Backoff boolean useExponentialBackoff | false | Specifies whether to use a pre-defined exponential backoff strategy for retries. When enabled, 'Retry Delay (ms)' is ignored. |
Retrieve File
Retrieve information about a specific file | key: retrieveFile
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | OpenAI Connection | ||
File ID string / Required fileId | The ID of the file to retrieve | file-abc123 | |
Timeout (ms) string timeout | 10000 | The maximum amount of time (in MS) to wait for a response. | 10000 |
{
"data": {
"id": "file-abc123",
"object": "file",
"bytes": 120000,
"created_at": 1677610602,
"filename": "training_data.jsonl",
"purpose": "fine-tune",
"status": "processed",
"status_details": null
}
}
Upload File
Upload a file to OpenAI that can be used with various features | key: uploadFile
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | OpenAI Connection | ||
File data / Required file | The file to upload (binary data or base64 encoded) | ||
Filename string / Required filename | Name of the file including extension | training_data.jsonl | |
Purpose string / Required purpose | The intended purpose of the uploaded file | assistants | |
Timeout (ms) string timeout | 10000 | The maximum amount of time (in MS) to wait for a response. | 10000 |
{
"data": {
"id": "file-abc123",
"object": "file",
"bytes": 120000,
"created_at": 1677610602,
"filename": "training_data.jsonl",
"purpose": "fine-tune",
"status": "processed",
"status_details": null
}
}
Changelog
2025-08-23
Added file operations and enhanced agent capabilities:
- New file management actions: Upload, Download, and Delete files for use with OpenAI
- Tool Flow Trigger to enable flows as callable AI agent tools
- File attachment support in agent runs for processing PDFs, images, and documents
- Enhanced agent branching with file IDs and MCP server integration
- Improved agent configuration with custom tools and MCP servers
- Comprehensive test coverage for new file operations
2025-08-19
Added AI Agents functionality with support for building agents, custom and OpenAI hosted tools, and MCP server connections.
2025-04-25
Modernized OpenAI component with updated libraries and upstream API changes.