Optional configuration: ConfigurationOptional basePath: stringOptional axios: AxiosInstanceOptional options: anyOverride http request option.
Answers the specified question using the provided documents and examples. The endpoint first searches over provided documents or files to find relevant context. The relevant context is combined with the provided examples and question to create the prompt for completion.
Optional options: anyOverride http request option.
Creates a model response for the given chat conversation.
Optional options: anyOverride http request option.
Classifies the specified query using provided examples. The endpoint first searches over the labeled examples to select the ones most relevant for the particular query. Then, the relevant examples are combined with the query to construct a prompt to produce the final label via the completions endpoint. Labeled examples can be provided via an uploaded file, or explicitly listed in the request using the examples parameter for quick tests and small scale use cases.
Optional options: anyOverride http request option.
Creates a completion for the provided prompt and parameters.
Optional options: anyOverride http request option.
Creates a new edit for the provided input, instruction, and parameters.
Optional options: anyOverride http request option.
Creates an embedding vector representing the input text.
Name of the JSON Lines file to be uploaded. If the `purpose` is set to \"fine-tune\", each line is a JSON record with \"prompt\" and \"completion\" fields representing your training examples.
The intended purpose of the uploaded documents. Use \"fine-tune\" for Fine-tuning. This allows us to validate the format of the uploaded file.
Optional options: anyOverride http request option.
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 us if you need to increase the storage limit.
Optional options: anyOverride http request option.
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. Learn more about Fine-tuning
Optional options: anyOverride http request option.
Creates an image given a prompt.
The image to edit. Must be a valid PNG file, less than 4MB, and square. If mask is not provided, image must have transparency, which will be used as the mask.
A text description of the desired image(s). The maximum length is 1000 characters.
Optional mask: FileAn additional image whose fully transparent areas (e.g. where alpha is zero) indicate where `image` should be edited. Must be a valid PNG file, less than 4MB, and have the same dimensions as `image`.
Optional n: numberThe number of images to generate. Must be between 1 and 10.
Optional size: stringThe size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.
Optional responseFormat: stringThe format in which the generated images are returned. Must be one of `url` or `b64_json`.
Optional user: stringA unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more.
Optional options: anyOverride http request option.
Creates an edited or extended image given an original image and a prompt.
The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and square.
Optional n: numberThe number of images to generate. Must be between 1 and 10.
Optional size: stringThe size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.
Optional responseFormat: stringThe format in which the generated images are returned. Must be one of `url` or `b64_json`.
Optional user: stringA unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more.
Optional options: anyOverride http request option.
Creates a variation of a given image.
Optional options: anyOverride http request option.
Classifies if text violates OpenAI's Content Policy
The ID of the engine to use for this request. You can select one of `ada`, `babbage`, `curie`, or `davinci`.
Optional options: anyOverride http request option.
The search endpoint computes similarity scores between provided query and documents. Documents can be passed directly to the API if there are no more than 200 of them. To go beyond the 200 document limit, documents can be processed offline and then used for efficient retrieval at query time. When file is set, the search endpoint searches over all the documents in the given file and returns up to the max_rerank number of documents. These documents will be returned along with their search scores. The similarity score is a positive score that usually ranges from 0 to 300 (but can sometimes go higher), where a score above 200 usually means the document is semantically similar to the query.
The audio file object (not file name) to transcribe, in one of these formats: mp3, mp4, mpeg, mpga, m4a, wav, or webm.
ID of the model to use. Only `whisper-1` is currently available.
Optional prompt: stringAn optional text to guide the model\'s style or continue a previous audio segment. The prompt should match the audio language.
Optional responseFormat: stringThe format of the transcript output, in one of these options: json, text, srt, verbose_json, or vtt.
Optional temperature: numberThe sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit.
Optional language: stringThe language of the input audio. Supplying the input language in ISO-639-1 format will improve accuracy and latency.
Optional options: anyOverride http request option.
Transcribes audio into the input language.
The audio file object (not file name) translate, in one of these formats: mp3, mp4, mpeg, mpga, m4a, wav, or webm.
ID of the model to use. Only `whisper-1` is currently available.
Optional prompt: stringAn optional text to guide the model\'s style or continue a previous audio segment. The prompt should be in English.
Optional responseFormat: stringThe format of the transcript output, in one of these options: json, text, srt, verbose_json, or vtt.
Optional temperature: numberThe sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit.
Optional options: anyOverride http request option.
Translates audio into into English.
The ID of the file to use for this request
Optional options: anyOverride http request option.
Delete a file.
The model to delete
Optional options: anyOverride http request option.
Delete a fine-tuned model. You must have the Owner role in your organization.
Optional options: anyOverride http request option.
Lists the currently available (non-finetuned) models, and provides basic information about each one such as the owner and availability.
Optional options: anyOverride http request option.
Returns a list of files that belong to the user's organization.
The ID of the fine-tune job to get events for.
Optional stream: booleanWhether to stream events for the fine-tune job. If set to true, events will be sent as data-only server-sent events as they become available. The stream will terminate with a `data: [DONE]` message when the job is finished (succeeded, cancelled, or failed). If set to false, only events generated so far will be returned.
Optional options: anyOverride http request option.
Get fine-grained status updates for a fine-tune job.
Optional options: anyOverride http request option.
List your organization's fine-tuning jobs
Optional options: anyOverride http request option.
Lists the currently available models, and provides basic information about each one such as the owner and availability.
The ID of the engine to use for this request
Optional options: anyOverride http request option.
Retrieves a model instance, providing basic information about it such as the owner and availability.
The ID of the file to use for this request
Optional options: anyOverride http request option.
Returns information about a specific file.
The ID of the model to use for this request
Optional options: anyOverride http request option.
Retrieves a model instance, providing basic information about the model such as the owner and permissioning.
Generated using TypeDoc
OpenAIApi - factory interface