Jaa


OpenAI GPT (Independent Publisher) (Preview)

OpenAI is an artificial intelligence research laboratory. The company conducts research in the field of AI with the stated goal of promoting and developing friendly AI in a way that benefits humanity as a whole. Through this connector you can access the Generative Pre-trained Transformer 4 (GPT-4), an autoregressive language model that uses deep learning to produce human-like text, plus many other models.

This connector is available in the following products and regions:

Service Class Regions
Logic Apps Standard All Logic Apps regions except the following:
     -   Azure Government regions
     -   Azure China regions
     -   US Department of Defense (DoD)
Power Automate Premium All Power Automate regions except the following:
     -   US Government (GCC)
     -   US Government (GCC High)
     -   China Cloud operated by 21Vianet
     -   US Department of Defense (DoD)
Power Apps Premium All Power Apps regions except the following:
     -   US Government (GCC)
     -   US Government (GCC High)
     -   China Cloud operated by 21Vianet
     -   US Department of Defense (DoD)
Contact
Name Troy Taylor
URL https://www.hitachisolutions.com
Email ttaylor@hitachisolutions.com
Connector Metadata
Publisher Troy Taylor
Website https://openai.com/
Privacy policy https://openai.com/api/policies/terms/
Categories AI

Creating a connection

The connector supports the following authentication types:

Default Parameters for creating connection. All regions Not shareable

Default

Applicable: All regions

Parameters for creating connection.

This is not shareable connection. If the power app is shared with another user, another user will be prompted to create new connection explicitly.

Name Type Description Required
API Key securestring The key for this service. Must be in the format 'Bearer yourAPIKey'. True

Throttling Limits

Name Calls Renewal Period
API calls per connection 100 60 seconds

Actions

Cancel fine-tuning

Immediately cancel a fine-tune job.

Create completion [DEPRECATED]

Creates a completion for the provided prompt and parameters.

Create embedding

Creates an embedding vector representing the input text.

Create fine-tuning job

Creates a job that fine-tunes a specified model from a given dataset.

Create image

Creates an image given a prompt.

Create image edit

Creates an edited or extended image given an original image and a prompt.

Create image variation

Creates a variation of a given image.

Create moderation

Classifies if text violates OpenAI's Content Policy.

Create speech

Generates audio from the input text.

Create transcription

Transcribes audio into the input language.

Create translation

Translates audio into English.

Edit Prompt [DEPRECATED]

Creates a new edit for the provided input, instruction, and parameters.

Get chat completions

Retrieves a chat completion powered by ChatGPT.

List fine-tuning events

Retrieve status updates for a fine-tuning job.

List models

Lists the currently available models, and provides basic information about each one such as the owner and availability.

Retrieve fine-tuning job

Retrieve info about a fine-tuning job.

Cancel fine-tuning

Immediately cancel a fine-tune job.

Parameters

Name Key Required Type Description
Fine-tuning Job ID
fine_tuning_job_id True string

The fine-tuning job identifier.

Returns

Name Path Type Description
Object
object string

The object.

ID
id string

The identifier.

Model
model string

The model.

Created At
created_at integer

When created at.

Fine-Tuned Model
fine_tuned_model string

The fine-tuned model.

Organization ID
organization_id string

The organization identifier.

Result Files
result_files array of string

The result files.

Epochs
hyperparameters.n_epochs integer

The number of epochs.

Status
status string

The status.

Validation File
validation_file string

The validation file.

Training File
training_file string

The training file.

Create completion [DEPRECATED]

Creates a completion for the provided prompt and parameters.

Parameters

Name Key Required Type Description
Model
model True string

ID of the model to use.

Prompt
prompt string

The prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens, or array of token arrays.

Max Tokens
max_tokens integer

The maximum number of tokens to generate in the completion.

Temperature
temperature double

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.

Top P
top_p double

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.

N
n integer

