Azure OpenAI Service Connector
Generate completions and images using Azure OpenAI Service or OpenAI API.
Connections
API Key
Connect using an OpenAI or Azure OpenAI API key
This connection supports both Azure OpenAI Service and standard OpenAI API authentication using API keys.
Prerequisites
For Azure OpenAI Service:
- An active Azure subscription
- Azure OpenAI access approval
- An Azure OpenAI resource created in the Azure portal
For OpenAI API:
- An active OpenAI account at platform.openai.com
- Access to API key generation
Setup For Azure OpenAI Service
To use Azure OpenAI Service, an Azure OpenAI resource and API key are required.
- Follow the Azure OpenAI quickstart guide to create an Azure OpenAI resource
- In the Azure portal, navigate to the Azure OpenAI resource
- Select Keys and Endpoint from the resource menu
- Copy one of the displayed API keys
For additional information on Azure OpenAI authentication, refer to Azure OpenAI Service REST API reference.
Setup For OpenAI API
To use the standard OpenAI API, an API key from OpenAI is required.
- Navigate to API Keys in the OpenAI platform
- Click Create new secret key
- Enter a name for the key (optional) and click Create secret key
- Copy the generated API key (it begins with
sk-)
Note: If the user account belongs to multiple OpenAI organizations, the organization ID will also be required. The organization ID can be found in Organization settings.
Configure the Connection
When configuring the connection:
- Enter the API Key from either Azure OpenAI Service or OpenAI API
- Set Is OpenAI Key to:
falsefor Azure OpenAI Service (default)truefor standard OpenAI API
- For Organization (OpenAI only):
- Leave blank if the account belongs to a single organization
- Enter the organization ID if the account belongs to multiple organizations
The API key format differs between providers:
- Azure OpenAI: 32-character hexadecimal string
- OpenAI API: Begins with
sk-followed by a random string
| Input | Comments | Default |
|---|---|---|
| API Key | OpenAI API key or Azure OpenAI API key. | |
| Organization | Your OpenAI organization ID. Only required if you belong to multiple organizations. | |
| Is OpenAI Key | When true, uses the OpenAI API directly. When false, uses Azure OpenAI Service. | false |
Actions
Create Chat Completion
Create a completion for the chat message
| Input | Comments | Default |
|---|---|---|
| Connection | The Azure OpenAI Service or OpenAI API connection to use. | |
| Model / Deployment Name | Specifies either the model deployment name (when using Azure OpenAI) or model name (when using OpenAI). See available models at https://platform.openai.com/docs/models. | gpt-4o-mini |
| Messages | An array of message objects with 'role' (system, user, or assistant) and 'content' properties. | |
| Temperature | 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. | 1 |
| top_p | 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. | 1 |
| Number of choices | How many chat completion choices to generate for each input message. | 1 |
Create Image
Create image(s) given a prompt
| Input | Comments | Default |
|---|---|---|
| Connection | The Azure OpenAI Service or OpenAI API connection to use. | |
| Prompt | A text description of the desired image(s). The maximum length is 1000 characters. | |
| Number of Images | The number of images to generate. Must be between 1 and 10. | 1 |
| Image Size | The size of the generated images. Must be one of 1792x1024, 1024x1792, or 1024x1024. | 1024x1024 |
Create Multiple Chat Completion
Generate Multiple Completions
| Input | Comments | Default |
|---|---|---|
| Connection | The Azure OpenAI Service or OpenAI API connection to use. | |
| Model / Deployment Name | Specifies either the model deployment name (when using Azure OpenAI) or model name (when using OpenAI). See available models at https://platform.openai.com/docs/models. | gpt-3.5-turbo-instruct |
| Messages | An array of message objects with 'role' (system, user, or assistant) and 'content' properties. | |
Raw Request
Send raw HTTP request to Azure OpenAI
| Input | Comments | Default |
|---|---|---|
| Connection | The Azure OpenAI Service or OpenAI API connection to use. | |
| URL | 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/models |
| Method | The HTTP method to use. | |
| Data | The HTTP body payload to send to the URL. | |
| Form Data | The Form Data to be sent as a multipart form upload. | |
| File Data | File Data to be sent as a multipart form upload. | |
| File Data File Names | File names to apply to the file data inputs. Keys must match the file data keys above. | |
| Query Parameter | 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. | |
| Header | A list of headers to send with the request. | |
| Response Type | The type of data you expect in the response. You can request json, text, or binary data. | json |
| Timeout | The maximum time that a client will await a response to its request | |
| Retry Delay (ms) | The delay in milliseconds between retries. This is used when 'Use Exponential Backoff' is disabled. | 0 |
| Retry On All Errors | 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. | false |
| Max Retry Count | The maximum number of retries to attempt. Specify 0 for no retries. | 0 |
| Use Exponential Backoff | Specifies whether to use a pre-defined exponential backoff strategy for retries. When enabled, 'Retry Delay (ms)' is ignored. | false |
Summarize Text
Summarize a given text
| Input | Comments | Default |
|---|---|---|
| Connection | The Azure OpenAI Service or OpenAI API connection to use. | |
| Model / Deployment Name | Specifies either the model deployment name (when using Azure OpenAI) or model name (when using OpenAI). See available models at https://platform.openai.com/docs/models. | gpt-3.5-turbo-instruct |
| Text to Summarize |