provider 148 operations
@utdk/openai
OpenAI API
Generated UTDK provider client for OpenAI API. The OpenAI REST API. Please see https://platform.openai.com/docs/api-reference for more details.
README
Embedded directly from the package source.
openai
Generated UTDK provider types and OpenAPI-backed client for https://raw.githubusercontent.com/openai/openai-openapi/refs/heads/manual_spec/openapi.yaml.
Operations
148 operations —
open try-it console
| Method | Operation ID | Path | Summary | |
|---|---|---|---|---|
| GET | listAssistants | /assistants | Returns a list of assistants. | Try |
| POST | createAssistant | /assistants | Create an assistant with a model and instructions. | Try |
| GET | getAssistant | /assistants/{assistant_id} | Retrieves an assistant. | Try |
| POST | modifyAssistant | /assistants/{assistant_id} | Modifies an assistant. | Try |
| DELETE | deleteAssistant | /assistants/{assistant_id} | Delete an assistant. | Try |
| POST | createSpeech | /audio/speech | Generates audio from the input text. | Try |
| POST | createTranscription | /audio/transcriptions | Transcribes audio into the input language. | Try |
| POST | createTranslation | /audio/translations | Translates audio into English. | Try |
| GET | listBatches | /batches | List your organization's batches. | Try |
| POST | createBatch | /batches | Creates and executes a batch from an uploaded file of requests | Try |
| GET | retrieveBatch | /batches/{batch_id} | Retrieves a batch. | Try |
| POST | cancelBatch | /batches/{batch_id}/cancel | 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. | Try |
| GET | listChatCompletions | /chat/completions | List stored Chat Completions. Only Chat Completions that have been stored with the `store` parameter set to `true` will be returned. | Try |
| POST | createChatCompletion | /chat/completions | **Starting a new project?** We recommend trying [Responses](/docs/api-reference/responses) to take advantage of the latest OpenAI platform features. Compare [Chat Completions with Responses](/docs/guides/responses-vs-chat-completions?api-mode=responses). --- Creates a model response for the given chat conversation. Learn more in the [text generation](/docs/guides/text-generation), [vision](/docs/guides/vision), and [audio](/docs/guides/audio) guides. Parameter support can differ depending on the model used to generate the response, particularly for newer reasoning models. Parameters that are only supported for reasoning models are noted below. For the current state of unsupported parameters in reasoning models, [refer to the reasoning guide](/docs/guides/reasoning). | Try |
| GET | getChatCompletion | /chat/completions/{completion_id} | Get a stored chat completion. Only Chat Completions that have been created with the `store` parameter set to `true` will be returned. | Try |
| POST | updateChatCompletion | /chat/completions/{completion_id} | 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. | Try |
| DELETE | deleteChatCompletion | /chat/completions/{completion_id} | Delete a stored chat completion. Only Chat Completions that have been created with the `store` parameter set to `true` can be deleted. | Try |
| GET | getChatCompletionMessages | /chat/completions/{completion_id}/messages | 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. | Try |
| POST | createCompletion | /completions | Creates a completion for the provided prompt and parameters. | Try |
| POST | createEmbedding | /embeddings | Creates an embedding vector representing the input text. | Try |
| GET | listEvals | /evals | List evaluations for a project. | Try |
| POST | createEval | /evals | Create the structure of an evaluation that can be used to test a model's performance. An evaluation is a set of testing criteria and a datasource. After creating an evaluation, you can run it on different models and model parameters. We support several types of graders and datasources. For more information, see the [Evals guide](/docs/guides/evals). | Try |
| GET | getEval | /evals/{eval_id} | Get an evaluation by ID. | Try |
| POST | updateEval | /evals/{eval_id} | Update certain properties of an evaluation. | Try |
| DELETE | deleteEval | /evals/{eval_id} | Delete an evaluation. | Try |
| GET | getEvalRuns | /evals/{eval_id}/runs | Get a list of runs for an evaluation. | Try |
| POST | createEvalRun | /evals/{eval_id}/runs | Create a new evaluation run. This is the endpoint that will kick off grading. | Try |
| GET | getEvalRun | /evals/{eval_id}/runs/{run_id} | Get an evaluation run by ID. | Try |
| POST | cancelEvalRun | /evals/{eval_id}/runs/{run_id} | Cancel an ongoing evaluation run. | Try |
| DELETE | deleteEvalRun | /evals/{eval_id}/runs/{run_id} | Delete an eval run. | Try |
| GET | getEvalRunOutputItems | /evals/{eval_id}/runs/{run_id}/output_items | Get a list of output items for an evaluation run. | Try |
| GET | getEvalRunOutputItem | /evals/{eval_id}/runs/{run_id}/output_items/{output_item_id} | Get an evaluation run output item by ID. | Try |
| GET | listFiles | /files | Returns a list of files. | Try |
| POST | createFile | /files | Upload a file that can be used across various endpoints. Individual files can be up to 512 MB, and the size of all files uploaded by one organization can be up to 100 GB. The Assistants API supports files up to 2 million tokens and of specific file types. See the [Assistants Tools guide](/docs/assistants/tools) for details. The Fine-tuning API only supports `.jsonl` files. The input also has certain required formats for fine-tuning [chat](/docs/api-reference/fine-tuning/chat-input) or [completions](/docs/api-reference/fine-tuning/completions-input) models. The Batch API only supports `.jsonl` files up to 200 MB in size. The input also has a specific required [format](/docs/api-reference/batch/request-input). Please [contact us](https://help.openai.com/) if you need to increase these storage limits. | Try |
| GET | retrieveFile | /files/{file_id} | Returns information about a specific file. | Try |
| DELETE | deleteFile | /files/{file_id} | Delete a file. | Try |
| GET | downloadFile | /files/{file_id}/content | Returns the contents of the specified file. | Try |
| GET | listFineTuningCheckpointPermissions | /fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissions | **NOTE:** This endpoint requires an [admin API key](../admin-api-keys). Organization owners can use this endpoint to view all permissions for a fine-tuned model checkpoint. | Try |
| POST | createFineTuningCheckpointPermission | /fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissions | **NOTE:** Calling this endpoint requires an [admin API key](../admin-api-keys). This enables organization owners to share fine-tuned models with other projects in their organization. | Try |
| DELETE | deleteFineTuningCheckpointPermission | /fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissions/{permission_id} | **NOTE:** This endpoint requires an [admin API key](../admin-api-keys). Organization owners can use this endpoint to delete a permission for a fine-tuned model checkpoint. | Try |
| GET | listPaginatedFineTuningJobs | /fine_tuning/jobs | List your organization's fine-tuning jobs | Try |
| POST | createFineTuningJob | /fine_tuning/jobs | 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. [Learn more about fine-tuning](/docs/guides/fine-tuning) | Try |
| GET | retrieveFineTuningJob | /fine_tuning/jobs/{fine_tuning_job_id} | Get info about a fine-tuning job. [Learn more about fine-tuning](/docs/guides/fine-tuning) | Try |
| POST | cancelFineTuningJob | /fine_tuning/jobs/{fine_tuning_job_id}/cancel | Immediately cancel a fine-tune job. | Try |
| GET | listFineTuningJobCheckpoints | /fine_tuning/jobs/{fine_tuning_job_id}/checkpoints | List checkpoints for a fine-tuning job. | Try |
| GET | listFineTuningEvents | /fine_tuning/jobs/{fine_tuning_job_id}/events | Get status updates for a fine-tuning job. | Try |
| POST | createImageEdit | /images/edits | Creates an edited or extended image given one or more source images and a prompt. This endpoint only supports `gpt-image-1` and `dall-e-2`. | Try |
| POST | createImage | /images/generations | Creates an image given a prompt. [Learn more](/docs/guides/images). | Try |
| POST | createImageVariation | /images/variations | Creates a variation of a given image. This endpoint only supports `dall-e-2`. | Try |
| GET | listModels | /models | Lists the currently available models, and provides basic information about each one such as the owner and availability. | Try |
| GET | retrieveModel | /models/{model} | Retrieves a model instance, providing basic information about the model such as the owner and permissioning. | Try |
| DELETE | deleteModel | /models/{model} | Delete a fine-tuned model. You must have the Owner role in your organization to delete a model. | Try |
| POST | createModeration | /moderations | Classifies if text and/or image inputs are potentially harmful. Learn more in the [moderation guide](/docs/guides/moderation). | Try |
| GET | admin-api-keys-list | /organization/admin_api_keys | List organization API keys | Try |
| POST | admin-api-keys-create | /organization/admin_api_keys | Create an organization admin API key | Try |
| GET | admin-api-keys-get | /organization/admin_api_keys/{key_id} | Retrieve a single organization API key | Try |
| DELETE | admin-api-keys-delete | /organization/admin_api_keys/{key_id} | Delete an organization admin API key | Try |
| GET | list-audit-logs | /organization/audit_logs | List user actions and configuration changes within this organization. | Try |
| GET | listOrganizationCertificates | /organization/certificates | List uploaded certificates for this organization. | Try |
| POST | uploadCertificate | /organization/certificates | Upload a certificate to the organization. This does **not** automatically activate the certificate. Organizations can upload up to 50 certificates. | Try |
| POST | activateOrganizationCertificates | /organization/certificates/activate | Activate certificates at the organization level. You can atomically and idempotently activate up to 10 certificates at a time. | Try |
| POST | deactivateOrganizationCertificates | /organization/certificates/deactivate | Deactivate certificates at the organization level. You can atomically and idempotently deactivate up to 10 certificates at a time. | Try |
| GET | getCertificate | /organization/certificates/{certificate_id} | Get a certificate that has been uploaded to the organization. You can get a certificate regardless of whether it is active or not. | Try |
| POST | modifyCertificate | /organization/certificates/{certificate_id} | Modify a certificate. Note that only the name can be modified. | Try |
| DELETE | deleteCertificate | /organization/certificates/{certificate_id} | Delete a certificate from the organization. The certificate must be inactive for the organization and all projects. | Try |
| GET | usage-costs | /organization/costs | Get costs details for the organization. | Try |
| GET | list-invites | /organization/invites | Returns a list of invites in the organization. | Try |
| POST | inviteUser | /organization/invites | Create an invite for a user to the organization. The invite must be accepted by the user before they have access to the organization. | Try |
| GET | retrieve-invite | /organization/invites/{invite_id} | Retrieves an invite. | Try |
| DELETE | delete-invite | /organization/invites/{invite_id} | Delete an invite. If the invite has already been accepted, it cannot be deleted. | Try |
| GET | list-projects | /organization/projects | Returns a list of projects. | Try |
| POST | create-project | /organization/projects | Create a new project in the organization. Projects can be created and archived, but cannot be deleted. | Try |
| GET | retrieve-project | /organization/projects/{project_id} | Retrieves a project. | Try |
| POST | modify-project | /organization/projects/{project_id} | Modifies a project in the organization. | Try |
| GET | list-project-api-keys | /organization/projects/{project_id}/api_keys | Returns a list of API keys in the project. | Try |
| GET | retrieve-project-api-key | /organization/projects/{project_id}/api_keys/{key_id} | Retrieves an API key in the project. | Try |
| DELETE | delete-project-api-key | /organization/projects/{project_id}/api_keys/{key_id} | Deletes an API key from the project. | Try |
| POST | archive-project | /organization/projects/{project_id}/archive | Archives a project in the organization. Archived projects cannot be used or updated. | Try |
| GET | listProjectCertificates | /organization/projects/{project_id}/certificates | List certificates for this project. | Try |
| POST | activateProjectCertificates | /organization/projects/{project_id}/certificates/activate | Activate certificates at the project level. You can atomically and idempotently activate up to 10 certificates at a time. | Try |
| POST | deactivateProjectCertificates | /organization/projects/{project_id}/certificates/deactivate | Deactivate certificates at the project level. You can atomically and idempotently deactivate up to 10 certificates at a time. | Try |
| GET | list-project-rate-limits | /organization/projects/{project_id}/rate_limits | Returns the rate limits per model for a project. | Try |
| POST | update-project-rate-limits | /organization/projects/{project_id}/rate_limits/{rate_limit_id} | Updates a project rate limit. | Try |
| GET | list-project-service-accounts | /organization/projects/{project_id}/service_accounts | Returns a list of service accounts in the project. | Try |
| POST | create-project-service-account | /organization/projects/{project_id}/service_accounts | Creates a new service account in the project. This also returns an unredacted API key for the service account. | Try |
| GET | retrieve-project-service-account | /organization/projects/{project_id}/service_accounts/{service_account_id} | Retrieves a service account in the project. | Try |
| DELETE | delete-project-service-account | /organization/projects/{project_id}/service_accounts/{service_account_id} | Deletes a service account from the project. | Try |
| GET | list-project-users | /organization/projects/{project_id}/users | Returns a list of users in the project. | Try |
| POST | create-project-user | /organization/projects/{project_id}/users | Adds a user to the project. Users must already be members of the organization to be added to a project. | Try |
| GET | retrieve-project-user | /organization/projects/{project_id}/users/{user_id} | Retrieves a user in the project. | Try |
| POST | modify-project-user | /organization/projects/{project_id}/users/{user_id} | Modifies a user's role in the project. | Try |
| DELETE | delete-project-user | /organization/projects/{project_id}/users/{user_id} | Deletes a user from the project. | Try |
| GET | usage-audio-speeches | /organization/usage/audio_speeches | Get audio speeches usage details for the organization. | Try |
| GET | usage-audio-transcriptions | /organization/usage/audio_transcriptions | Get audio transcriptions usage details for the organization. | Try |
| GET | usage-code-interpreter-sessions | /organization/usage/code_interpreter_sessions | Get code interpreter sessions usage details for the organization. | Try |
| GET | usage-completions | /organization/usage/completions | Get completions usage details for the organization. | Try |
| GET | usage-embeddings | /organization/usage/embeddings | Get embeddings usage details for the organization. | Try |
| GET | usage-images | /organization/usage/images | Get images usage details for the organization. | Try |
| GET | usage-moderations | /organization/usage/moderations | Get moderations usage details for the organization. | Try |
| GET | usage-vector-stores | /organization/usage/vector_stores | Get vector stores usage details for the organization. | Try |
| GET | list-users | /organization/users | Lists all of the users in the organization. | Try |
| GET | retrieve-user | /organization/users/{user_id} | Retrieves a user by their identifier. | Try |
| POST | modify-user | /organization/users/{user_id} | Modifies a user's role in the organization. | Try |
| DELETE | delete-user | /organization/users/{user_id} | Deletes a user from the organization. | Try |
| POST | create-realtime-session | /realtime/sessions | Create an ephemeral API token for use in client-side applications with the Realtime API. Can be configured with the same session parameters as the `session.update` client event. It responds with a session object, plus a `client_secret` key which contains a usable ephemeral API token that can be used to authenticate browser clients for the Realtime API. | Try |
| POST | create-realtime-transcription-session | /realtime/transcription_sessions | Create an ephemeral API token for use in client-side applications with the Realtime API specifically for realtime transcriptions. Can be configured with the same session parameters as the `transcription_session.update` client event. It responds with a session object, plus a `client_secret` key which contains a usable ephemeral API token that can be used to authenticate browser clients for the Realtime API. | Try |
| POST | createResponse | /responses | Creates a model response. Provide [text](/docs/guides/text) or [image](/docs/guides/images) inputs to generate [text](/docs/guides/text) or [JSON](/docs/guides/structured-outputs) outputs. Have the model call your own [custom code](/docs/guides/function-calling) or use built-in [tools](/docs/guides/tools) like [web search](/docs/guides/tools-web-search) or [file search](/docs/guides/tools-file-search) to use your own data as input for the model's response. | Try |
| GET | getResponse | /responses/{response_id} | Retrieves a model response with the given ID. | Try |
| DELETE | deleteResponse | /responses/{response_id} | Deletes a model response with the given ID. | Try |
| GET | listInputItems | /responses/{response_id}/input_items | Returns a list of input items for a given response. | Try |
| POST | createThread | /threads | Create a thread. | Try |
| POST | createThreadAndRun | /threads/runs | Create a thread and run it in one request. | Try |
| GET | getThread | /threads/{thread_id} | Retrieves a thread. | Try |
| POST | modifyThread | /threads/{thread_id} | Modifies a thread. | Try |
| DELETE | deleteThread | /threads/{thread_id} | Delete a thread. | Try |
| GET | listMessages | /threads/{thread_id}/messages | Returns a list of messages for a given thread. | Try |
| POST | createMessage | /threads/{thread_id}/messages | Create a message. | Try |
| GET | getMessage | /threads/{thread_id}/messages/{message_id} | Retrieve a message. | Try |
| POST | modifyMessage | /threads/{thread_id}/messages/{message_id} | Modifies a message. | Try |
| DELETE | deleteMessage | /threads/{thread_id}/messages/{message_id} | Deletes a message. | Try |
| GET | listRuns | /threads/{thread_id}/runs | Returns a list of runs belonging to a thread. | Try |
| POST | createRun | /threads/{thread_id}/runs | Create a run. | Try |
| GET | getRun | /threads/{thread_id}/runs/{run_id} | Retrieves a run. | Try |
| POST | modifyRun | /threads/{thread_id}/runs/{run_id} | Modifies a run. | Try |
| POST | cancelRun | /threads/{thread_id}/runs/{run_id}/cancel | Cancels a run that is `in_progress`. | Try |
| GET | listRunSteps | /threads/{thread_id}/runs/{run_id}/steps | Returns a list of run steps belonging to a run. | Try |
| GET | getRunStep | /threads/{thread_id}/runs/{run_id}/steps/{step_id} | Retrieves a run step. | Try |
| POST | submitToolOuputsToRun | /threads/{thread_id}/runs/{run_id}/submit_tool_outputs | 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. | Try |
| POST | createUpload | /uploads | Creates an intermediate [Upload](/docs/api-reference/uploads/object) object that you can add [Parts](/docs/api-reference/uploads/part-object) 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](/docs/api-reference/files/object) 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 `purpose` values, the correct `mime_type` must be specified. Please refer to documentation for the [supported MIME types for your use case](/docs/assistants/tools/file-search#supported-files). For guidance on the proper filename extensions for each purpose, please follow the documentation on [creating a File](/docs/api-reference/files/create). | Try |
| POST | cancelUpload | /uploads/{upload_id}/cancel | Cancels the Upload. No Parts may be added after an Upload is cancelled. | Try |
| POST | completeUpload | /uploads/{upload_id}/complete | Completes the [Upload](/docs/api-reference/uploads/object). Within the returned Upload object, there is a nested [File](/docs/api-reference/files/object) 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. | Try |
| POST | addUploadPart | /uploads/{upload_id}/parts | Adds a [Part](/docs/api-reference/uploads/part-object) to an [Upload](/docs/api-reference/uploads/object) 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](/docs/api-reference/uploads/complete). | Try |
| GET | listVectorStores | /vector_stores | Returns a list of vector stores. | Try |
| POST | createVectorStore | /vector_stores | Create a vector store. | Try |
| GET | getVectorStore | /vector_stores/{vector_store_id} | Retrieves a vector store. | Try |
| POST | modifyVectorStore | /vector_stores/{vector_store_id} | Modifies a vector store. | Try |
| DELETE | deleteVectorStore | /vector_stores/{vector_store_id} | Delete a vector store. | Try |
| POST | createVectorStoreFileBatch | /vector_stores/{vector_store_id}/file_batches | Create a vector store file batch. | Try |
| GET | getVectorStoreFileBatch | /vector_stores/{vector_store_id}/file_batches/{batch_id} | Retrieves a vector store file batch. | Try |
| POST | cancelVectorStoreFileBatch | /vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel | Cancel a vector store file batch. This attempts to cancel the processing of files in this batch as soon as possible. | Try |
| GET | listFilesInVectorStoreBatch | /vector_stores/{vector_store_id}/file_batches/{batch_id}/files | Returns a list of vector store files in a batch. | Try |
| GET | listVectorStoreFiles | /vector_stores/{vector_store_id}/files | Returns a list of vector store files. | Try |
| POST | createVectorStoreFile | /vector_stores/{vector_store_id}/files | Create a vector store file by attaching a [File](/docs/api-reference/files) to a [vector store](/docs/api-reference/vector-stores/object). | Try |
| GET | getVectorStoreFile | /vector_stores/{vector_store_id}/files/{file_id} | Retrieves a vector store file. | Try |
| POST | updateVectorStoreFileAttributes | /vector_stores/{vector_store_id}/files/{file_id} | Update attributes on a vector store file. | Try |
| DELETE | deleteVectorStoreFile | /vector_stores/{vector_store_id}/files/{file_id} | Delete a vector store file. This will remove the file from the vector store but the file itself will not be deleted. To delete the file, use the [delete file](/docs/api-reference/files/delete) endpoint. | Try |
| GET | retrieveVectorStoreFileContent | /vector_stores/{vector_store_id}/files/{file_id}/content | Retrieve the parsed contents of a vector store file. | Try |
| POST | searchVectorStore | /vector_stores/{vector_store_id}/search | Search a vector store for relevant chunks based on a query and file attributes filter. | Try |