Skip to main content

Azure OpenAI Service Component

Generate completions and images using Azure OpenAI Service or OpenAI API.

Component key: azure-openai-service · Changelog ↓

Description

Azure OpenAI Service is Microsoft's cloud service that provides REST API access to OpenAI's language models including GPT-4, GPT-3.5-Turbo, and DALL·E. This component allows you to create chat completions, generate images, and perform text completions using Azure-hosted OpenAI models or directly through the OpenAI API.

API Documentation

This component supports both the Azure OpenAI Service REST API and the OpenAI Platform API.

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.

Connections

API Key

key: apiKey

This connection supports both Azure OpenAI Service and standard OpenAI API authentication using API keys.

Prerequisites

For Azure OpenAI Service:

For OpenAI API:

Setup For Azure OpenAI Service

To use Azure OpenAI Service, an Azure OpenAI resource and API key are required.

  1. Follow the Azure OpenAI quickstart guide to create an Azure OpenAI resource
  2. In the Azure portal, navigate to the Azure OpenAI resource
  3. Select Keys and Endpoint from the resource menu
  4. 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.

  1. Navigate to API Keys in the OpenAI platform
  2. Click Create new secret key
  3. Enter a name for the key (optional) and click Create secret key
  4. 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:
    • false for Azure OpenAI Service (default)
    • true for 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
InputNotesExample
API Key

OpenAI API key or Azure OpenAI API key.

sk-abc123def456ghi789jkl012mno345pqr678stu901vwx
API Version

The Azure OpenAI API version to use. Only applies when using Azure OpenAI Service (not direct OpenAI).

2025-01-01-preview
Is OpenAI Key

When true, uses the OpenAI API directly. When false, uses Azure OpenAI Service.

false
Organization / Azure Resource Name

For Azure OpenAI: Enter your Azure resource name (the subdomain from your endpoint URL). For example, if your endpoint is https://my-resource.openai.azure.com/, enter 'my-resource'. For OpenAI: Enter your OpenAI organization ID (e.g. org-abc123). Only required if you belong to multiple organizations.

my-azure-resource

Data Sources

Select Model

Select a model from your OpenAI or Azure OpenAI deployment | key: selectModel | type: picklist

InputNotesExample
Connection

The Azure OpenAI Service or OpenAI API connection to use.


Actions

Create Chat Completion

Create a chat completion for a sequence of messages | key: createChatCompletion

InputNotesExample
Connection

The Azure OpenAI Service or OpenAI API connection to use.

Messages

An array of message objects with 'role' (system, user, or assistant) and 'content' properties.

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
Number of Choices

How many chat completion choices to generate for each input message.

3
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.

0.7
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.

0.9

{
"data": {
"id": "chatcmpl-8ZzX9Y5K3mN2pQ7rS1tU0vW",
"object": "chat.completion",
"created": 1704067200,
"model": "gpt-4",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hello! I'm doing well, thank you for asking. How can I assist you today?"
},
"finish_reason": "stop",
"logprobs": null
}
],
"usage": {
"prompt_tokens": 12,
"completion_tokens": 18,
"total_tokens": 30
},
"system_fingerprint": "fp_50cad350e4"
}
}

Create Image

Generate one or more images from a text prompt | key: createImage

InputNotesExample
Connection

The Azure OpenAI Service or OpenAI API connection to use.

Image Size

The size of the generated images. Must be one of 1792x1024, 1024x1792, or 1024x1024.

1024x1024
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.

dall-e-3
Number of Images

The number of images to generate. Must be between 1 and 10.

3
Prompt

A text description of the desired image(s). The maximum length is 1000 characters.

A cute baby sea otter

