Module types

Module types 

Source
Expand description

Types used in OpenAI API requests and responses. These types are created from component schemas in the OpenAPI spec

Modules§

audio
batches
chat
chatkit
containers
embeddings
evals
files
finetuning
graders
images
models
moderations
realtimerealtime
responses
uploads
vectorstores
videos
webhookswebhook

Structs§

AssistantObject
Represents an assistant that can call the model and use tools.
AssistantToolCodeInterpreterResources
AssistantToolFileSearchResources
AssistantToolResources
AssistantToolsFileSearch
Retrieval tool
AssistantToolsFileSearchOverrides
AssistantToolsFunction
Function tool
AssistantVectorStore
AssistantsNamedToolChoice
Specifies a tool the model should use. Use to force the model to call a specific tool.
AuditLog
A log of a user action or configuration change within this organization.
AuditLogActor
The actor who performed the audit logged action.
AuditLogActorApiKey
The API Key used to perform the audit logged action.
AuditLogActorServiceAccount
The service account that performed the audit logged action.
AuditLogActorSession
The session in which the audit logged action was performed.
AuditLogActorUser
The user who performed the audit logged action.
AuditLogApiKeyCreated
The details for events with the type api_key.created.
AuditLogApiKeyCreatedData
The payload used to create the API key.
AuditLogApiKeyDeleted
The details for events with the type api_key.deleted.
AuditLogApiKeyUpdated
The details for events with the type api_key.updated.
AuditLogApiKeyUpdatedChangesRequested
The payload used to update the API key.
AuditLogInviteAccepted
The details for events with the type invite.accepted.
AuditLogInviteDeleted
The details for events with the type invite.deleted.
AuditLogInviteSent
The details for events with the type invite.sent.
AuditLogInviteSentData
The payload used to create the invite.
AuditLogLoginFailed
The details for events with the type login.failed.
AuditLogLogoutFailed
The details for events with the type logout.failed.
AuditLogOrganizationUpdated
The details for events with the type organization.updated.
AuditLogOrganizationUpdatedChangesRequested
The payload used to update the organization settings.
AuditLogOrganizationUpdatedChangesRequestedSettings
The organization settings.
AuditLogProject
The project that the action was scoped to. Absent for actions not scoped to projects.
AuditLogProjectArchived
The details for events with the type project.archived.
AuditLogProjectCreated
The details for events with the type project.created.
AuditLogProjectCreatedData
The payload used to create the project.
AuditLogProjectUpdated
The details for events with the type project.updated.
AuditLogProjectUpdatedChangesRequested
The payload used to update the project.
AuditLogServiceAccountCreated
The details for events with the type service_account.created.
AuditLogServiceAccountCreatedData
The payload used to create the service account.
AuditLogServiceAccountDeleted
The details for events with the type service_account.deleted.
AuditLogServiceAccountUpdated
The details for events with the type service_account.updated.
AuditLogServiceAccountUpdatedChangesRequested
The payload used to updated the service account.
AuditLogUserAdded
The details for events with the type user.added.
AuditLogUserAddedData
The payload used to add the user to the project.
AuditLogUserDeleted
The details for events with the type user.deleted.
AuditLogUserUpdated
The details for events with the type user.updated.
AuditLogUserUpdatedChangesRequested
The payload used to update the user.
CodeInterpreter
CreateAssistantRequest
CreateAssistantRequestArgs
Builder for CreateAssistantRequest.
CreateAssistantToolFileSearchResources
CreateAssistantToolResources
CreateCompletionRequest
CreateCompletionRequestArgs
Builder for CreateCompletionRequest.
CreateCompletionResponse
CreateMessageRequest
CreateMessageRequestArgs
Builder for CreateMessageRequest.
CreateRunRequest
CreateRunRequestArgs
Builder for CreateRunRequest.
CreateThreadAndRunRequest
CreateThreadAndRunRequestArgs
Builder for CreateThreadAndRunRequest.
CreateThreadRequest
CreateThreadRequestArgs
Builder for CreateThreadRequest.
DeleteAssistantResponse
DeleteMessageResponse
DeleteThreadResponse
DeltaCodeInterpreter
FileCitation
FilePath
FileSearchRankingOptions
The ranking options for the file search. If not specified, the file search tool will use the auto ranker and a score_threshold of 0.
ImageFile
Invite
Represents an individual invite to the organization.
InviteDeleteResponse
InviteListResponse
InviteRequest
InviteRequestArgs
Builder for InviteRequest.
LastError
ListAssistantsResponse
ListAuditLogsResponse
Represents a list of audit logs.
ListMessagesResponse
ListRunStepsResponse
ListRunsResponse
LogProbProperties
Log probability information for a transcribed token.
MCPListToolsTool
MCPTool
MCPToolApprovalFilter
MCPToolArgs
Builder for MCPTool.
MCPToolFilter
MessageAttachment
MessageContentImageFileObject
References an image File in the content of a message.
MessageContentImageUrlObject
References an image URL in the content of a message.
MessageContentRefusalObject
MessageContentTextAnnotationsFileCitationObject
A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the “file_search” tool to search files.
MessageContentTextAnnotationsFilePathObject
MessageContentTextObject
The text content that is part of a message.
MessageCreation
MessageDelta
MessageDeltaContentImageFileObject
References an image File in the content of a message.
MessageDeltaContentImageUrlObject
MessageDeltaContentRefusalObject
MessageDeltaContentText
MessageDeltaContentTextAnnotationsFileCitationObject
A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the “file_search” tool to search files.
MessageDeltaContentTextAnnotationsFilePathObject
A URL for the file that’s generated when the assistant used the code_interpreter tool to generate a file.
MessageDeltaContentTextObject
The text content that is part of a message.
MessageDeltaObject
Represents a message delta i.e. any changed fields on a message during streaming.
MessageIncompleteDetails
MessageObject
Represents a message within a thread.
MessageRequestContentTextObject
Metadata
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
ModifyAssistantRequest
ModifyAssistantRequestArgs
Builder for ModifyAssistantRequest.
ModifyMessageRequest
ModifyRunRequest
ModifyThreadRequest
Project
Represents an individual project.
ProjectApiKey
Represents an individual API key in a project.
ProjectApiKeyDeleteResponse
Represents the response object for deleting a project API key.
ProjectApiKeyListResponse
Represents the response object for listing project API keys.
ProjectApiKeyOwner
Represents the owner of a project API key.
ProjectCreateRequest
The project create request payload.
ProjectCreateRequestArgs
Builder for ProjectCreateRequest.
ProjectListResponse
A list of Project objects.
ProjectServiceAccount
Represents an individual service account in a project.
ProjectServiceAccountApiKey
Represents the API key associated with a project service account.
ProjectServiceAccountCreateRequest
Represents the request object for creating a project service account.
ProjectServiceAccountCreateResponse
Represents the response object for creating a project service account.
ProjectServiceAccountDeleteResponse
Represents the response object for deleting a project service account.
ProjectServiceAccountListResponse
Represents the response object for listing project service accounts.
ProjectUpdateRequest
The project update request payload.
ProjectUpdateRequestArgs
Builder for ProjectUpdateRequest.
ProjectUser
Represents an individual user in a project.
ProjectUserCreateRequest
The project user create request payload.
ProjectUserCreateRequestArgs
Builder for ProjectUserCreateRequest.
ProjectUserDeleteResponse
ProjectUserListResponse
ProjectUserUpdateRequest
ProjectUserUpdateRequestArgs
Builder for ProjectUserUpdateRequest.
RequiredAction
RunCompletionUsage
RunObject
Represents an execution run on a thread.
RunObjectIncompleteDetails
RunStepCompletionUsage
RunStepDelta
RunStepDeltaObject
Represents a run step delta i.e. any changed fields on a run step during streaming.
RunStepDeltaStepDetailsMessageCreationObject
Details of the message creation by the run step.
RunStepDeltaStepDetailsToolCallsCodeObject
Details of the Code Interpreter tool call the run step was involved in.
RunStepDeltaStepDetailsToolCallsCodeOutputImageObject
Code interpreter image output
RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject
Text output from the Code Interpreter tool call as part of a run step.
RunStepDeltaStepDetailsToolCallsFileSearchObject
RunStepDeltaStepDetailsToolCallsFunctionObject
Function tool call
RunStepDeltaStepDetailsToolCallsObject
Details of the tool call.
RunStepDetailsMessageCreationObject
Details of the message creation by the run step.
RunStepDetailsToolCallsCodeObject
Code interpreter tool call
RunStepDetailsToolCallsCodeOutputImageObject
RunStepDetailsToolCallsCodeOutputLogsObject
Text output from the Code Interpreter tool call as part of a run step.
RunStepDetailsToolCallsFileSearchObject
File search tool call
RunStepDetailsToolCallsFileSearchObjectFileSearch
RunStepDetailsToolCallsFileSearchResultObject
A result instance of the file search.
RunStepDetailsToolCallsFileSearchResultObjectContent
RunStepDetailsToolCallsFunctionObject
RunStepDetailsToolCallsObject
Details of the tool call.
RunStepFunctionObject
RunStepFunctionObjectDelta
RunStepObject
Represents a step in execution of a run.
RunToolCallObject
StaticChunkingStrategy
Static Chunking Strategy
SubmitToolOutputs
SubmitToolOutputsRunRequest
TextData
ThreadObject
Represents a thread that contains messages.
ToolsOutputs
ToolsOutputsArgs
Builder for ToolsOutputs.
TruncationObject
Thread Truncation Controls
User
Represents an individual user within an organization.
UserDeleteResponse
Confirmation of the deleted user
UserListResponse
A list of User objects.
UserRoleUpdateRequest
UserRoleUpdateRequestArgs
Builder for UserRoleUpdateRequest.

