ESC
Example searches: “MIT”, “https://api.openai.com/v1”, “has_more”, “schema”, “file_search”
Search…
Ctrl+K
⌘K
API changelog
Download source
JSON OpenAPI specification
YAML OpenAPI specification
Toggle dark mode
Topics
Introduction
Authentication
Endpoints
Assistants
Returns a list of assistants.
GET
Create an assistant with a model and instructions.
POST
Retrieves an assistant.
GET
Modifies an assistant.
POST
Delete an assistant.
DELETE
Audio
Generates audio from the input text.
POST
Transcribes audio into the input language.
POST
Translates audio into English.
POST
Batches
List your organization's batches.
GET
Creates and executes a batch from an uploaded file of requests
POST
Retrieves a batch.
GET
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.
POST
Chat
List stored Chat Completions. Only Chat Completions that have been stored with the `store` parameter set to `true` will be returned.
GET
**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).
POST
Get a stored chat completion. Only Chat Completions that have been created with the `store` parameter set to `true` will be returned.
GET
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.
POST
Delete a stored chat completion. Only Chat Completions that have been created with the `store` parameter set to `true` can be deleted.
DELETE
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
Completions
Creates a completion for the provided prompt and parameters.
POST
Embeddings
Creates an embedding vector representing the input text.
POST
Files
Returns a list of files.
GET
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.
POST
Returns information about a specific file.
GET
Delete a file.
DELETE
Returns the contents of the specified file.
GET
Fine tuning
**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.
GET
**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.
POST
**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.
DELETE
List your organization's fine-tuning jobs
GET
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)
POST
Get info about a fine-tuning job. [Learn more about fine-tuning](/docs/guides/fine-tuning)
GET
Immediately cancel a fine-tune job.
POST
List checkpoints for a fine-tuning job.
GET
Get status updates for a fine-tuning job.
GET
Images
Creates an edited or extended image given an original image and a prompt.
POST
Creates an image given a prompt.
POST
Creates a variation of a given image.
POST
Models
Lists the currently available models, and provides basic information about each one such as the owner and availability.
GET
Retrieves a model instance, providing basic information about the model such as the owner and permissioning.
GET
Delete a fine-tuned model. You must have the Owner role in your organization to delete a model.
DELETE
Moderations
Classifies if text and/or image inputs are potentially harmful. Learn more in the [moderation guide](/docs/guides/moderation).
POST
Organization
List organization API keys
GET
Create an organization admin API key
POST
Retrieve a single organization API key
GET
Delete an organization admin API key
DELETE
List user actions and configuration changes within this organization.
GET
Get costs details for the organization.
GET
Returns a list of invites in the organization.
GET
Create an invite for a user to the organization. The invite must be accepted by the user before they have access to the organization.
POST
Retrieves an invite.
GET
Delete an invite. If the invite has already been accepted, it cannot be deleted.
DELETE
Returns a list of projects.
GET
Create a new project in the organization. Projects can be created and archived, but cannot be deleted.
POST
Retrieves a project.
GET
Modifies a project in the organization.
POST
Returns a list of API keys in the project.
GET
Retrieves an API key in the project.
GET
Deletes an API key from the project.
DELETE
Archives a project in the organization. Archived projects cannot be used or updated.
POST
Returns the rate limits per model for a project.
GET
Updates a project rate limit.
POST
Returns a list of service accounts in the project.
GET
Creates a new service account in the project. This also returns an unredacted API key for the service account.
POST
Retrieves a service account in the project.
GET
Deletes a service account from the project.
DELETE
Returns a list of users in the project.
GET
Adds a user to the project. Users must already be members of the organization to be added to a project.
POST
Retrieves a user in the project.
GET
Modifies a user's role in the project.
POST
Deletes a user from the project.
DELETE
Get audio speeches usage details for the organization.
GET
Get audio transcriptions usage details for the organization.
GET
Get code interpreter sessions usage details for the organization.
GET
Get completions usage details for the organization.
GET
Get embeddings usage details for the organization.
GET
Get images usage details for the organization.
GET
Get moderations usage details for the organization.
GET
Get vector stores usage details for the organization.
GET
Lists all of the users in the organization.
GET
Retrieves a user by their identifier.
GET
Modifies a user's role in the organization.
POST
Deletes a user from the organization.
DELETE
Realtime
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.
POST
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.
POST
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.
POST
Retrieves a model response with the given ID.
GET
Deletes a model response with the given ID.
DELETE
Returns a list of input items for a given response.
GET
Threads
Create a thread.
POST
Create a thread and run it in one request.
POST
Retrieves a thread.
GET
Modifies a thread.
POST
Delete a thread.
DELETE
Returns a list of messages for a given thread.
GET
Create a message.
POST
Retrieve a message.
GET
Modifies a message.
POST
Deletes a message.
DELETE
Returns a list of runs belonging to a thread.
GET
Create a run.
POST
Retrieves a run.
GET
Modifies a run.
POST
Cancels a run that is `in_progress`.
POST
Returns a list of run steps belonging to a run.
GET
Retrieves a run step.
GET
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.
POST
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).
POST
Cancels the Upload. No Parts may be added after an Upload is cancelled.
POST
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.
POST
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).
POST
Vector stores
Returns a list of vector stores.
GET
Create a vector store.
POST
Retrieves a vector store.
GET
Modifies a vector store.
POST
Delete a vector store.
DELETE
Create a vector store file batch.
POST
Retrieves a vector store file batch.
GET
Cancel a vector store file batch. This attempts to cancel the processing of files in this batch as soon as possible.
POST
Returns a list of vector store files in a batch.
GET
Returns a list of vector store files.
GET
Create a vector store file by attaching a [File](/docs/api-reference/files) to a [vector store](/docs/api-reference/vector-stores/object).
POST
Retrieves a vector store file.
GET
Update attributes on a vector store file.
POST
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.
DELETE
Retrieve the parsed contents of a vector store file.
GET
Search a vector store for relevant chunks based on a query and file attributes filter.
POST
Search…
Ctrl+K
⌘K
API changelog
Download source
JSON OpenAPI specification
YAML OpenAPI specification
Toggle dark mode
Dismiss highlight
Show more
Uploads