Version: 2.3.0
The OpenAI REST API. Please see https://platform.openai.com/docs/api-reference for more details.
Build Assistants that can call models and use tools.
| Operation | Description |
|---|---|
| GET /assistants | Returns a list of assistants. |
| POST /assistants | Create an assistant with a model and instructions. |
| GET /assistants/{assistant_id} | Retrieves an assistant. |
| POST /assistants/{assistant_id} | Modifies an assistant. |
| DELETE /assistants/{assistant_id} | Delete an assistant. |
| POST /threads | Create a thread. |
| POST /threads/runs | Create a thread and run it in one request. |
| GET /threads/{thread_id} | Retrieves a thread. |
| POST /threads/{thread_id} | Modifies a thread. |
| DELETE /threads/{thread_id} | Delete a thread. |
| GET /threads/{thread_id}/messages | Returns a list of messages for a given thread. |
| POST /threads/{thread_id}/messages | Create a message. |
| GET /threads/{thread_id}/messages/{message_id} | Retrieve a message. |
| POST /threads/{thread_id}/messages/{message_id} | Modifies a message. |
| DELETE /threads/{thread_id}/messages/{message_id} | Deletes a message. |
| GET /threads/{thread_id}/runs | Returns a list of runs belonging to a thread. |
| POST /threads/{thread_id}/runs | Create a run. |
| GET /threads/{thread_id}/runs/{run_id} | Retrieves a run. |
| POST /threads/{thread_id}/runs/{run_id} | Modifies a run. |
| POST /threads/{thread_id}/runs/{run_id}/cancel | Cancels a run that is |
| GET /threads/{thread_id}/runs/{run_id}/steps | Returns a list of run steps belonging to a run. |
| GET /threads/{thread_id}/runs/{run_id}/steps/{step_id} | Retrieves a run step. |
| POST /threads/{thread_id}/runs/{run_id}/submit_tool_outputs | When a run has the |
Turn audio into text or text into audio.
| Operation | Description |
|---|---|
| POST /audio/speech | Generates audio from the input text. |
| POST /audio/transcriptions | Transcribes audio into the input language. |
| POST /audio/translations | Translates audio into English. |
List and describe the various models available in the API.
| Operation | Description |
|---|---|
| GET /models | Lists the currently available models, and provides basic information about each one such as the owner and availability. |
| GET /models/{model} | Retrieves a model instance, providing basic information about the model such as the owner and permissioning. |
| DELETE /models/{model} | Delete a fine-tuned model. You must have the Owner role in your organization to delete a model. |
Given text and/or image inputs, classifies if those inputs are potentially harmful.
| Operation | Description |
|---|---|
| POST /moderations | Classifies if text and/or image inputs are potentially harmful. Learn more in the moderation guide. |
List user actions and configuration changes within this organization.
| Operation | Description |
|---|---|
| GET /organization/audit_logs | List user actions and configuration changes within this organization. |
| Operation | Description |
|---|---|
| GET /organization/admin_api_keys | List organization API keys |
| POST /organization/admin_api_keys | Create an organization admin API key |
| GET /organization/admin_api_keys/{key_id} | Retrieve a single organization API key |
| DELETE /organization/admin_api_keys/{key_id} | Delete an organization admin API key |
| Operation | Description |
|---|---|
| GET /organization/costs | Get costs details for the organization. |
| GET /organization/usage/audio_speeches | Get audio speeches usage details for the organization. |
| GET /organization/usage/audio_transcriptions | Get audio transcriptions usage details for the organization. |
| GET /organization/usage/code_interpreter_sessions | Get code interpreter sessions usage details for the organization. |
| GET /organization/usage/completions | Get completions usage details for the organization. |
| GET /organization/usage/embeddings | Get embeddings usage details for the organization. |
| GET /organization/usage/images | Get images usage details for the organization. |
| GET /organization/usage/moderations | Get moderations usage details for the organization. |
| GET /organization/usage/vector_stores | Get vector stores usage details for the organization. |
| Operation | Description |
|---|---|
| GET /organization/invites | Returns a list of invites in the organization. |
| POST /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. |
| GET /organization/invites/{invite_id} | Retrieves an invite. |
| DELETE /organization/invites/{invite_id} | Delete an invite. If the invite has already been accepted, it cannot be deleted. |
| Operation | Description |
|---|---|
| GET /organization/projects | Returns a list of projects. |
| POST /organization/projects | Create a new project in the organization. Projects can be created and archived, but cannot be deleted. |
| GET /organization/projects/{project_id} | Retrieves a project. |
| POST /organization/projects/{project_id} | Modifies a project in the organization. |
| GET /organization/projects/{project_id}/api_keys | Returns a list of API keys in the project. |
| GET /organization/projects/{project_id}/api_keys/{key_id} | Retrieves an API key in the project. |
| DELETE /organization/projects/{project_id}/api_keys/{key_id} | Deletes an API key from the project. |
| POST /organization/projects/{project_id}/archive | Archives a project in the organization. Archived projects cannot be used or updated. |
| GET /organization/projects/{project_id}/rate_limits | Returns the rate limits per model for a project. |
| POST /organization/projects/{project_id}/rate_limits/{rate_limit_id} | Updates a project rate limit. |
| GET /organization/projects/{project_id}/service_accounts | Returns a list of service accounts in the project. |
| POST /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. |
| GET /organization/projects/{project_id}/service_accounts/{service_account_id} | Retrieves a service account in the project. |
| DELETE /organization/projects/{project_id}/service_accounts/{service_account_id} | Deletes a service account from the project. |
| GET /organization/projects/{project_id}/users | Returns a list of users in the project. |
| POST /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. |
| GET /organization/projects/{project_id}/users/{user_id} | Retrieves a user in the project. |
| POST /organization/projects/{project_id}/users/{user_id} | Modifies a user's role in the project. |
| DELETE /organization/projects/{project_id}/users/{user_id} | Deletes a user from the project. |
| Operation | Description |
|---|---|
| GET /organization/users | Lists all of the users in the organization. |
| GET /organization/users/{user_id} | Retrieves a user by their identifier. |
| POST /organization/users/{user_id} | Modifies a user's role in the organization. |
| DELETE /organization/users/{user_id} | Deletes a user from the organization. |
| Operation | Description |
|---|---|
| POST /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
It responds with a session object, plus a |
| Operation | Description |
|---|---|
| GET /vector_stores | Returns a list of vector stores. |
| POST /vector_stores | Create a vector store. |
| GET /vector_stores/{vector_store_id} | Retrieves a vector store. |
| POST /vector_stores/{vector_store_id} | Modifies a vector store. |
| DELETE /vector_stores/{vector_store_id} | Delete a vector store. |
| POST /vector_stores/{vector_store_id}/file_batches | Create a vector store file batch. |
| GET /vector_stores/{vector_store_id}/file_batches/{batch_id} | Retrieves a vector store file batch. |
| POST /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. |
| GET /vector_stores/{vector_store_id}/file_batches/{batch_id}/files | Returns a list of vector store files in a batch. |
| GET /vector_stores/{vector_store_id}/files | Returns a list of vector store files. |
| POST /vector_stores/{vector_store_id}/files | Create a vector store file by attaching a File to a vector store. |
| GET /vector_stores/{vector_store_id}/files/{file_id} | Retrieves a vector store file. |
| DELETE /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 endpoint. |
Given a list of messages comprising a conversation, the model will return a response.
| Operation | Description |
|---|---|
| POST /chat/completions | Creates a model response for the given chat conversation. Learn more in the text generation, vision, and 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. |
Given a prompt, the model will return one or more predicted completions, and can also return the probabilities of alternative tokens at each position.
| Operation | Description |
|---|---|
| POST /completions | Creates a completion for the provided prompt and parameters. |
Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms.
| Operation | Description |
|---|---|
| POST /embeddings | Creates an embedding vector representing the input text. |
Manage fine-tuning jobs to tailor a model to your specific training data.
| Operation | Description |
|---|---|
| POST /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. |
| GET /fine_tuning/jobs | List your organization's fine-tuning jobs |
| GET /fine_tuning/jobs/{fine_tuning_job_id} | Get info about a fine-tuning job. |
| POST /fine_tuning/jobs/{fine_tuning_job_id}/cancel | Immediately cancel a fine-tune job. |
| GET /fine_tuning/jobs/{fine_tuning_job_id}/checkpoints | List checkpoints for a fine-tuning job. |
| GET /fine_tuning/jobs/{fine_tuning_job_id}/events | Get status updates for a fine-tuning job. |
Create large batches of API requests to run asynchronously.
| Operation | Description |
|---|---|
| POST /batches | Creates and executes a batch from an uploaded file of requests |
| GET /batches | List your organization's batches. |
| GET /batches/{batch_id} | Retrieves a batch. |
| POST /batches/{batch_id}/cancel | Cancels an in-progress batch. The batch will be in status |
Files are used to upload documents that can be used with features like Assistants and Fine-tuning.
| Operation | Description |
|---|---|
| GET /files | Returns a list of files. |
| POST /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 for details. The Fine-tuning API only supports The Batch API only supports Please contact us if you need to increase these storage limits. |
| DELETE /files/{file_id} | Delete a file. |
| GET /files/{file_id} | Returns information about a specific file. |
| GET /files/{file_id}/content | Returns the contents of the specified file. |
Use Uploads to upload large files in multiple parts.
| Operation | Description |
|---|---|
| POST /uploads | 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 For guidance on the proper filename extensions for each purpose, please follow the documentation on creating a File. |
| POST /uploads/{upload_id}/cancel | Cancels the Upload. No Parts may be added after an Upload is cancelled. |
| POST /uploads/{upload_id}/complete | 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. |
| POST /uploads/{upload_id}/parts | 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. |
Given a prompt and/or an input image, the model will generate a new image.
| Operation | Description |
|---|---|
| POST /images/edits | Creates an edited or extended image given an original image and a prompt. |
| POST /images/generations | Creates an image given a prompt. |
| POST /images/variations | Creates a variation of a given image. |
| limit | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. |
query | object | |
| order | Sort order by the |
query | object | |
| after | A cursor for use in pagination. |
query | object | |
| before | A cursor for use in pagination. |
query | object |
OK
OK
| assistant_id | The ID of the assistant to delete. |
path | object |
OK
| assistant_id | The ID of the assistant to retrieve. |
path | object |
OK
| assistant_id | The ID of the assistant to modify. |
path | object |
OK
OK
| Transfer-Encoding | chunked |
object |
OK
OK
| after | A cursor for use in pagination. |
query | object | |
| limit | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. |
query | object |
Batch listed successfully.
Batch created successfully.
| batch_id | The ID of the batch to retrieve. |
path | object |
Batch retrieved successfully.
cancelling for up to 10 minutes, before changing to cancelled, where it will have partial results (if any) available in the output file.| batch_id | The ID of the batch to cancel. |
path | object |
Batch is cancelling. Returns the cancelling batch's details.
Creates a model response for the given chat conversation. Learn more in the text generation, vision, and 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.
OK
OK
OK
| purpose | Only return files with the given purpose. |
query | object | |
| limit | A limit on the number of objects to be returned. Limit can range between 1 and 10,000, and the default is 10,000. |
query | object | |
| order | Sort order by the |
query | object | |
| after | A cursor for use in pagination. |
query | object |
OK
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 for details.
The Fine-tuning API only supports .jsonl files. The input also has certain required formats for fine-tuning chat or completions models.
The Batch API only supports .jsonl files up to 200 MB in size. The input also has a specific required format.
Please contact us if you need to increase these storage limits.
OK
| file_id | The ID of the file to use for this request. |
path | object |
OK
| file_id | The ID of the file to use for this request. |
path | object |
OK
| file_id | The ID of the file to use for this request. |
path | object |
OK
| after | Identifier for the last job from the previous pagination request. |
query | object | |
| limit | Number of fine-tuning jobs to retrieve. |
query | object |
OK
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.
OK
| fine_tuning_job_id | The ID of the fine-tuning job. |
path | object |
OK
| fine_tuning_job_id | The ID of the fine-tuning job to cancel. |
path | object |
OK
| fine_tuning_job_id | The ID of the fine-tuning job to get checkpoints for. |
path | object | |
| after | Identifier for the last checkpoint ID from the previous pagination request. |
query | object | |
| limit | Number of checkpoints to retrieve. |
query | object |
OK
| fine_tuning_job_id | The ID of the fine-tuning job to get events for. |
path | object | |
| after | Identifier for the last event from the previous pagination request. |
query | object | |
| limit | Number of events to retrieve. |
query | object |
OK
OK
OK
OK
OK
| model | The model to delete |
path | object |
OK
| model | The ID of the model to use for this request |
path | object |
OK
OK
Retrieve a paginated list of organization admin API keys.
| after | query | object | ||
| order | query | object | ||
| limit | query | object |
A list of organization API keys.
| bearer_identity_edge | key.secret , api.management.read |
| basic_identity_edge |
Create a new admin-level API key for the organization.
The newly created admin API key.
| bearer_identity_edge | key.secret , api.management.write |
| basic_identity_edge |
Delete the specified admin API key.
| key_id | path | object |
Confirmation that the API key was deleted.
| bearer_identity_edge | key.secret , api.management.write |
| basic_identity_edge |
Get details for a specific organization API key by its ID.
| key_id | path | object |
Details of the requested API key.
| bearer_identity_edge | key.secret , api.management.read |
| basic_identity_edge |
| effective_at | Return only events whose |
query | object | |
| project_ids[] | Return only events for these projects. |
query | object | |
| event_types[] | Return only events with a |
query | object | |
| actor_ids[] | Return only events performed by these actors. Can be a user ID, a service account ID, or an api key tracking ID. |
query | object | |
| actor_emails[] | Return only events performed by users with these emails. |
query | object | |
| resource_ids[] | Return only events performed on these targets. For example, a project ID updated. |
query | object | |
| limit | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. |
query | object | |
| after | A cursor for use in pagination. |
query | object | |
| before | A cursor for use in pagination. |
query | object |
Audit logs listed successfully.
| start_time | Start time (Unix seconds) of the query time range, inclusive. |
query | object | |
| end_time | End time (Unix seconds) of the query time range, exclusive. |
query | object | |
| bucket_width | Width of each time bucket in response. Currently only |
query | object | |
| project_ids | Return only costs for these projects. |
query | object | |
| group_by | Group the costs by the specified fields. Support fields include |
query | object | |
| limit | A limit on the number of buckets to be returned. Limit can range between 1 and 180, and the default is 7. |
query | object | |
| page | A cursor for use in pagination. Corresponding to the |
query | object |
Costs data retrieved successfully.
| limit | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. |
query | object | |
| after | A cursor for use in pagination. |
query | object |
Invites listed successfully.
User invited successfully.
| invite_id | The ID of the invite to delete. |
path | object |
Invite deleted successfully.
| invite_id | The ID of the invite to retrieve. |
path | object |
Invite retrieved successfully.
| limit | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. |
query | object | |
| after | A cursor for use in pagination. |
query | object | |
| include_archived | If |
query | object |
Projects listed successfully.
Project created successfully.
| project_id | The ID of the project. |
path | object |
Project retrieved successfully.
| project_id | The ID of the project. |
path | object |
Project updated successfully.
Error response when updating the default project.
| project_id | The ID of the project. |
path | object | |
| limit | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. |
query | object | |
| after | A cursor for use in pagination. |
query | object |
Project API keys listed successfully.
| project_id | The ID of the project. |
path | object | |
| key_id | The ID of the API key. |
path | object |
Project API key deleted successfully.
Error response for various conditions.
| project_id | The ID of the project. |
path | object | |
| key_id | The ID of the API key. |
path | object |
Project API key retrieved successfully.
| project_id | The ID of the project. |
path | object |
Project archived successfully.
| project_id | The ID of the project. |
path | object | |
| limit | A limit on the number of objects to be returned. The default is 100. |
query | object | |
| after | A cursor for use in pagination. |
query | object | |
| before | A cursor for use in pagination. |
query | object |
Project rate limits listed successfully.
| project_id | The ID of the project. |
path | object | |
| rate_limit_id | The ID of the rate limit. |
path | object |
Project rate limit updated successfully.
Error response for various conditions.
| project_id | The ID of the project. |
path | object | |
| limit | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. |
query | object | |
| after | A cursor for use in pagination. |
query | object |
Project service accounts listed successfully.
Error response when project is archived.
| project_id | The ID of the project. |
path | object |
Project service account created successfully.
Error response when project is archived.
| project_id | The ID of the project. |
path | object | |
| service_account_id | The ID of the service account. |
path | object |
Project service account deleted successfully.
| project_id | The ID of the project. |
path | object | |
| service_account_id | The ID of the service account. |
path | object |
Project service account retrieved successfully.
| project_id | The ID of the project. |
path | object | |
| limit | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. |
query | object | |
| after | A cursor for use in pagination. |
query | object |
Project users listed successfully.
Error response when project is archived.
| project_id | The ID of the project. |
path | object |
User added to project successfully.
Error response for various conditions.
| project_id | The ID of the project. |
path | object | |
| user_id | The ID of the user. |
path | object |
Project user deleted successfully.
Error response for various conditions.
| project_id | The ID of the project. |
path | object | |
| user_id | The ID of the user. |
path | object |
Project user retrieved successfully.
| project_id | The ID of the project. |
path | object | |
| user_id | The ID of the user. |
path | object |
Project user's role updated successfully.
Error response for various conditions.
| start_time | Start time (Unix seconds) of the query time range, inclusive. |
query | object | |
| end_time | End time (Unix seconds) of the query time range, exclusive. |
query | object | |
| bucket_width | Width of each time bucket in response. Currently |
query | object | |
| project_ids | Return only usage for these projects. |
query | object | |
| user_ids | Return only usage for these users. |
query | object | |
| api_key_ids | Return only usage for these API keys. |
query | object | |
| models | Return only usage for these models. |
query | object | |
| group_by | Group the usage data by the specified fields. Support fields include |
query | object | |
| limit | Specifies the number of buckets to return.
|
query | object | |
| page | A cursor for use in pagination. Corresponding to the |
query | object |
Usage data retrieved successfully.
| start_time | Start time (Unix seconds) of the query time range, inclusive. |
query | object | |
| end_time | End time (Unix seconds) of the query time range, exclusive. |
query | object | |
| bucket_width | Width of each time bucket in response. Currently |
query | object | |
| project_ids | Return only usage for these projects. |
query | object | |
| user_ids | Return only usage for these users. |
query | object | |
| api_key_ids | Return only usage for these API keys. |
query | object | |
| models | Return only usage for these models. |
query | object | |
| group_by | Group the usage data by the specified fields. Support fields include |
query | object | |
| limit | Specifies the number of buckets to return.
|
query | object | |
| page | A cursor for use in pagination. Corresponding to the |
query | object |
Usage data retrieved successfully.
| start_time | Start time (Unix seconds) of the query time range, inclusive. |
query | object | |
| end_time | End time (Unix seconds) of the query time range, exclusive. |
query | object | |
| bucket_width | Width of each time bucket in response. Currently |
query | object | |
| project_ids | Return only usage for these projects. |
query | object | |
| group_by | Group the usage data by the specified fields. Support fields include |
query | object | |
| limit | Specifies the number of buckets to return.
|
query | object | |
| page | A cursor for use in pagination. Corresponding to the |
query | object |
Usage data retrieved successfully.
| start_time | Start time (Unix seconds) of the query time range, inclusive. |
query | object | |
| end_time | End time (Unix seconds) of the query time range, exclusive. |
query | object | |
| bucket_width | Width of each time bucket in response. Currently |
query | object | |
| project_ids | Return only usage for these projects. |
query | object | |
| user_ids | Return only usage for these users. |
query | object | |
| api_key_ids | Return only usage for these API keys. |
query | object | |
| models | Return only usage for these models. |
query | object | |
| batch | If |
query | object | |
| group_by | Group the usage data by the specified fields. Support fields include |
query | object | |
| limit | Specifies the number of buckets to return.
|
query | object | |
| page | A cursor for use in pagination. Corresponding to the |
query | object |
Usage data retrieved successfully.
| start_time | Start time (Unix seconds) of the query time range, inclusive. |
query | object | |
| end_time | End time (Unix seconds) of the query time range, exclusive. |
query | object | |
| bucket_width | Width of each time bucket in response. Currently |
query | object | |
| project_ids | Return only usage for these projects. |
query | object | |
| user_ids | Return only usage for these users. |
query | object | |
| api_key_ids | Return only usage for these API keys. |
query | object | |
| models | Return only usage for these models. |
query | object | |
| group_by | Group the usage data by the specified fields. Support fields include |
query | object | |
| limit | Specifies the number of buckets to return.
|
query | object | |
| page | A cursor for use in pagination. Corresponding to the |
query | object |
Usage data retrieved successfully.
| start_time | Start time (Unix seconds) of the query time range, inclusive. |
query | object | |
| end_time | End time (Unix seconds) of the query time range, exclusive. |
query | object | |
| bucket_width | Width of each time bucket in response. Currently |
query | object | |
| sources | Return only usages for these sources. Possible values are |
query | object | |
| sizes | Return only usages for these image sizes. Possible values are |
query | object | |
| project_ids | Return only usage for these projects. |
query | object | |
| user_ids | Return only usage for these users. |
query | object | |
| api_key_ids | Return only usage for these API keys. |
query | object | |
| models | Return only usage for these models. |
query | object | |
| group_by | Group the usage data by the specified fields. Support fields include |
query | object | |
| limit | Specifies the number of buckets to return.
|
query | object | |
| page | A cursor for use in pagination. Corresponding to the |
query | object |
Usage data retrieved successfully.
| start_time | Start time (Unix seconds) of the query time range, inclusive. |
query | object | |
| end_time | End time (Unix seconds) of the query time range, exclusive. |
query | object | |
| bucket_width | Width of each time bucket in response. Currently |
query | object | |
| project_ids | Return only usage for these projects. |
query | object | |
| user_ids | Return only usage for these users. |
query | object | |
| api_key_ids | Return only usage for these API keys. |
query | object | |
| models | Return only usage for these models. |
query | object | |
| group_by | Group the usage data by the specified fields. Support fields include |
query | object | |
| limit | Specifies the number of buckets to return.
|
query | object | |
| page | A cursor for use in pagination. Corresponding to the |
query | object |
Usage data retrieved successfully.
| start_time | Start time (Unix seconds) of the query time range, inclusive. |
query | object | |
| end_time | End time (Unix seconds) of the query time range, exclusive. |
query | object | |
| bucket_width | Width of each time bucket in response. Currently |
query | object | |
| project_ids | Return only usage for these projects. |
query | object | |
| group_by | Group the usage data by the specified fields. Support fields include |
query | object | |
| limit | Specifies the number of buckets to return.
|
query | object | |
| page | A cursor for use in pagination. Corresponding to the |
query | object |
Usage data retrieved successfully.
| limit | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. |
query | object | |
| after | A cursor for use in pagination. |
query | object |
Users listed successfully.
| user_id | The ID of the user. |
path | object |
User deleted successfully.
| user_id | The ID of the user. |
path | object |
User retrieved successfully.
| user_id | The ID of the user. |
path | object |
User role updated successfully.
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.
Session created successfully.
OK
OK
| thread_id | The ID of the thread to delete. |
path | object |
OK
| thread_id | The ID of the thread to retrieve. |
path | object |
OK
| thread_id | The ID of the thread to modify. Only the |
path | object |
OK
| thread_id | The ID of the thread the messages belong to. |
path | object | |
| limit | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. |
query | object | |
| order | Sort order by the |
query | object | |
| after | A cursor for use in pagination. |
query | object | |
| before | A cursor for use in pagination. |
query | object | |
| run_id | Filter messages by the run ID that generated them. |
query | object |
OK
| thread_id | The ID of the thread to which this message belongs. |
path | object | |
| message_id | The ID of the message to delete. |
path | object |
OK
| thread_id | The ID of the thread to which this message belongs. |
path | object | |
| message_id | The ID of the message to retrieve. |
path | object |
OK
| thread_id | The ID of the thread to which this message belongs. |
path | object | |
| message_id | The ID of the message to modify. |
path | object |
OK
| thread_id | The ID of the thread the run belongs to. |
path | object | |
| limit | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. |
query | object | |
| order | Sort order by the |
query | object | |
| after | A cursor for use in pagination. |
query | object | |
| before | A cursor for use in pagination. |
query | object |
OK
| thread_id | The ID of the thread to run. |
path | object | |
| include[] | A list of additional fields to include in the response. Currently the only supported value is See the file search tool documentation for more information. |
query | object |
OK
| thread_id | The ID of the thread that was run. |
path | object | |
| run_id | The ID of the run to retrieve. |
path | object |
OK
| thread_id | The ID of the thread that was run. |
path | object | |
| run_id | The ID of the run to modify. |
path | object |
OK
| thread_id | The ID of the thread to which this run belongs. |
path | object | |
| run_id | The ID of the run to cancel. |
path | object |
OK
| thread_id | The ID of the thread the run and run steps belong to. |
path | object | |
| run_id | The ID of the run the run steps belong to. |
path | object | |
| limit | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. |
query | object | |
| order | Sort order by the |
query | object | |
| after | A cursor for use in pagination. |
query | object | |
| before | A cursor for use in pagination. |
query | object | |
| include[] | A list of additional fields to include in the response. Currently the only supported value is See the file search tool documentation for more information. |
query | object |
OK
| thread_id | The ID of the thread to which the run and run step belongs. |
path | object | |
| run_id | The ID of the run to which the run step belongs. |
path | object | |
| step_id | The ID of the run step to retrieve. |
path | object | |
| include[] | A list of additional fields to include in the response. Currently the only supported value is See the file search tool documentation for more information. |
query | object |
OK
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.| thread_id | The ID of the thread to which this run belongs. |
path | object | |
| run_id | The ID of the run that requires the tool output submission. |
path | object |
OK
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:
For guidance on the proper filename extensions for each purpose, please follow the documentation on creating a File.
OK
| upload_id | The ID of the Upload. |
path | object |
OK
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.
| upload_id | The ID of the Upload. |
path | object |
OK
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.
| upload_id | The ID of the Upload. |
path | object |
OK
| limit | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. |
query | object | |
| order | Sort order by the |
query | object | |
| after | A cursor for use in pagination. |
query | object | |
| before | A cursor for use in pagination. |
query | object |
OK
OK
| vector_store_id | The ID of the vector store to delete. |
path | object |
OK
| vector_store_id | The ID of the vector store to retrieve. |
path | object |
OK
| vector_store_id | The ID of the vector store to modify. |
path | object |
OK
| vector_store_id | The ID of the vector store for which to create a File Batch. |
path | object |
OK
| vector_store_id | The ID of the vector store that the file batch belongs to. |
path | object | |
| batch_id | The ID of the file batch being retrieved. |
path | object |
OK
| vector_store_id | The ID of the vector store that the file batch belongs to. |
path | object | |
| batch_id | The ID of the file batch to cancel. |
path | object |
OK
| vector_store_id | The ID of the vector store that the files belong to. |
path | object | |
| batch_id | The ID of the file batch that the files belong to. |
path | object | |
| limit | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. |
query | object | |
| order | Sort order by the |
query | object | |
| after | A cursor for use in pagination. |
query | object | |
| before | A cursor for use in pagination. |
query | object | |
| filter | Filter by file status. One of |
query | object |
OK
| vector_store_id | The ID of the vector store that the files belong to. |
path | object | |
| limit | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. |
query | object | |
| order | Sort order by the |
query | object | |
| after | A cursor for use in pagination. |
query | object | |
| before | A cursor for use in pagination. |
query | object | |
| filter | Filter by file status. One of |
query | object |
OK
| vector_store_id | The ID of the vector store for which to create a File. |
path | object |
OK
| vector_store_id | The ID of the vector store that the file belongs to. |
path | object | |
| file_id | The ID of the file to delete. |
path | object |
OK
| vector_store_id | The ID of the vector store that the file belongs to. |
path | object | |
| file_id | The ID of the file being retrieved. |
path | object |
OK