Enums§

AssistantStreamEvent
Represents an event emitted when streaming a Run.
AssistantToolType
AssistantTools
AssistantVectorStoreChunkingStrategy
AssistantsApiResponseFormatOption
Specifies the format that the model must output. Compatible with GPT-4o, GPT-4 Turbo, and all GPT-3.5 Turbo models since gpt-3.5-turbo-1106.
AssistantsApiToolChoiceOption
Controls which (if any) tool is called by the model. none means the model will not call any tools and instead generates a message. auto is the default value and means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools before responding to the user. Specifying a particular tool like {"type": "file_search"} or {"type": "function", "function": {"name": "my_function"}} forces the model to call that tool.
AuditLogActorApiKeyType
AuditLogEventType
The event type.
CodeInterpreterOutput
CreateMessageRequestContent
DeltaCodeInterpreterOutput
DeltaStepDetails
FileSearchRanker
InputSource
InviteStatus
LastErrorCode
MCPToolAllowedTools
MCPToolApprovalSetting
MCPToolRequireApproval
Approval policy or filter for MCP tools.
McpToolConnectorId
MessageAttachmentTool
MessageContent
MessageContentInput
MessageContentTextAnnotations
MessageDeltaContent
MessageDeltaContentTextAnnotations
MessageIncompleteDetailsType
MessageRole
MessageStatus
OrganizationRole
ProjectApiKeyOwnerType
ProjectStatus
active or archived
ProjectUserRole
owner or member
RunObjectIncompleteDetailsReason
RunStatus
RunStepDeltaStepDetailsToolCalls
RunStepDetailsToolCalls
RunStepType
StepDetails
TruncationObjectType

Type Aliases§

AssistantEventStream
CompletionResponseStream
Parsed server side events stream until an [DONE] is received from server.