{
"data": [
{
"url": "https://oaidalleapiprodscus.blob.core.windows.net/private/org-123456789/user-abcdef123456/img-1a2b3c4d5e6f.png?st=2024-01-15T10%3A30%3A00Z&se=2024-01-15T12%3A30%3A00Z&sp=r&sv=2021-08-06&sr=b&rscd=inline&rsct=image/png&skoid=abcd1234-efgh-5678-ijkl-9012mnop3456&sktid=a1b2c3d4-e5f6-7890-ghij-k1l2m3n4o5p6&skt=2024-01-15T09%3A45%3A00Z&ske=2024-01-16T09%3A45%3A00Z&sks=b&skv=2021-08-06&sig=abcdef1234567890",
"revised_prompt": "A multi-colored beach umbrella standing in golden sand on a sunny day, captured with the vintage aesthetic of a disposable camera, showing slight grain and natural lighting"
},
{
"url": "https://oaidalleapiprodscus.blob.core.windows.net/private/org-123456789/user-abcdef123456/img-2b3c4d5e6f7g.png?st=2024-01-15T10%3A30%3A00Z&se=2024-01-15T12%3A30%3A00Z&sp=r&sv=2021-08-06&sr=b&rscd=inline&rsct=image/png&skoid=abcd1234-efgh-5678-ijkl-9012mnop3456&sktid=a1b2c3d4-e5f6-7890-ghij-k1l2m3n4o5p6&skt=2024-01-15T09%3A45%3A00Z&ske=2024-01-16T09%3A45%3A00Z&sks=b&skv=2021-08-06&sig=bcdef12345678901",
"revised_prompt": "A colorful striped umbrella planted in beach sand, photographed with the nostalgic quality characteristic of disposable cameras, featuring warm tones and soft focus"
}
]
}

Create Multiple Chat Completions

Generate multiple completions for a set of prompts | key: createCompletions

InputNotesExample
Connection

The Azure OpenAI Service or OpenAI API connection to use.

Messages

An array of message objects with 'role' (system, user, or assistant) and 'content' properties.

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

{
"data": {
"id": "chatcmpl-8ZzX9Y5K3mN2pQ7rS1tU0vW",
"object": "chat.completion",
"created": 1704067200,
"model": "gpt-4o-mini",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "I'm doing great, thank you for asking! How can I help you?"
},
"finish_reason": "stop",
"logprobs": null
}
],
"usage": {
"prompt_tokens": 45,
"completion_tokens": 87,
"total_tokens": 132
}
}
}

Raw Request

Send a raw HTTP request to the Azure OpenAI Service or OpenAI API | key: rawRequest

InputNotesExample
Connection

The Azure OpenAI Service or OpenAI API connection to use.

Data

The HTTP body payload to send to the URL.

{"exampleKey": "Example Data"}
File Data

File Data to be sent as a multipart form upload.

[{key: "example.txt", value: "My File Contents"}]
File Data File Names

File names to apply to the file data inputs. Keys must match the file data keys above.

Form Data

The Form Data to be sent as a multipart form upload.

[{"key": "Example Key", "value": new Buffer("Hello World")}]
Header

A list of headers to send with the request.

User-Agent: curl/7.64.1
Max Retry Count

The maximum number of retries to attempt. Specify 0 for no retries.

0
Method

The HTTP method to use.

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.

Response Type

The type of data you expect in the response. You can request json, text, or binary data.

json
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
Retry Delay (ms)

The delay in milliseconds between retries. This is used when 'Use Exponential Backoff' is disabled.

0
Timeout

The maximum time that a client will await a response to its request

2000
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/images/generations
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 | key: summarizeText

InputNotesExample
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
Text to SummarizeTwo independent experiments reported their results this morning at CERN, Europe's high-energy physics laboratory near Geneva in Switzerland. Both show convincing evidence of a new boson particle weighing around 125 gigaelectronvolts, which so far fits predictions of the Higgs previously made by theoretical physicists. As a layman I would say: 'I think we have it'. Would you agree? Rolf-Dieter Heuer, CERN's director-general, asked the packed auditorium. The physicists assembled there burst into applause.

{
"data": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "CERN announced convincing evidence of a new boson particle weighing around 125 gigaelectronvolts, which matches predictions of the Higgs boson. The announcement was met with applause from the physics community."
},
"finish_reason": "stop",
"logprobs": null
}
]
}

Changelog

2026-04-01

Migrated to the chat completions API with updated defaults, configuration, and model selection:

  • Migrated completions actions to the chat completions API
  • Updated default model from gpt-3.5-turbo-instruct to gpt-4o-mini
  • Added configurable API Version connection field
  • Added Select Model data source for model dropdown selection
  • Added model input to Create Image action (replacing hardcoded dalle-3)
  • Updated response payload field names

2026-03-25

  • Updated documentation and various modernizations