OpenAI
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
Members list
Value members
Concrete methods
Adds a Part to an Upload object. A Part represents a chunk of bytes from the file you are trying to upload.
Adds a Part to an Upload object. A Part represents a chunk of bytes from the file you are trying to upload.
Each Part can be at most 64 MB, and you can add Parts until you hit the Upload maximum of 8 GB.
It is possible to add multiple Parts in parallel. You can decide the intended order of the Parts when you complete the Upload.
https://platform.openai.com/docs/api-reference/uploads/add-part
Value parameters
- data
-
The chunk of bytes for this Part.
- uploadId
-
The ID of the Upload.
Attributes
- Returns
-
The upload Part object.
Cancels an in-progress batch. The batch will be in status cancelling for up to 10 minutes, before changing to cancelled, where it will have partial results (if any) available in the output file.
Cancels an in-progress batch. The batch will be in status cancelling for up to 10 minutes, before changing to cancelled, where it will have partial results (if any) available in the output file.
Value parameters
- batchId
-
The ID of the batch to cancel.
Attributes
- Returns
-
The Batch object matching the specified ID.
Immediately cancel a fine-tune job.
Immediately cancel a fine-tune job.
https://platform.openai.com/docs/api-reference/fine-tuning/cancel
Value parameters
- fineTuningJobId
-
The ID of the fine-tuning job to cancel.
Attributes
Cancels a run that is in_progress.
Cancels a run that is in_progress.
https://platform.openai.com/docs/api-reference/runs/cancelRun
Value parameters
- runId
-
The ID of the run to cancel.
- threadId
-
The ID of the thread to which this run belongs.
Attributes
Cancels the Upload. No Parts may be added after an Upload is cancelled.
Cancels the Upload. No Parts may be added after an Upload is cancelled.
https://platform.openai.com/docs/api-reference/uploads/cancel
Value parameters
- uploadId
-
The ID of the Upload.
Attributes
- Returns
-
The Upload object with status cancelled.
Completes the Upload.
Completes the Upload.
Within the returned Upload object, there is a nested File object that is ready to use in the rest of the platform.
You can specify the order of the Parts by passing in an ordered list of the Part IDs.
The number of bytes uploaded upon completion must match the number of bytes initially specified when creating the Upload object. No Parts may be added after an Upload is completed.
https://platform.openai.com/docs/api-reference/uploads/complete
Value parameters
- requestBody
-
Request body that will be used to complete an upload.
- uploadId
-
The ID of the Upload.
Attributes
- Returns
-
The Upload object with status completed with an additional file property containing the created usable File object.
Create an organization admin API key
Create an organization admin API key
https://platform.openai.com/docs/api-reference/admin-api-keys/create
Value parameters
- createAdminApiKeyRequest
-
Request body that will be used to create an admin API key.
Attributes
- Returns
-
The created admin API key object.
Create an assistant with a model and instructions.
Create an assistant with a model and instructions.
https://platform.openai.com/docs/api-reference/assistants/createAssistant
Value parameters
- createAssistantBody
-
Create completion request body.
Attributes
Creates and executes a batch from an uploaded file of requests
Creates and executes a batch from an uploaded file of requests
Value parameters
- createBatchRequest
-
Request body that will be used to create a batch.
Attributes
- Returns
-
The created Batch object.
Creates a model response for the given chat conversation defined in chatBody.
Creates a model response for the given chat conversation defined in chatBody.
Value parameters
- chatBody
-
Chat request body.
Attributes
Creates a model response for the given chat conversation defined in chatBody.
Creates a model response for the given chat conversation defined in chatBody.
The response is streamed in chunks as server-sent events, which are returned unparsed as a binary stream, using the given streams implementation.
Value parameters
- chatBody
-
Chat request body.
- s
-
The streams implementation to use.
Attributes
Creates a model response for the given chat conversation defined in chatBody.
Creates a model response for the given chat conversation defined in chatBody.
The response is streamed in chunks as server-sent events, which are returned unparsed as a InputStream.
Value parameters
- chatBody
-
Chat request body.
Attributes
Creates a completion for the provided prompt and parameters given in request body.
Creates a completion for the provided prompt and parameters given in request body.
https://platform.openai.com/docs/api-reference/completions/create
Value parameters
- completionBody
-
Create completion request body.
Attributes
Gets info about the fine-tune job.
Gets info about the fine-tune job.
https://platform.openai.com/docs/api-reference/embeddings/create
Value parameters
- embeddingsBody
-
Embeddings request body.
Attributes
Creates a fine-tuning job which begins the process of creating a new model from a given dataset.
Creates a fine-tuning job which begins the process of creating a new 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.
https://platform.openai.com/docs/api-reference/fine-tuning/create
Value parameters
- fineTuningRequestBody
-
Request body that will be used to create a fine-tuning job.
Attributes
Creates an image given a prompt in request body.
Creates an image given a prompt in request body.
https://platform.openai.com/docs/api-reference/images/create
Value parameters
- imageCreationBody
-
Create image request body.
Attributes
Classifies if text violates OpenAI's Content Policy.
Classifies if text violates OpenAI's Content Policy.
https://platform.openai.com/docs/api-reference/moderations/create
Value parameters
- moderationsBody
-
Moderation request body.
Attributes
Create a run.
Value parameters
- createRun
-
Create run request body.
- threadId
-
The ID of the thread to run.
Attributes
Generates audio from the input text.
Generates audio from the input text.
https://platform.openai.com/docs/api-reference/audio/createSpeech
Value parameters
- requestBody
-
Request body that will be used to create a speech.
- s
-
The streams implementation to use.
Attributes
- Returns
-
The audio file content.
Generates audio from the input text.
Generates audio from the input text.
https://platform.openai.com/docs/api-reference/audio/createSpeech
Value parameters
- requestBody
-
Request body that will be used to create a speech.
Attributes
- Returns
-
The audio file content.
Create a thread.
Create a thread.
https://platform.openai.com/docs/api-reference/threads/createThread
Value parameters
- createThreadBody
-
Create completion request body.
Attributes
Create a thread and run it in one request.
Create a thread and run it in one request.
https://platform.openai.com/docs/api-reference/runs/createThreadAndRun
Value parameters
- createThreadAndRun
-
Create thread and run request body.
Attributes
Create a message.
Create a message.
https://platform.openai.com/docs/api-reference/messages/createMessage
Value parameters
- threadId
-
The ID of the thread to create a message for.
Attributes
Transcribes audio into the input language.
Transcribes audio into the input language.
Value parameters
- file
-
The audio file to transcribe, in one of these formats: mp3, mp4, mpeg, mpga, m4a, wav, or webm.
- model
-
ID of the model to use. Only whisper-1 is currently available.
Attributes
Transcribes audio into the input language.
Transcribes audio into the input language.
Value parameters
- model
-
ID of the model to use. Only whisper-1 is currently available.
- systemPath
-
The audio systemPath to transcribe, in one of these formats: mp3, mp4, mpeg, mpga, m4a, wav, or webm.
Attributes
Transcribes audio into the input language.
Transcribes audio into the input language.
Value parameters
- transcriptionConfig
-
An instance of the case class TranscriptionConfig containing the necessary parameters for the audio transcription
Attributes
- Returns
-
An url to edited image.
Translates audio into English text.
Translates audio into English text.
Value parameters
- file
-
The audio file to translate, in one of these formats: mp3, mp4, mpeg, mpga, m4a, wav, or webm.
- model
-
ID of the model to use. Only whisper-1 is currently available.
Attributes
Translates audio into English text.
Translates audio into English text.
Value parameters
- model
-
ID of the model to use. Only whisper-1 is currently available.
- systemPath
-
The audio systemPath to transcribe, in one of these formats: mp3, mp4, mpeg, mpga, m4a, wav, or webm.
Attributes
Translates audio into English text.
Translates audio into English text.
Value parameters
- translationConfig
-
An instance of the case class TranslationConfig containing the necessary parameters for the audio translation.
Attributes
Creates an intermediate Upload object that you can add Parts to. Currently, an Upload can accept at most 8 GB in total and expires after an hour after you create it.
Creates an intermediate Upload object that you can add Parts to. Currently, an Upload can accept at most 8 GB in total and expires after an hour after you create it.
Once you complete the Upload, we will create a File object that contains all the parts you uploaded. This File is usable in the rest of our platform as a regular File object.
For certain purposes, the correct mime_type must be specified. Please refer to documentation for the supported MIME types for your use case:
null.
For guidance on the proper filename extensions for each purpose, please follow the documentation on creating a File.
https://platform.openai.com/docs/api-reference/uploads/create
Value parameters
- uploadRequestBody
-
Request body that will be used to create an upload.
Attributes
- Returns
-
The Upload object with status pending.
Creates vector store
Creates vector store
Value parameters
- createVectorStoreBody
-
Options for new vector store
Attributes
- Returns
-
Newly created vector store or exception
Creates vector store file
Creates vector store file
Value parameters
- createVectorStoreFileBody
-
Properties of file
- vectorStoreId
-
Id of vector store for file
Attributes
- Returns
-
Newly created vector store file
Delete an organization admin API key
Delete an organization admin API key
https://platform.openai.com/docs/api-reference/admin-api-keys/delete
Value parameters
- keyId
-
Key id used to delete an admin API key.
Attributes
- Returns
-
A confirmation object indicating the key was deleted.
Delete an assistant.
Delete an assistant.
https://platform.openai.com/docs/api-reference/assistants/deleteAssistant
Value parameters
- assistantId
-
The ID of the assistant to delete.
Attributes
Delete a stored chat completion. Only chat completions that have been created with the store parameter set to true can be deleted.
Delete a stored chat completion. Only chat completions that have been created with the store parameter set to true can be deleted.
Value parameters
- completionId
-
The ID of the chat completion to delete.
Attributes
- Returns
-
A deletion confirmation object.
Delete a file.
Delete a file.
Value parameters
- fileId
-
The ID of the file to use for this request.
Attributes
Deletes a message.
Deletes a message.
https://platform.openai.com/docs/api-reference/messages/deleteMessage
Value parameters
- messageId
-
The ID of the message to delete.
- threadId
-
The ID of the thread to which this message belongs.
Attributes
- Returns
-
Deletion status
Delete a fine-tuned model. You must have the Owner role in your organization to delete a model.
Delete a fine-tuned model. You must have the Owner role in your organization to delete a model.
https://platform.openai.com/docs/api-reference/models/delete
Value parameters
- modelId
-
The model to delete
Attributes
- Returns
-
Deletion status.
Delete a thread.
Delete a thread.
https://platform.openai.com/docs/api-reference/threads/deleteThread
Value parameters
- threadId
-
The ID of the thread to delete.
Attributes
Deletes vector store
Deletes vector store
Value parameters
- vectorStoreId
-
Id of vector store to be deleted
Attributes
- Returns
-
Result of deleted operation
Deletes vector store file by id
Deletes vector store file by id
Value parameters
- fileId
-
Id of vector store file
- vectorStoreId
-
Id of vector store
Attributes
- Returns
-
Result of delete operation
Get a stored chat completion. Only chat completions that have been created with the store parameter set to true will be returned.
Get a stored chat completion. Only chat completions that have been created with the store parameter set to true will be returned.
Value parameters
- completionId
-
The ID of the chat completion to retrieve.
Attributes
- Returns
-
The ChatCompletion object matching the specified ID.
Get the messages in a stored chat completion. Only chat completions that have been created with the store parameter set to true will be returned.
Get the messages in a stored chat completion. Only chat completions that have been created with the store parameter set to true will be returned.
https://platform.openai.com/docs/api-reference/chat/getMessages
Value parameters
- completionId
-
The ID of the chat completion to retrieve messages from.
Attributes
- Returns
-
A list of messages for the specified chat completion.
Returns a list of files that belong to the user's organization.
Returns a list of files that belong to the user's organization.
Attributes
Lists the currently available models, and provides basic information about each one such as the owner and availability.
Lists the currently available models, and provides basic information about each one such as the owner and availability.
Attributes
Creates edited or extended images given an original image and a prompt.
Creates edited or extended images given an original image and a prompt.
https://platform.openai.com/docs/api-reference/images/create-edit
Value parameters
- image
-
The image to be edited. 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.
- prompt
-
A text description of the desired image. The maximum length is 1000 characters.
Attributes
Creates edited or extended images given an original image and a prompt.
Creates edited or extended images given an original image and a prompt.
https://platform.openai.com/docs/api-reference/images/create-edit
Value parameters
- prompt
-
A text description of the desired image. The maximum length is 1000 characters.
- systemPath
-
Path to the image to be edited. 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
Attributes
Creates edited or extended images given an original image and a prompt.
Creates edited or extended images given an original image and a prompt.
https://platform.openai.com/docs/api-reference/images/create-edit
Value parameters
- imageEditsConfig
-
An instance of the case class ImageEditConfig containing the necessary parameters for editing the image.
Attributes
Creates a variation of a given image.
Creates a variation of a given image.
https://platform.openai.com/docs/api-reference/images/create-variation
Value parameters
- image
-
The image to use as the basis for the variation. Must be a valid PNG file, less than 4MB, and square.
Attributes
Creates a variation of a given image.
Creates a variation of a given image.
https://platform.openai.com/docs/api-reference/images/create-variation
Value parameters
- systemPath
-
Path to the image to use as the basis for the variation. Must be a valid PNG file, less than 4MB, and square.
Attributes
Creates a variation of a given image.
Creates a variation of a given image.
https://platform.openai.com/docs/api-reference/images/create-variation
Value parameters
- imageVariationsConfig
-
An instance of the case class ImageVariationsConfig containing the necessary parameters for the image variation.
Attributes
List organization API keys
List organization API keys
https://platform.openai.com/docs/api-reference/admin-api-keys/list
Attributes
- Returns
-
A list of admin API key objects.
Returns a list of assistants.
Returns a list of assistants.
https://platform.openai.com/docs/api-reference/assistants/listAssistants
Attributes
List your organization's batches.
List your organization's batches.
Attributes
- Returns
-
A list of paginated Batch objects.
List stored chat completions. Only chat completions that have been stored with the store parameter set to true will be returned.
List stored chat completions. Only chat completions that have been stored with the store parameter set to true will be returned.
Attributes
- Returns
-
A list of chat completions matching the specified filters.
List checkpoints for a fine-tuning job.
List checkpoints for a fine-tuning job.
https://platform.openai.com/docs/api-reference/fine-tuning/list-checkpoints
Value parameters
- fineTuningJobId
-
The ID of the fine-tuning job to get checkpoints for.
Attributes
Get status updates for a fine-tuning job.
Get status updates for a fine-tuning job.
https://platform.openai.com/docs/api-reference/fine-tuning/list-events
Value parameters
- fineTuningJobId
-
The ID of the fine-tuning job to get checkpoints for.
Attributes
List your organization's fine-tuning jobs
List your organization's fine-tuning jobs
https://platform.openai.com/docs/api-reference/fine-tuning/list
Attributes
Returns a list of run steps belonging to a run.
Returns a list of run steps belonging to a run.
https://platform.openai.com/docs/api-reference/runs/listRunSteps
Value parameters
- runId
-
The ID of the run the run steps belong to.
- threadId
-
The ID of the thread the run and run steps belong to.
Attributes
Returns a list of runs belonging to a thread..
Returns a list of runs belonging to a thread..
https://platform.openai.com/docs/api-reference/runs/listRuns
Value parameters
- threadId
-
The ID of the thread the run belongs to.
Attributes
Returns a list of messages for a given thread.
Returns a list of messages for a given thread.
https://platform.openai.com/docs/api-reference/messages/listMessages
Value parameters
- threadId
-
The ID of the thread the messages belong to.
Attributes
List files belonging to particular datastore
List files belonging to particular datastore
Value parameters
- queryParameters
-
Search params
- vectorStoreId
-
Id of vector store
Attributes
- Returns
-
List of vector store files
Lists vector store
Lists vector store
Value parameters
- queryParameters
-
Search params
Attributes
- Returns
-
List of vector stores matching criteria or exception
Modifies an assistant.
Modifies an assistant.
https://platform.openai.com/docs/api-reference/assistants/modifyAssistant
Value parameters
- assistantId
-
The ID of the assistant to modify.
- modifyAssistantBody
-
Modify assistant request body.
Attributes
Modifies a message.
Modifies a message.
https://platform.openai.com/docs/api-reference/messages/modifyMessage
Value parameters
- messageId
-
The ID of the message to modify.
- threadId
-
The ID of the thread to which this message belongs.
Attributes
Modifies a run.
Modifies a run.
https://platform.openai.com/docs/api-reference/runs/modifyRun
Value parameters
- runId
-
The ID of the run to modify.
- threadId
-
The ID of the thread that was run.
Attributes
Modifies a thread.
Modifies a thread.
https://platform.openai.com/docs/api-reference/threads/modifyThread
Value parameters
- threadId
-
The ID of the thread to modify. Only the metadata can be modified.
Attributes
Modifies vector store
Modifies vector store
Value parameters
- modifyVectorStoreBody
-
New values for store properties
- vectorStoreId
-
Id of vector store to modify
Attributes
- Returns
-
Modified vector store object
Retrieve a single organization API key
Retrieve a single organization API key
https://platform.openai.com/docs/api-reference/admin-api-keys/listget
Value parameters
- keyId
-
Key id used to retrieve an admin API key.
Attributes
- Returns
-
The requested admin API key object.
Retrieves an assistant.
Retrieves an assistant.
https://platform.openai.com/docs/api-reference/assistants/getAssistant
Value parameters
- assistantId
-
The ID of the assistant to retrieve.
Attributes
Retrieves a batch.
Retrieves a batch.
https://platform.openai.com/docs/api-reference/batch/retreive
Value parameters
- batchId
-
The ID of the batch to retrieve.
Attributes
- Returns
-
The Batch object matching the specified ID.
Returns information about a specific file.
Returns information about a specific file.
https://platform.openai.com/docs/api-reference/files/retrieve
Value parameters
- fileId
-
The ID of the file to use for this request.
Attributes
Returns the contents of the specified file.
Returns the contents of the specified file.
https://platform.openai.com/docs/api-reference/files/retrieve-content
Value parameters
- fileId
-
The ID of the file.
Attributes
Get info about a fine-tuning job.
Get info about a fine-tuning job.
https://platform.openai.com/docs/api-reference/fine-tuning/retrieve
Value parameters
- fineTuningJobId
-
The ID of the fine-tuning job.
Attributes
Retrieves a model instance, providing basic information about the model such as the owner and permissions.
Retrieves a model instance, providing basic information about the model such as the owner and permissions.
https://platform.openai.com/docs/api-reference/models/retrieve
Value parameters
- modelId
-
The ID of the model to use for this request.
Attributes
Retrieves a run.
Retrieves a run.
Value parameters
- runId
-
The ID of the run to retrieve.
- threadId
-
The ID of the thread that was run.
Attributes
Retrieves a run step.
Retrieves a run step.
https://platform.openai.com/docs/api-reference/runs/getRunStep
Value parameters
- runId
-
The ID of the run to which the run step belongs.
- stepId
-
The ID of the run step to retrieve.
- threadId
-
The ID of the thread to which the run and run step belongs.
Attributes
Retrieves a thread.
Retrieves a thread.
https://platform.openai.com/docs/api-reference/threads/getThread
Value parameters
- threadId
-
The ID of the thread to retrieve.
Attributes
Retrieve a message.
Retrieve a message.
https://platform.openai.com/docs/api-reference/messages/getMessage
Value parameters
- messageId
-
The ID of the message to retrieve.
- threadId
-
The ID of the thread to which this message belongs.
Attributes
Retrieves vector store by id
Retrieves vector store by id
Value parameters
- vectorStoreId
-
Id of vector store
Attributes
- Returns
-
Vector store object or exception
Retrieves vector store file by id
Retrieves vector store file by id
Value parameters
- fileId
-
Id of vector store file
- vectorStoreId
-
Id of vector store
Attributes
- Returns
-
Vector store file
When a run has the status: "requires_action" and required_action.type is submit_tool_outputs, this endpoint can be used to submit the outputs from the tool calls once they're all completed. All outputs must be submitted in a single request.
When a run has the status: "requires_action" and required_action.type is submit_tool_outputs, this endpoint can be used to submit the outputs from the tool calls once they're all completed. All outputs must be submitted in a single request.
https://platform.openai.com/docs/api-reference/runs/submitToolOutputs
Value parameters
- runId
-
The ID of the run that requires the tool output submission.
- threadId
-
The ID of the thread to which this run belongs.
- toolOutputs
-
A list of tools for which the outputs are being submitted.
Attributes
Modify a stored chat completion. Only chat completions that have been created with the store parameter set to true can be modified. Currently, the only supported modification is to update the metadata field.
Modify a stored chat completion. Only chat completions that have been created with the store parameter set to true can be modified. Currently, the only supported modification is to update the metadata field.
Value parameters
- completionId
-
The ID of the chat completion to update.
- requestBody
-
Chat completion update request body.
Attributes
- Returns
-
The ChatCompletion object matching the specified ID.
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.
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.
Value parameters
- file
-
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.
- purpose
-
The intended purpose of the uploaded documents. Use "fine-tune" for Fine-tuning. This allows OpenAI to validate the format of the uploaded file.
Attributes
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.
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.
Value parameters
- file
-
JSON Lines file to be uploaded and the purpose is set to "fine-tune", each line is a JSON record with "prompt" and "completion" fields representing your training examples.
Attributes
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.
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.
Value parameters
- purpose
-
The intended purpose of the uploaded documents. Use "fine-tune" for Fine-tuning. This allows OpenAI to validate the format of the uploaded file.
- systemPath
-
Path to 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.
Attributes
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.
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.
Value parameters
- systemPath
-
Path to the JSON Lines file to be uploaded and the purpose is set to "fine-tune", each line is a JSON record with "prompt" and "completion" fields representing your training examples.