How many completions to generate for each prompt.

Log Probabilities
logprobs string

Include the log probabilities on the logprobs most likely tokens, as well the chosen tokens.

Stop
stop string

A sequence where the service will stop generating further tokens.

Returns

Name Path Type Description
first_completion
first_completion string

first_completion

ID
result.id string

The identifier.

Object
result.object string

The object.

Created
result.created integer

When created.

Model
result.model string

The model.

Choices
result.choices array of object
Text
result.choices.text string

The text.

Index
result.choices.index integer

The index

Log Probs
result.choices.logprobs string

The log probs.

Finish Reason
result.choices.finish_reason string

The finish reason

Prompt Tokens
result.usage.prompt_tokens integer

The prompt tokens.

Completion Tokens
result.usage.completion_tokens integer

The completion tokens.

Total Tokens
result.usage.total_tokens integer

The total tokens.

Create embedding

Creates an embedding vector representing the input text.

Parameters

Name Key Required Type Description
Input
input True string

The input.

Model
model string

The model.

Encoding Format
encoding_format string

The encoding format.

User
user string

The unique user string.

Returns

Name Path Type Description
Object
object string

The object.

Data
data array of object
Object
data.object string

The object.

Embedding
data.embedding array of float

The embedding.

Index
data.index integer

The index.

Model
model string

The model.

Prompt Tokens
usage.prompt_tokens integer

The prompt tokens.

Total Tokens
usage.total_tokens integer

The total tokens.

Create fine-tuning job

Creates a job that fine-tunes a specified model from a given dataset.

Parameters

Name Key Required Type Description
Training File
training_file True string

The ID of an uploaded file that contains training data.

Validation File
validation_file string

The ID of an uploaded file that contains validation data.

Model
model True string

The name of the model to fine-tune.

Epochs
n_epochs integer

The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.

Suffix
suffix string

A string of up to 40 characters that will be added to your fine-tuned model name.

Returns

Name Path Type Description
Object
object string

The object.

ID
id string

The identifier.

Model
model string

The model.

Created At
created_at integer

When created at.

Fine-Tuned Model
fine_tuned_model string

The fine-tuned model.

Organization ID
organization_id string

The organization identifier.

Result Files
result_files array of string

The result files.

Status
status string

The status.

Validation File
validation_file string

The validation file.

Training File
training_file string

The training file.

Create image

Creates an image given a prompt.

Parameters

Name Key Required Type Description
Model
model string

The model.

Prompt
prompt True string

The prompt.

Number of Images
n integer

The number of images.

Quality
quality string

The quality.

Size
size string

The size.

Style
style string

The style.

User
user string

The unique user string.

Returns

Name Path Type Description
Created
created integer

When created.

Data
data array of object
URL
data.url string

The URL address.

Revised Prompt
data.revised_prompt string

The revised prompt.

Create image edit

Creates an edited or extended image given an original image and a prompt.

Parameters

Name Key Required Type Description
Image
image True file

The image to edit.

Prompt
prompt string

A text description of the desired image.

Mask
mask file

An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where image should be edited.

Model
model string

The model to use for image generation.

Number of Images
n integer

The number of images to generate

Size
size string

The size of the generated images.

User
user string

A unique identifer representing your end user.

Returns

Name Path Type Description
Created
created integer

When created.

Data
data array of object
URL
data.url string

The URL address.

Revised Prompt
data.revised_prompt string

The revised prompt.

Create image variation

Creates a variation of a given image.

Parameters

Name Key Required Type Description
Image
image True file

The image to edit.

Model
model string

The model to use for image generation.

Number of Images
n integer

The number of images to generate

Size
size string

The size of the generated images.

User
user string

A unique identifer representing your end user.

Returns

Name Path Type Description
Created
created integer

When created.

Data
data array of object
URL
data.url string

The URL address.

Revised Prompt
data.revised_prompt string

The revised prompt.

