Instance methods
accept_realtime_call(call_id :
String, request_body :
RealtimeSessionCreateRequestGA) :
Nil Accept call
Accept an incoming SIP call and configure the realtime session that will
handle it.
Sourceactivate_organization_certificates(request_body : ToggleCertificatesRequest) : ListCertificatesResponse
Activate certificates for organization
Activate certificates at the organization level.
You can atomically and idempotently activate up to 10 certificates at a time.
Sourceactivate_project_certificates(project_id :
String, request_body :
ToggleCertificatesRequest) :
ListCertificatesResponse Activate certificates for project
Activate certificates at the project level.
You can atomically and idempotently activate up to 10 certificates at a time.
Sourceadd_group_user(group_id :
String, request_body :
CreateGroupUserBody) :
GroupUserAssignment Add group user
Adds a user to a group.
Sourceadd_project_group(project_id :
String, request_body :
InviteProjectGroupBody) :
ProjectGroup Add project group
Grants a group access to a project.
Sourceadd_upload_part(upload_id :
String, request_body :
AddUploadPartRequest) :
UploadPart Add upload part
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.
Sourceadmin_api_keys_create(request_body : AdminApiKeysCreateRequestBody) : AdminApiKey
Create admin API key
Create an organization admin API key
Sourceadmin_api_keys_delete(key_id :
String) :
AdminApiKeysDeleteResponse Delete admin API key
Delete an organization admin API key
Sourceadmin_api_keys_get(key_id :
String) :
AdminApiKey Retrieve admin API key
Retrieve a single organization API key
Sourceadmin_api_keys_list(after :
String |
Nil = nil, order :
String |
Nil = nil, limit :
Int64 |
Nil = nil) :
ApiKeyList List all organization and project API keys.
List organization API keys
Sourcearchive_project(project_id :
String) :
Project Archive project
Archives a project in the organization. Archived projects cannot be used or updated.
Sourceassign_group_role(group_id :
String, request_body :
PublicAssignOrganizationGroupRoleBody) :
GroupRoleAssignment Assign organization role to group
Assigns an organization role to a group within the organization.
Sourceassign_project_group_role(project_id :
String, group_id :
String, request_body :
PublicAssignOrganizationGroupRoleBody) :
GroupRoleAssignment Assign project role to group
Assigns a project role to a group within a project.
Sourceassign_project_user_role(project_id :
String, user_id :
String, request_body :
PublicAssignOrganizationGroupRoleBody) :
UserRoleAssignment Assign project role to user
Assigns a project role to a user within a project.
Sourceassign_user_role(user_id :
String, request_body :
PublicAssignOrganizationGroupRoleBody) :
UserRoleAssignment Assign organization role to user
Assigns an organization role to a user within the organization.
Sourcecancel_batch(batch_id :
String) :
Batch Cancel batch
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.
Sourcecancel_chat_session_method(session_id :
String) :
ChatSessionResource Cancel chat session
Cancel a ChatKit session
Sourcecancel_eval_run(eval_id :
String, run_id :
String) :
EvalRun Cancel eval run
Cancel an ongoing evaluation run.
Sourcecancel_fine_tuning_job(fine_tuning_job_id :
String) :
FineTuningJob Cancel fine-tuning
Immediately cancel a fine-tune job.
Sourcecancel_response(response_id :
String) :
Response Cancel a response
Cancels a model response with the given ID. Only responses created with
the background parameter set to true can be cancelled.
Learn more.
SourceCancel a run
Cancels a run that is in_progress.
Sourcecancel_upload(upload_id :
String) :
Upload Cancel upload
Cancels the Upload. No Parts may be added after an Upload is cancelled.
Sourcecancel_vector_store_file_batch(vector_store_id :
String, batch_id :
String) :
VectorStoreFileBatchObject Cancel vector store file batch
Cancel a vector store file batch. This attempts to cancel the processing of files in this batch as soon as possible.
Sourcecompactconversation(request_body : CompactResponseMethodPublicBody | Nil = nil) : CompactResource
Compact a response
Compact conversation
Sourcecomplete_upload(upload_id :
String, request_body :
CompleteUploadRequest) :
Upload Complete 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.
Sourcecreate_assistant(request_body : CreateAssistantRequest) : AssistantObject
Create assistant
Create an assistant with a model and instructions.
Sourcecreate_batch(request_body : CreateBatchRequestBody) : Batch
Create batch
Creates and executes a batch from an uploaded file of requests
Sourcecreate_chat_completion(request_body : CreateChatCompletionRequest) : CreateChatCompletionResponse
Create chat completion
Starting a new project? We recommend trying Responses
to take advantage of the latest OpenAI platform features. Compare
Chat Completions with Responses.
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.
Sourcecreate_chat_completion_stream(request_body : CreateChatCompletionRequest, &block : CreateChatCompletionStreamResponse -> )
Streaming version of create_chat_completion
Sourcecreate_chat_session_method(request_body : CreateChatSessionBody | Nil = nil) : ChatSessionResource
Create ChatKit session
Create a ChatKit session
Sourcecreate_completion(request_body : CreateCompletionRequest) : CreateCompletionResponse
Create completion
Creates a completion for the provided prompt and parameters.
Sourcecreate_container(request_body : CreateContainerBody | Nil = nil) : ContainerResource
Create container
Create Container
Sourcecreate_container_file(container_id :
String, request_body :
CreateContainerFileBody) :
ContainerFileResource Create container file
Create a Container File
You can send either a multipart/form-data request with the raw file content, or a JSON request with a file ID.
Sourcecreate_conversation(request_body : CreateConversationBody | Nil = nil) : ConversationResource
Create a conversation
Create a conversation.
Sourcecreate_conversation_items(conversation_id :
String, request_body :
CreateConversationItemsRequestBody, include_value :
Array(
IncludeEnum) |
Nil = nil) :
ConversationItemList Create items
Create items in a conversation with the given ID.
Sourcecreate_embedding(request_body : CreateEmbeddingRequest) : CreateEmbeddingResponse
Create embeddings
Creates an embedding vector representing the input text.
Sourcecreate_eval(request_body : CreateEvalRequest) : Eval
Create eval
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 the config for a data source, which dictates the schema of the data used in the evaluation. 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.
Sourcecreate_eval_run(eval_id :
String, request_body :
CreateEvalRunRequest) :
EvalRun Create eval run
Kicks off a new run for a given evaluation, specifying the data source, and what model configuration to use to test. The datasource will be validated against the schema specified in the config of the evaluation.
Sourcecreate_file(request_body : CreateFileRequest) : OpenAIFile
Upload file
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 1 TB.
- 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.
Sourcecreate_fine_tuning_checkpoint_permission(fine_tuned_model_checkpoint :
String, request_body :
CreateFineTuningCheckpointPermissionRequest) :
ListFineTuningCheckpointPermissionResponse Create checkpoint permissions
NOTE: Calling this endpoint requires an admin API key.
This enables organization owners to share fine-tuned models with other projects in their organization.
Sourcecreate_fine_tuning_job(request_body : CreateFineTuningJobRequest) : FineTuningJob
Create fine-tuning job
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
Sourcecreate_group(request_body : CreateGroupBody) : GroupResponse
Create group
Creates a new group in the organization.
Sourcecreate_image(request_body : CreateImageRequest) : ImagesResponse
Create image
Creates an image given a prompt. Learn more.
Sourcecreate_image_edit(request_body : CreateImageEditRequest) : ImagesResponse
Create image edit
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.
Sourcecreate_image_edit_stream(request_body : CreateImageEditRequest, &block : ImagesResponse -> )
Streaming version of create_image_edit
Sourcecreate_image_stream(request_body : CreateImageRequest, &block : ImagesResponse -> )
Streaming version of create_image
Sourcecreate_image_variation(request_body : CreateImageVariationRequest) : ImagesResponse
Create image variation
Creates a variation of a given image. This endpoint only supports dall-e-2.
Sourcecreate_message(thread_id :
String, request_body :
CreateMessageRequest) :
MessageObject Create message
Create a message.
Sourcecreate_moderation(request_body : CreateModerationRequest) : CreateModerationResponse
Create moderation
Classifies if text and/or image inputs are potentially harmful. Learn
more in the moderation guide.
Sourcecreate_project(request_body : ProjectCreateRequest) : Project
Create project
Create a new project in the organization. Projects can be created and archived, but cannot be deleted.
Sourcecreate_project_role(project_id :
String, request_body :
PublicCreateOrganizationRoleBody) :
Role Create project role
Creates a custom role for a project.
Sourcecreate_project_service_account(project_id :
String, request_body :
ProjectServiceAccountCreateRequest) :
ProjectServiceAccountCreateResponse Create project service account
Creates a new service account in the project. This also returns an unredacted API key for the service account.
Sourcecreate_project_user(project_id :
String, request_body :
ProjectUserCreateRequest) :
ProjectUser Create project user
Adds a user to the project. Users must already be members of the organization to be added to a project.
Sourcecreate_realtime_call(request_body :
RealtimeCallCreateRequest) :
JSON::Any Create call
Create a new Realtime API call over WebRTC and receive the SDP answer needed
to complete the peer connection.
Sourcecreate_realtime_client_secret(request_body : RealtimeCreateClientSecretRequest) : RealtimeCreateClientSecretResponse
Create client secret
Create a Realtime client secret with an associated session configuration.
Sourcecreate_realtime_session(request_body : RealtimeSessionCreateRequest) : RealtimeSessionCreateResponse
Create session
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.
Sourcecreate_realtime_transcription_session(request_body : RealtimeTranscriptionSessionCreateRequest) : RealtimeTranscriptionSessionCreateResponse
Create transcription session
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.
Sourcecreate_response(request_body : CreateResponse) : Response
Sourcecreate_response_stream(request_body : CreateResponse, &block : Response -> )
Streaming version of create_response
Sourcecreate_role(request_body : PublicCreateOrganizationRoleBody) : Role
Create organization role
Creates a custom role for the organization.
Sourcecreate_run(thread_id :
String, request_body :
CreateRunRequest, include_value :
Array(
String) |
Nil = nil) :
RunObject Sourcecreate_speech(request_body :
CreateSpeechRequest) :
String Create speech
Generates audio from the input text.
Sourcecreate_speech_stream(request_body :
CreateSpeechRequest, &block :
String -> )
Streaming version of create_speech
Sourcecreate_thread(request_body : CreateThreadRequest | Nil = nil) : ThreadObject
Create thread
Create a thread.
Sourcecreate_thread_and_run(request_body : CreateThreadAndRunRequest) : RunObject
Create thread and run
Create a thread and run it in one request.
Sourcecreate_transcription(request_body : CreateTranscriptionRequest) : CreateTranscriptionResponse
Create transcription
Transcribes audio into the input language.
Sourcecreate_transcription_stream(request_body : CreateTranscriptionRequest, &block : CreateTranscriptionResponse -> )
Streaming version of create_transcription
Sourcecreate_translation(request_body : CreateTranslationRequest) : CreateTranslationResponse
Create translation
Translates audio into English.
Sourcecreate_upload(request_body : CreateUploadRequest) : Upload
Create upload
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 purpose values, 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.
Sourcecreate_vector_store(request_body : CreateVectorStoreRequest) : VectorStoreObject
Create vector store
Create a vector store.
Sourcecreate_vector_store_file(vector_store_id :
String, request_body :
CreateVectorStoreFileRequest) :
VectorStoreFileObject Create vector store file
Create a vector store file by attaching a File to a vector store.
Sourcecreate_vector_store_file_batch(vector_store_id :
String, request_body :
CreateVectorStoreFileBatchRequest) :
VectorStoreFileBatchObject Create vector store file batch
Create a vector store file batch.
Sourcecreate_video(request_body : CreateVideoBody | Nil = nil) : VideoResource
Create video
Create a video
Sourcecreate_video_remix(video_id :
String, request_body :
CreateVideoRemixBody |
Nil = nil) :
VideoResource Remix video
Create a video remix
Sourcedeactivate_organization_certificates(request_body : ToggleCertificatesRequest) : ListCertificatesResponse
Deactivate certificates for organization
Deactivate certificates at the organization level.
You can atomically and idempotently deactivate up to 10 certificates at a time.
Sourcedeactivate_project_certificates(project_id :
String, request_body :
ToggleCertificatesRequest) :
ListCertificatesResponse Deactivate certificates for project
Deactivate certificates at the project level. You can atomically and
idempotently deactivate up to 10 certificates at a time.
Sourcedelete_assistant(assistant_id :
String) :
DeleteAssistantResponse Delete assistant
Delete an assistant.
Sourcedelete_certificate
Delete certificate
Delete a certificate from the organization.
The certificate must be inactive for the organization and all projects.
Sourcedelete_chat_completion(completion_id :
String) :
ChatCompletionDeleted Delete chat completion
Delete a stored chat completion. Only Chat Completions that have been
created with the store parameter set to true can be deleted.
Sourcedelete_container(container_id :
String) :
Nil Delete a container
Delete Container
Sourcedelete_container_file(container_id :
String, file_id :
String) :
Nil Delete a container file
Delete Container File
Sourcedelete_conversation(conversation_id :
String) :
DeletedConversationResource Delete a conversation
Delete a conversation. Items in the conversation will not be deleted.
Sourcedelete_conversation_item(conversation_id :
String, item_id :
String) :
ConversationResource Delete an item
Delete an item from a conversation with the given IDs.
Sourcedelete_eval(eval_id :
String) :
DeleteEvalResponse Delete an eval
Delete an evaluation.
Sourcedelete_eval_run(eval_id :
String, run_id :
String) :
DeleteEvalRunResponse Delete eval run
Delete an eval run.
Sourcedelete_file(file_id :
String) :
DeleteFileResponse Delete file
Delete a file and remove it from all vector stores.
Sourcedelete_fine_tuning_checkpoint_permission(fine_tuned_model_checkpoint :
String, permission_id :
String) :
DeleteFineTuningCheckpointPermissionResponse Delete checkpoint permission
NOTE: This endpoint requires an admin API key.
Organization owners can use this endpoint to delete a permission for a fine-tuned model checkpoint.
Sourcedelete_group(group_id :
String) :
GroupDeletedResource Delete group
Deletes a group from the organization.
Sourcedelete_invite(invite_id :
String) :
InviteDeleteResponse Delete invite
Delete an invite. If the invite has already been accepted, it cannot be deleted.
Sourcedelete_message(thread_id :
String, message_id :
String) :
DeleteMessageResponse Delete message
Deletes a message.
Sourcedelete_model(model :
String) :
DeleteModelResponse Delete a fine-tuned model
Delete a fine-tuned model. You must have the Owner role in your organization to delete a model.
Sourcedelete_project_api_key(project_id :
String, key_id :
String) :
ProjectApiKeyDeleteResponse Delete project API key
Deletes an API key from the project.
Sourcedelete_project_role(project_id :
String, role_id :
String) :
RoleDeletedResource Delete project role
Deletes a custom role from a project.
Sourcedelete_project_service_account(project_id :
String, service_account_id :
String) :
ProjectServiceAccountDeleteResponse Delete project service account
Deletes a service account from the project.
Sourcedelete_project_user(project_id :
String, user_id :
String) :
ProjectUserDeleteResponse Delete project user
Deletes a user from the project.
Sourcedelete_response(response_id :
String) :
Nil Delete a model response
Deletes a model response with the given ID.
Sourcedelete_role(role_id :
String) :
RoleDeletedResource Delete organization role
Deletes a custom role from the organization.
Sourcedelete_thread(thread_id :
String) :
DeleteThreadResponse Delete thread
Delete a thread.
Sourcedelete_thread_method(thread_id :
String) :
DeletedThreadResource Delete ChatKit thread
Delete a ChatKit thread
Sourcedelete_user(user_id :
String) :
UserDeleteResponse Delete user
Deletes a user from the organization.
Sourcedelete_vector_store(vector_store_id :
String) :
DeleteVectorStoreResponse Delete vector store
Delete a vector store.
Sourcedelete_vector_store_file(vector_store_id :
String, file_id :
String) :
DeleteVectorStoreFileResponse Delete vector store file
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.
Sourcedelete_video(video_id :
String) :
DeletedVideoResource Delete video
Delete a video
SourceRetrieve file content
Returns the contents of the specified file.
Sourceget_assistant(assistant_id :
String) :
AssistantObject Retrieve assistant
Retrieves an assistant.
Sourceget_certificate(certificate_id :
String, include_value :
Array(
String) |
Nil = nil) :
Certificate Get certificate
Get a certificate that has been uploaded to the organization.
You can get a certificate regardless of whether it is active or not.
Sourceget_chat_completion(completion_id :
String) :
CreateChatCompletionResponse Get chat completion
Get a stored chat completion. Only Chat Completions that have been created
with the store parameter set to true will be returned.
Sourceget_chat_completion_messages(completion_id :
String, after :
String |
Nil = nil, limit :
Int64 |
Nil = nil, order :
String |
Nil = nil) :
ChatCompletionMessageList Get chat 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.
Sourceget_conversation(conversation_id :
String) :
ConversationResource Retrieve a conversation
Get a conversation
Sourceget_conversation_item(conversation_id :
String, item_id :
String, include_value :
Array(
IncludeEnum) |
Nil = nil) :
ConversationItem Retrieve an item
Get a single item from a conversation with the given IDs.
Sourceget_eval(eval_id :
String) :
Eval Get an eval
Get an evaluation by ID.
SourceGet an eval run
Get an evaluation run by ID.
Sourceget_eval_run_output_item(eval_id :
String, run_id :
String, output_item_id :
String) :
EvalRunOutputItem Get an output item of an eval run
Get an evaluation run output item by ID.
Sourceget_eval_run_output_items(eval_id :
String, run_id :
String, after :
String |
Nil = nil, limit :
Int64 |
Nil = nil, status :
String |
Nil = nil, order :
String |
Nil = nil) :
EvalRunOutputItemList Get eval run output items
Get a list of output items for an evaluation run.
Sourceget_eval_runs(eval_id :
String, after :
String |
Nil = nil, limit :
Int64 |
Nil = nil, order :
String |
Nil = nil, status :
String |
Nil = nil) :
EvalRunList Get eval runs
Get a list of runs for an evaluation.
Sourceget_message(thread_id :
String, message_id :
String) :
MessageObject Retrieve message
Retrieve a message.
Sourceget_response(response_id :
String, include_value :
Array(
IncludeEnum) |
Nil = nil, stream :
Bool |
Nil = nil, starting_after :
Int64 |
Nil = nil, include_obfuscation :
Bool |
Nil = nil) :
Response Get a model response
Retrieves a model response with the given ID.
SourceRetrieve run
Retrieves a run.
SourceRetrieve run step
Retrieves a run step.
Sourceget_thread(thread_id :
String) :
ThreadObject Retrieve thread
Retrieves a thread.
Sourceget_thread_method(thread_id :
String) :
ThreadResource Retrieve ChatKit thread
Retrieve a ChatKit thread
Sourceget_vector_store(vector_store_id :
String) :
VectorStoreObject Retrieve vector store
Retrieves a vector store.
Sourceget_vector_store_file(vector_store_id :
String, file_id :
String) :
VectorStoreFileObject Retrieve vector store file
Retrieves a vector store file.
Sourceget_vector_store_file_batch(vector_store_id :
String, batch_id :
String) :
VectorStoreFileBatchObject Retrieve vector store file batch
Retrieves a vector store file batch.
Sourceget_video(video_id :
String) :
VideoResource Retrieve video
Retrieve a video
Sourcegetinputtokencounts(request_body : TokenCountsBody | Nil = nil) : TokenCountsResource
Sourcehangup_realtime_call(call_id :
String) :
Nil Hang up call
End an active Realtime API call, whether it was initiated over SIP or
WebRTC.
Sourceinvite_user(request_body : InviteRequest) : Invite
Create invite
Create an invite for a user to the organization. The invite must be accepted by the user before they have access to the organization.
Sourcelist_assistants(limit :
Int64 |
Nil = nil, order :
String |
Nil = nil, after :
String |
Nil = nil, before :
String |
Nil = nil) :
ListAssistantsResponse List assistants
Returns a list of assistants.
Sourcelist_audit_logs(effective_at :
ListAuditLogsEffectiveAt |
Nil = nil, project_ids :
Array(
String) |
Nil = nil, event_types :
Array(
AuditLogEventType) |
Nil = nil, actor_ids :
Array(
String) |
Nil = nil, actor_emails :
Array(
String) |
Nil = nil, resource_ids :
Array(
String) |
Nil = nil, limit :
Int64 |
Nil = nil, after :
String |
Nil = nil, before :
String |
Nil = nil) :
ListAuditLogsResponse List audit logs
List user actions and configuration changes within this organization.
Sourcelist_batches(after :
String |
Nil = nil, limit :
Int64 |
Nil = nil) :
ListBatchesResponse List batch
List your organization's batches.
Sourcelist_container_files(container_id :
String, limit :
Int64 |
Nil = nil, order :
String |
Nil = nil, after :
String |
Nil = nil) :
ContainerFileListResource List container files
List Container files
Sourcelist_containers(limit :
Int64 |
Nil = nil, order :
String |
Nil = nil, after :
String |
Nil = nil) :
ContainerListResource List containers
List Containers
Sourcelist_conversation_items(conversation_id :
String, limit :
Int64 |
Nil = nil, order :
String |
Nil = nil, after :
String |
Nil = nil, include_value :
Array(
IncludeEnum) |
Nil = nil) :
ConversationItemList List items
List all items for a conversation with the given ID.
Sourcelist_evals(after :
String |
Nil = nil, limit :
Int64 |
Nil = nil, order :
String |
Nil = nil, order_by :
String |
Nil = nil) :
EvalList List evals
List evaluations for a project.
Sourcelist_files(purpose :
String |
Nil = nil, limit :
Int64 |
Nil = nil, order :
String |
Nil = nil, after :
String |
Nil = nil) :
ListFilesResponse List files
Returns a list of files.
Sourcelist_files_in_vector_store_batch(vector_store_id :
String, batch_id :
String, limit :
Int64 |
Nil = nil, order :
String |
Nil = nil, after :
String |
Nil = nil, before :
String |
Nil = nil, filter :
String |
Nil = nil) :
ListVectorStoreFilesResponse List vector store files in a batch
Returns a list of vector store files in a batch.
Sourcelist_fine_tuning_checkpoint_permissions(fine_tuned_model_checkpoint :
String, project_id :
String |
Nil = nil, after :
String |
Nil = nil, limit :
Int64 |
Nil = nil, order :
String |
Nil = nil) :
ListFineTuningCheckpointPermissionResponse List checkpoint permissions
NOTE: This endpoint requires an admin API key.
Organization owners can use this endpoint to view all permissions for a fine-tuned model checkpoint.
Sourcelist_fine_tuning_events(fine_tuning_job_id :
String, after :
String |
Nil = nil, limit :
Int64 |
Nil = nil) :
ListFineTuningJobEventsResponse List fine-tuning events
Get status updates for a fine-tuning job.
Sourcelist_fine_tuning_job_checkpoints(fine_tuning_job_id :
String, after :
String |
Nil = nil, limit :
Int64 |
Nil = nil) :
ListFineTuningJobCheckpointsResponse List fine-tuning checkpoints
List checkpoints for a fine-tuning job.
Sourcelist_group_role_assignments(group_id :
String, limit :
Int64 |
Nil = nil, after :
String |
Nil = nil, order :
String |
Nil = nil) :
RoleListResource List group organization role assignments
Lists the organization roles assigned to a group within the organization.
Sourcelist_group_users(group_id :
String, limit :
Int64 |
Nil = nil, after :
String |
Nil = nil, order :
String |
Nil = nil) :
UserListResource List group users
Lists the users assigned to a group.
Sourcelist_groups(limit :
Int64 |
Nil = nil, after :
String |
Nil = nil, order :
String |
Nil = nil) :
GroupListResource List groups
Lists all groups in the organization.
Sourcelist_invites(limit :
Int64 |
Nil = nil, after :
String |
Nil = nil) :
InviteListResponse List invites
Returns a list of invites in the organization.
Sourcelist_messages(thread_id :
String, limit :
Int64 |
Nil = nil, order :
String |
Nil = nil, after :
String |
Nil = nil, before :
String |
Nil = nil, run_id :
String |
Nil = nil) :
ListMessagesResponse List messages
Returns a list of messages for a given thread.
Sourcelist_models
List models
Lists the currently available models, and provides basic information about each one such as the owner and availability.
Sourcelist_organization_certificates(limit :
Int64 |
Nil = nil, after :
String |
Nil = nil, order :
String |
Nil = nil) :
ListCertificatesResponse List organization certificates
List uploaded certificates for this organization.
Sourcelist_project_api_keys(project_id :
String, limit :
Int64 |
Nil = nil, after :
String |
Nil = nil) :
ProjectApiKeyListResponse List project API keys
Returns a list of API keys in the project.
Sourcelist_project_certificates(project_id :
String, limit :
Int64 |
Nil = nil, after :
String |
Nil = nil, order :
String |
Nil = nil) :
ListCertificatesResponse List project certificates
List certificates for this project.
Sourcelist_project_group_role_assignments(project_id :
String, group_id :
String, limit :
Int64 |
Nil = nil, after :
String |
Nil = nil, order :
String |
Nil = nil) :
RoleListResource List project group role assignments
Lists the project roles assigned to a group within a project.
Sourcelist_project_groups(project_id :
String, limit :
Int64 |
Nil = nil, after :
String |
Nil = nil, order :
String |
Nil = nil) :
ProjectGroupListResource List project groups
Lists the groups that have access to a project.
Sourcelist_project_rate_limits(project_id :
String, limit :
Int64 |
Nil = nil, after :
String |
Nil = nil, before :
String |
Nil = nil) :
ProjectRateLimitListResponse List project rate limits
Returns the rate limits per model for a project.
Sourcelist_project_roles(project_id :
String, limit :
Int64 |
Nil = nil, after :
String |
Nil = nil, order :
String |
Nil = nil) :
PublicRoleListResource List project roles
Lists the roles configured for a project.
Sourcelist_project_service_accounts(project_id :
String, limit :
Int64 |
Nil = nil, after :
String |
Nil = nil) :
ProjectServiceAccountListResponse List project service accounts
Returns a list of service accounts in the project.
Sourcelist_project_user_role_assignments(project_id :
String, user_id :
String, limit :
Int64 |
Nil = nil, after :
String |
Nil = nil, order :
String |
Nil = nil) :
RoleListResource List project user role assignments
Lists the project roles assigned to a user within a project.
Sourcelist_project_users(project_id :
String, limit :
Int64 |
Nil = nil, after :
String |
Nil = nil) :
ProjectUserListResponse List project users
Returns a list of users in the project.
Sourcelist_projects(limit :
Int64 |
Nil = nil, after :
String |
Nil = nil, include_archived :
Bool |
Nil = nil) :
ProjectListResponse List projects
Returns a list of projects.
Sourcelist_roles(limit :
Int64 |
Nil = nil, after :
String |
Nil = nil, order :
String |
Nil = nil) :
PublicRoleListResource List organization roles
Lists the roles configured for the organization.
SourceList run steps
Returns a list of run steps belonging to a run.
Sourcelist_runs(thread_id :
String, limit :
Int64 |
Nil = nil, order :
String |
Nil = nil, after :
String |
Nil = nil, before :
String |
Nil = nil) :
ListRunsResponse List runs
Returns a list of runs belonging to a thread.
Sourcelist_thread_items_method(thread_id :
String, limit :
Int64 |
Nil = nil, order :
OrderEnum |
Nil = nil, after :
String |
Nil = nil, before :
String |
Nil = nil) :
ThreadItemListResource List ChatKit thread items
Sourcelist_threads_method(limit :
Int64 |
Nil = nil, order :
OrderEnum |
Nil = nil, after :
String |
Nil = nil, before :
String |
Nil = nil, user :
String |
Nil = nil) :
ThreadListResource Sourcelist_user_role_assignments(user_id :
String, limit :
Int64 |
Nil = nil, after :
String |
Nil = nil, order :
String |
Nil = nil) :
RoleListResource List user organization role assignments
Lists the organization roles assigned to a user within the organization.
Sourcelist_users(limit :
Int64 |
Nil = nil, after :
String |
Nil = nil, emails :
Array(
String) |
Nil = nil) :
UserListResponse List users
Lists all of the users in the organization.
Sourcelist_vector_store_files(vector_store_id :
String, limit :
Int64 |
Nil = nil, order :
String |
Nil = nil, after :
String |
Nil = nil, before :
String |
Nil = nil, filter :
String |
Nil = nil) :
ListVectorStoreFilesResponse List vector store files
Returns a list of vector store files.
Sourcelist_vector_stores(limit :
Int64 |
Nil = nil, order :
String |
Nil = nil, after :
String |
Nil = nil, before :
String |
Nil = nil) :
ListVectorStoresResponse List vector stores
Returns a list of vector stores.
Sourcelist_videos(limit :
Int64 |
Nil = nil, order :
OrderEnum |
Nil = nil, after :
String |
Nil = nil) :
VideoListResource Sourcemodify_assistant(assistant_id :
String, request_body :
ModifyAssistantRequest) :
AssistantObject Modify assistant
Modifies an assistant.
Sourcemodify_certificate(request_body : ModifyCertificateRequest) : Certificate
Modify certificate
Modify a certificate. Note that only the name can be modified.
Sourcemodify_message(thread_id :
String, message_id :
String, request_body :
ModifyMessageRequest) :
MessageObject Modify message
Modifies a message.
Sourcemodify_project(project_id :
String, request_body :
ProjectUpdateRequest) :
Project Modify project
Modifies a project in the organization.
Sourcemodify_project_user(project_id :
String, user_id :
String, request_body :
ProjectUserUpdateRequest) :
ProjectUser Modify project user
Modifies a user's role in the project.
Sourcemodify_run(thread_id :
String, run_id :
String, request_body :
ModifyRunRequest) :
RunObject Modify run
Modifies a run.
Sourcemodify_thread(thread_id :
String, request_body :
ModifyThreadRequest) :
ThreadObject Modify thread
Modifies a thread.
Sourcemodify_user(user_id :
String, request_body :
UserRoleUpdateRequest) :
User Modify user
Modifies a user's role in the organization.
Sourcemodify_vector_store(vector_store_id :
String, request_body :
UpdateVectorStoreRequest) :
VectorStoreObject Modify vector store
Modifies a vector store.
Sourcepause_fine_tuning_job(fine_tuning_job_id :
String) :
FineTuningJob Pause fine-tuning
Pause a fine-tune job.
Sourcerefer_realtime_call(call_id :
String, request_body :
RealtimeCallReferRequest) :
Nil Refer call
Transfer an active SIP call to a new destination using the SIP REFER verb.
Sourcereject_realtime_call(call_id :
String, request_body :
RealtimeCallRejectRequest |
Nil = nil) :
Nil Reject call
Decline an incoming SIP call by returning a SIP status code to the caller.
Sourceremove_group_user(group_id :
String, user_id :
String) :
GroupUserDeletedResource Remove group user
Removes a user from a group.
Sourceremove_project_group(project_id :
String, group_id :
String) :
ProjectGroupDeletedResource Remove project group
Revokes a group's access to a project.
Sourceresume_fine_tuning_job(fine_tuning_job_id :
String) :
FineTuningJob Resume fine-tuning
Resume a fine-tune job.
Sourceretrieve_batch(batch_id :
String) :
Batch Retrieve batch
Retrieves a batch.
Sourceretrieve_container(container_id :
String) :
ContainerResource Retrieve container
Retrieve Container
Sourceretrieve_container_file(container_id :
String, file_id :
String) :
ContainerFileResource Retrieve container file
Retrieve Container File
Sourceretrieve_container_file_content(container_id :
String, file_id :
String) :
Nil Retrieve container file content
Retrieve Container File Content
Sourceretrieve_file(file_id :
String) :
OpenAIFile Retrieve file
Returns information about a specific file.
Sourceretrieve_fine_tuning_job(fine_tuning_job_id :
String) :
FineTuningJob Sourceretrieve_invite(invite_id :
String) :
Invite Retrieve invite
Retrieves an invite.
Sourceretrieve_model(model :
String) :
Model Retrieve model
Retrieves a model instance, providing basic information about the model such as the owner and permissioning.
Sourceretrieve_project(project_id :
String) :
Project Retrieve project
Retrieves a project.
Sourceretrieve_project_api_key(project_id :
String, key_id :
String) :
ProjectApiKey Retrieve project API key
Retrieves an API key in the project.
Sourceretrieve_project_service_account(project_id :
String, service_account_id :
String) :
ProjectServiceAccount Retrieve project service account
Retrieves a service account in the project.
Sourceretrieve_project_user(project_id :
String, user_id :
String) :
ProjectUser Retrieve project user
Retrieves a user in the project.
Sourceretrieve_user(user_id :
String) :
User Retrieve user
Retrieves a user by their identifier.
Sourceretrieve_vector_store_file_content(vector_store_id :
String, file_id :
String) :
VectorStoreFileContentResponse Retrieve vector store file content
Retrieve the parsed contents of a vector store file.
Sourceretrieve_video_content(video_id :
String, variant :
VideoContentVariant |
Nil = nil) :
String Retrieve video content
Download video content
Sourcerun_grader(request_body : RunGraderRequest) : RunGraderResponse
Sourcesearch_vector_store(vector_store_id :
String, request_body :
VectorStoreSearchRequest) :
VectorStoreSearchResultsPage Search vector store
Search a vector store for relevant chunks based on a query and file attributes filter.
Sourcesubmit_tool_ouputs_to_run(thread_id :
String, run_id :
String, request_body :
SubmitToolOutputsRunRequest) :
RunObject Submit tool outputs to run
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.
Sourceunassign_group_role(group_id :
String, role_id :
String) :
DeletedRoleAssignmentResource Unassign organization role from group
Unassigns an organization role from a group within the organization.
Sourceunassign_project_group_role(project_id :
String, group_id :
String, role_id :
String) :
DeletedRoleAssignmentResource Unassign project role from group
Unassigns a project role from a group within a project.
Sourceunassign_project_user_role(project_id :
String, user_id :
String, role_id :
String) :
DeletedRoleAssignmentResource Unassign project role from user
Unassigns a project role from a user within a project.
Sourceunassign_user_role(user_id :
String, role_id :
String) :
DeletedRoleAssignmentResource Unassign organization role from user
Unassigns an organization role from a user within the organization.
Sourceupdate_chat_completion(completion_id :
String, request_body :
UpdateChatCompletionRequestBody) :
CreateChatCompletionResponse Update chat completion
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.
Sourceupdate_conversation(conversation_id :
String, request_body :
UpdateConversationBody |
Nil = nil) :
ConversationResource Sourceupdate_eval(eval_id :
String, request_body :
UpdateEvalRequestBody) :
Eval Update an eval
Update certain properties of an evaluation.
Sourceupdate_group(group_id :
String, request_body :
UpdateGroupBody) :
GroupResourceWithSuccess Update group
Updates a group's information.
Sourceupdate_project_rate_limits(project_id :
String, rate_limit_id :
String, request_body :
ProjectRateLimitUpdateRequest) :
ProjectRateLimit Modify project rate limit
Updates a project rate limit.
Sourceupdate_project_role(project_id :
String, role_id :
String, request_body :
PublicUpdateOrganizationRoleBody) :
Role Update project role
Updates an existing project role.
Sourceupdate_role(role_id :
String, request_body :
PublicUpdateOrganizationRoleBody) :
Role Update organization role
Updates an existing organization role.
Sourceupdate_vector_store_file_attributes(vector_store_id :
String, file_id :
String, request_body :
UpdateVectorStoreFileAttributesRequest) :
VectorStoreFileObject Update vector store file attributes
Update attributes on a vector store file.
Sourceupload_certificate(request_body : UploadCertificateRequest) : Certificate
Upload certificate
Upload a certificate to the organization. This does not automatically activate the certificate.
Organizations can upload up to 50 certificates.
SourceAudio speeches
Get audio speeches usage details for the organization.
SourceAudio transcriptions
Get audio transcriptions usage details for the organization.
Sourceusage_code_interpreter_sessions(start_time :
Int64, end_time :
Int64 |
Nil = nil, bucket_width :
String |
Nil = nil, project_ids :
Array(
String) |
Nil = nil, group_by :
Array(
String) |
Nil = nil, limit :
Int64 |
Nil = nil, page :
String |
Nil = nil) :
UsageResponse Code interpreter sessions
Get code interpreter sessions usage details for the organization.
Sourceusage_completions(start_time :
Int64, end_time :
Int64 |
Nil = nil, bucket_width :
String |
Nil = nil, project_ids :
Array(
String) |
Nil = nil, user_ids :
Array(
String) |
Nil = nil, api_key_ids :
Array(
String) |
Nil = nil, models :
Array(
String) |
Nil = nil, batch :
Bool |
Nil = nil, group_by :
Array(
String) |
Nil = nil, limit :
Int64 |
Nil = nil, page :
String |
Nil = nil) :
UsageResponse Completions
Get completions usage details for the organization.
Sourceusage_costs(start_time :
Int64, end_time :
Int64 |
Nil = nil, bucket_width :
String |
Nil = nil, project_ids :
Array(
String) |
Nil = nil, group_by :
Array(
String) |
Nil = nil, limit :
Int64 |
Nil = nil, page :
String |
Nil = nil) :
UsageResponse Costs
Get costs details for the organization.
SourceEmbeddings
Get embeddings usage details for the organization.
Sourceusage_images(start_time :
Int64, end_time :
Int64 |
Nil = nil, bucket_width :
String |
Nil = nil, sources :
Array(
String) |
Nil = nil, sizes :
Array(
String) |
Nil = nil, project_ids :
Array(
String) |
Nil = nil, user_ids :
Array(
String) |
Nil = nil, api_key_ids :
Array(
String) |
Nil = nil, models :
Array(
String) |
Nil = nil, group_by :
Array(
String) |
Nil = nil, limit :
Int64 |
Nil = nil, page :
String |
Nil = nil) :
UsageResponse Images
Get images usage details for the organization.
SourceModerations
Get moderations usage details for the organization.
Sourceusage_vector_stores(start_time :
Int64, end_time :
Int64 |
Nil = nil, bucket_width :
String |
Nil = nil, project_ids :
Array(
String) |
Nil = nil, group_by :
Array(
String) |
Nil = nil, limit :
Int64 |
Nil = nil, page :
String |
Nil = nil) :
UsageResponse Vector stores
Get vector stores usage details for the organization.
Sourcevalidate_grader(request_body : ValidateGraderRequest) : ValidateGraderResponse
Validate grader
Validate a grader.
Source