Table of Contents

Class OpenAIClient

Represents the OpenAI service with methods to interact with the API.

public class OpenAIClient : AIClient<OpenAIClient, OpenAISettings>
Inheritance
object
OpenAIClient
Inherited Members

Constructors

OpenAIClient()

public OpenAIClient()

Fields

RealtimeBetaHeader

public static RESTHeader RealtimeBetaHeader

Field Value

RESTHeader

Properties

Audio

Learn how to turn audio into text or text into audio.

public AudioService Audio { get; }

Property Value

AudioService

Batch

Create large batches of API requests for asynchronous processing. The Batch API returns completions within 24 hours for a 50% discount.

public BatchService Batch { get; }

Property Value

BatchService

Beta

Beta features that are not yet available in the main API.

public BetaService Beta { get; }

Property Value

BetaService

Chat

Given a list of messages comprising a conversation, the model will return a response.

public ChatService Chat { get; }

Property Value

ChatService

Conversations

public ConversationService Conversations { get; }

Property Value

ConversationService

Embeddings

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

public EmbeddingService Embeddings { get; }

Property Value

EmbeddingService

Files

Files are used to upload documents that can be used with features like Assistants, Fine-tuning, and Batch API.

public FileService Files { get; }

Property Value

FileService

FineTuning

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

public FineTuningService FineTuning { get; }

Property Value

FineTuningService

Images

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

public ImageService Images { get; }

Property Value

ImageService

Models

List and describe the various models available in the API. You can refer to the Models documentation to understand what models are available and the differences between them.

public ModelService Models { get; }

Property Value

ModelService

Moderations

Given some input text, outputs if the model classifies it as potentially harmful across several categories.

public ModerationService Moderations { get; }

Property Value

ModerationService

Responses

public ResponseService Responses { get; }

Property Value

ResponseService

Videos

public VideoService Videos { get; }

Property Value

VideoService

Methods

CreateApiClientSettings()

protected override CloudApiClientSettings CreateApiClientSettings()

Returns

CloudApiClientSettings

CreateJsonConverters()

protected override List<JsonConverter> CreateJsonConverters()

Returns

List<JsonConverter>

GetApiKey(string)

public override string GetApiKey(string serviceName = null)

Parameters

serviceName string

Returns

string

GetBetaVersion(string)

public override string GetBetaVersion(string arg)

Parameters

arg string

Returns

string