Create moderation

Classifies if text violates OpenAI's Content Policy.

Parameters

Name Key Required Type Description
Input
input True string

The input text to classify.

Model
model string

The model.

Returns

Name Path Type Description
ID
id string

The identifier.

Model
model string

The model.

Results
results array of object
Flagged
results.flagged boolean

Whether flagged.

Sexual
results.categories.sexual boolean

Whether sexual.

Hate
results.categories.hate boolean

Whether hateful.

Harassment
results.categories.harassment boolean

Whether harrassment.

self-harm
results.categories.self-harm boolean

Whether self-harm.

sexual/minors
results.categories.sexual/minors boolean

Whether minor sexual.

hate/threatening
results.categories.hate/threatening boolean

Whether threatening hateful.

violence/graphic
results.categories.violence/graphic boolean

Whether graphic violence.

self-harm/intent
results.categories.self-harm/intent boolean

Whether intent to self-harm.

self-harm/instructions
results.categories.self-harm/instructions boolean

Whether self-harm instructions.

harassment/threatening
results.categories.harassment/threatening boolean

Whether threatening harassment.

Violence
results.categories.violence boolean

Whether violence.

Sexual
results.category_scores.sexual float

The number of sexual.

Hate
results.category_scores.hate float

The number of hateful.

Harassment
results.category_scores.harassment float

The number of harassment.

self-harm
results.category_scores.self-harm float

The number of self-harm.

sexual/minors
results.category_scores.sexual/minors float

The number of minor sexual.

hate/threatening
results.category_scores.hate/threatening float

The number of threatening hateful.

violence/graphic
results.category_scores.violence/graphic float

The number of graphic violence.

self-harm/intent
results.category_scores.self-harm/intent float

The number of intent to self-harm.

self-harm/instructions
results.category_scores.self-harm/instructions float

The number of self-harm instructions.

harassment/threatening
results.category_scores.harassment/threatening float

The number of threatening harassment.

Violence
results.category_scores.violence float

The number of violence.

Create speech

Generates audio from the input text.

Parameters

Name Key Required Type Description
Model
model True string

The model.

Input
input True string

The input.

Voice
voice True string

The voice.

Response Format
response_format string

The response format.

Speed
speed float

The speed.

Returns

Name Path Type Description
Content
$content string

The content.

Content Type
$content-type string

The content type.

Create transcription

Transcribes audio into the input language.

Parameters

Name Key Required Type Description
File
file True file

The audio file object to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.

Model
model True string

ID of the model to use.

Language
language string

The language of the input audio.

Prompt
prompt string

Text to guide the model's style or continue a previous audio segment.

Temperature
temperature float

The sampling temperature.

Returns

Name Path Type Description
Text
text string

The text.

Create translation

Translates audio into English.

Parameters

Name Key Required Type Description
File
file True file

The audio file object to translate, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.

Model
model True string

ID of the model to use.

Prompt
prompt string

Text to guide the model's style or continue a previous audio segment.

Temperature
temperature float

The sampling temperature.

Returns

Name Path Type Description
Text
text string

The text.

Edit Prompt [DEPRECATED]

Creates a new edit for the provided input, instruction, and parameters.

Parameters

Name Key Required Type Description
Model
model True string

ID of the model to use.

Input
input string

The input text to use as a starting point for the edit.

Instruction
instruction True string

The instruction that tells the model how to edit the prompt.

N
n integer

How many edits to generate for the input and instruction.

Temperature
temperature double

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.

Top P
top_p double

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.

Returns

Name Path Type Description
Object
object string

The object.

Created
created integer

When created.

Choices
choices array of object

The choices.

Text
choices.text string

The text.

Index
choices.index integer

The index.

Prompt Tokens
usage.prompt_tokens integer

The prompt tokens.

Completion Tokens
usage.completion_tokens integer

The completion tokens.

Total Tokens
usage.total_tokens integer

