OpenAI::Client
Inherits Reference / Object
OpenAI client
Constructors
Original signature — keeps backward compatibility
Overload with explicit api_base (key always optional when api_base is provided)
Class methods
Instance methods
API call to Create a completion for the chat message.
API call to create a chat completion w/ streaming support. It sets whether to stream back partial progress. If set, tokens will be sent as data-only server-sent events as they become available, with the stream terminated by a data: [DONE] message.
API call to create a completion. This is the main endpoint of the API. Returns new text as well as, if requested, the probabilities over each alternative token at each position.
If using a fine-tuned model, simply provide the model's ID in the CompletionRequest object, and the server will use the model's parameters to generate the completion.
API call to create a completion w/ streaming support. It sets whether to stream back partial progress. If set, tokens will be sent as data-only server-sent events as they become available, with the stream terminated by a data: [DONE] message.
Creates a job that fine-tunes a specified model from a given dataset.
Response includes details of the enqueued job including job status and the name of the fine-tuned models once complete.
API call to create an image. This is the main endpoint of the DALL-E API.
Creates an edited or extended image given an original image and a prompt.
Creates a variation of a given image.
Creates an embedding vector representing the input text.
Retrieves an engine instance, providing basic information about such as the owner and availability.
Lists the currently available engines, and provides basic information about each option such as the owner and availability.
Get status updates for a fine-tuning job.
after : Identifier for the last job from the previous pagination request.
limit : Number of fine-tuning jobs to retrieve.
List your organization's fine-tuning jobs
after : Identifier for the last job from the previous pagination request.
limit : Number of fine-tuning jobs to retrieve.
Retrieves a model instance, providing basic information about the model
API call to transcribe audio into the input language.
API call to translate audio into English.
Upload a file that contains document(s) to be used across various endpoints/features. Currently, the size of all the files uploaded by one organization can be up to 1 GB. Please contact OpenAI if you need to increase the storage limit.