OpenAI

OpenAI is a private research laboratory that aims to develop and direct artificial intelligence (AI) in ways that benefit humanity as a whole. OpenAI has developed the following projects:

 

 

 

OpenAI API

The OpenAI API can be applied to virtually any task that involves understanding or generating natural language, code, or images. OpenAI offers a spectrum of models with different levels of power suitable for different tasks, as well as the ability to fine-tune your own custom models. These models can be used for everything from content generation to semantic search and classification.

 

 

Most common uses

 

 

 

 

 

Configuration

OpenAI

 

The OpenAI API uses API keys for authentication. Visit your API Keys page to retrieve the API key you'll use in your requests.

Remember that your API key is a secret! Do not share it with others or expose it in any client-side code (browsers, apps). Production requests must be routed through your own backend server where your API key can be securely loaded from an environment variable or key management service.

 

This API Key must be configured in the OpenAIOptions.ApiKey property of the component. Optionally, for users who belong to multiple organizations, you can set your Organization in the property OpenAIOptions.Organization if your account belongs to an organization.

 

Once the API Key is configured, find below a list of available functions to interact with the OpenAI API.

 

Azure

 

The client supports Microsoft Azure OpenAI Services, so you can use your Azure account to interact with the Azure OpenAI API too. To configure the client to work with Azure, follow the steps below:

 

  1. Configure the property OpenAIOptions.Provider = oapvAzure
  2. Set the values of ResourceName and DeploymentId (these values can be located in your Azure Account)
    1. OpenAIOptions.AzureOptions.ResourceName = <your resource name>.
    2. OpenAIOptions.AzureOptions.DeploymentId = <your deployment id>.
  3. Set the API Key of your Azure Account
    1. OpenAIOptions.ApiKey = <azure api key>.

 

Keep in mind that not all the OpenAI methods are supported by Azure, currently only the following methods are supported:

 

  1. Completion
  2. Chat Completion

 

Properties

OpenAIOptions

Models

List and describe the various models available in the API. 

 

 

Completions

Given a prompt, the model will return one or more predicted completions, and can also return the probabilities of alternative tokens at each position.

 

 

 

Chat

Given a chat conversation, the model will return a chat completion response.

 

 

 

Edits

Given a prompt and an instruction, the model will return an edited version of the prompt.

 

 

Images

Given a prompt and/or an input image, the model will generate a new image.

 

 

 

Embeddings

Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms.

 

 

Audio

Turn Audio into Text.

 

 

 

Files

Files are used to upload documents that can be used with features like Fine-tuning.

 

 

 

Fine-Tunes

Manage fine-tuning jobs to tailor a model to your specific training data.

 

 

 

Moderations

Given an input text, outputs if the model classifies it as violating OpenAI's content policy.

 

 

 

RealTime

The OpenAI Realtime API enables low-latency, multimodal interactions including speech-to-speech conversational experiences and real-time transcription.

 

 

 

 

 

 

 

 

 

Assistants

Build AI assistants that can call models and use tools to perform tasks.

Threads

Threads represent a conversation session. Messages are added to threads, which are then processed by runs.

Thread Messages

Messages are added to threads and contain the content of a conversation.

Runs

Runs represent an execution on a thread with an assistant. The assistant uses its configuration and the thread messages to perform tasks by calling models and tools.

Run Steps

Run steps represent the individual steps taken during a run execution.

Vector Stores

Vector stores are used to store and search over files using embeddings for retrieval-augmented generation (RAG).

Vector Store Files

Manage files within vector stores.

Vector Store File Batches

Batch operations for adding files to vector stores.

Speech

Generate spoken audio from text using text-to-speech models.

Fine-Tuning Jobs

Manage fine-tuning jobs to create customized models. This is the newer fine-tuning API that replaces the legacy Fine-Tunes endpoint.

Responses

Create and manage model responses. The Responses API supports multi-turn conversations, tool use, and structured outputs.

Batches

Create and manage batch API requests for asynchronous processing at lower cost.

Uploads

Upload large files in parts. Useful for files that exceed the standard upload size limit.