The total tokens.

Get chat completions

Retrieves a chat completion powered by ChatGPT.

Parameters

Name Key Required Type Description
Model
model True string

The chat model.

Role
role True string

The role.

Content
content True string

The content.

Max Tokens
max_tokens integer

The maximum number of tokens to generate in the completion.

Temperature
temperature double

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.

Top P
top_p double

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.

N
n integer

How many completions to generate for each prompt.

Stop
stop string

A sequence where the service will stop generating further tokens.

Presence Penalty
presence_penalty double

Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.

Frequency Penalty
frequency_penalty double

Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.

User
user string

A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.

Returns

Name Path Type Description
First Content
first_content string

The first content.

ID
id string

The identifier.

Object
object string

The object.

Created
created integer

When created.

Choices
choices array of object
Index
choices.index integer

The index.

Role
choices.message.role string

The role.

Content
choices.message.content string

The content.

Finish Reason
choices.finish_reason string

The finish reason.

Prompt Tokens
usage.prompt_tokens integer

The prompt tokens.

Completion Tokens
usage.completion_tokens integer

The completion tokens.

Total Tokens
usage.total_tokens integer

The total tokens.

List fine-tuning events

Retrieve status updates for a fine-tuning job.

Parameters

Name Key Required Type Description
Fine-tuning Job ID
fine_tuning_job_id True string

The fine-tuning job identifier.

After
after string

The identifier for the last event from the previous pagination request.

Limit
limit integer

The number of events to retrieve.

Returns

Name Path Type Description
Object
object string

The object.

Data
data array of object
Object
data.object string

The object.

ID
data.id string

The identifier.

Created At
data.created_at integer

When created at.

Level
data.level string

The level.

Message
data.message string

The message.

Data
data.data string

The data.

Type
data.type string

The type.

Has More
has_more boolean

Whether has more.

List models

Lists the currently available models, and provides basic information about each one such as the owner and availability.

Returns

Name Path Type Description
Object
object string

The object.

Data
data array of object
ID
data.id string

The identifier.

Object
data.object string

The object.

Created
data.created integer

When created.

Owned By
data.owned_by string

The owned by.

Permission
data.permission array of object
ID
data.permission.id string

The identifier.

Object
data.permission.object string

The object.

Created
data.permission.created integer

When created.

Allow Create Engine
data.permission.allow_create_engine boolean

Whether to allow create engine.

Allow Sampling
data.permission.allow_sampling boolean

Whether to allow sampling.

Allow Logprobs
data.permission.allow_logprobs boolean

Whether to allow logprobs.

Allow Search Indices
data.permission.allow_search_indices boolean

Whether to allow search indices .

Allow View
data.permission.allow_view boolean

Whether to allow view.

Allow Fine Tuning
data.permission.allow_fine_tuning boolean

Whether to allow fine tuning.

Organization
data.permission.organization string

The organization.

Group
data.permission.group string

The group.

Is Blocking
data.permission.is_blocking boolean

Whether is blocked.

Root
data.root string

The root.

Parent
data.parent string

The parent.

Retrieve fine-tuning job

Retrieve info about a fine-tuning job.

Parameters

Name Key Required Type Description
Fine-tuning Job ID
fine_tuning_job_id True string

The fine-tuning job identifier.

Returns

Name Path Type Description
Object
object string

The object.

ID
id string

The identifier.

Model
model string

The model.

Created At
created_at integer

When created at.

Finished At
finished_at integer

When finished at.

Fine-Tuned Model
fine_tuned_model string

The fine-tuned model.

Organization ID
organization_id string

The organization identifier.

Result Files
result_files array of string

The result files.

Status
status string

The status.

Validation File
validation_file string

The validation file.

Training File
training_file string

The training file.

epochs
hyperparameters.n_epochs integer

The number of epochs.

Trained Tokens
trained_tokens integer

The number of trained tokens.