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
embeddings
evals
files
finetuning
graders
images
models
moderations
realtimerealtime
responses
uploads
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.
ChatChoice
ChatChoiceLogprobs
ChatChoiceStream
ChatCompletionAudio
ChatCompletionFunctionsDeprecated
ChatCompletionFunctionsArgs
Builder for ChatCompletionFunctions.
ChatCompletionMessageToolCall
ChatCompletionMessageToolCallChunk
ChatCompletionNamedToolChoice
Specifies a tool the model should use. Use to force the model to call a specific function.
ChatCompletionRequestAssistantMessage
ChatCompletionRequestAssistantMessageArgs
Builder for ChatCompletionRequestAssistantMessage.
ChatCompletionRequestAssistantMessageAudio
ChatCompletionRequestDeveloperMessage
ChatCompletionRequestDeveloperMessageArgs
Builder for ChatCompletionRequestDeveloperMessage.
ChatCompletionRequestFunctionMessage
ChatCompletionRequestFunctionMessageArgs
Builder for ChatCompletionRequestFunctionMessage.
ChatCompletionRequestMessageContentPartAudio
Learn about audio inputs.
ChatCompletionRequestMessageContentPartAudioArgs
Builder for ChatCompletionRequestMessageContentPartAudio.
ChatCompletionRequestMessageContentPartImage
ChatCompletionRequestMessageContentPartImageArgs
Builder for ChatCompletionRequestMessageContentPartImage.
ChatCompletionRequestMessageContentPartRefusal
ChatCompletionRequestMessageContentPartRefusalBuilder
Builder for ChatCompletionRequestMessageContentPartRefusal.
ChatCompletionRequestMessageContentPartText
ChatCompletionRequestMessageContentPartTextArgs
Builder for ChatCompletionRequestMessageContentPartText.
ChatCompletionRequestSystemMessage
ChatCompletionRequestSystemMessageArgs
Builder for ChatCompletionRequestSystemMessage.
ChatCompletionRequestToolMessage
Tool message
ChatCompletionRequestToolMessageArgs
Builder for ChatCompletionRequestToolMessage.
ChatCompletionRequestUserMessage
ChatCompletionRequestUserMessageArgs
Builder for ChatCompletionRequestUserMessage.
ChatCompletionResponseMessage
A chat completion message generated by the model.
ChatCompletionResponseMessageAudio
ChatCompletionStreamOptions
Options for streaming response. Only set this when you set stream: true.
ChatCompletionStreamResponseDelta
A chat completion delta generated by streamed model responses.
ChatCompletionTokenLogprob
ChatCompletionTool
ChatCompletionToolArgs
Builder for ChatCompletionTool.
Choice
CodeInterpreter
ComparisonFilter
A filter used to compare a specified attribute key to a given value using a defined comparison operation.
CompletionTokensDetails
Breakdown of tokens used in a completion.
CompletionUsage
Usage statistics for the completion request.
CompoundFilter
Combine multiple filters using and or or.
ContainerExpiresAfter
Expiration policy for containers.
ContainerFileListResource
Response when listing container files.
ContainerFileResource
The container file object represents a file in a container.
ContainerListResource
Response when listing containers.
ContainerResource
CreateAssistantRequest
CreateAssistantRequestArgs
Builder for CreateAssistantRequest.
CreateAssistantToolFileSearchResources
CreateAssistantToolResources
CreateChatCompletionRequest
CreateChatCompletionRequestArgs
Builder for CreateChatCompletionRequest.
CreateChatCompletionResponse
Represents a chat completion response returned by model, based on the provided input.
CreateChatCompletionStreamResponse
Represents a streamed chunk of a chat completion response returned by model, based on the provided input.
CreateCompletionRequest
CreateCompletionRequestArgs
Builder for CreateCompletionRequest.
CreateCompletionResponse
CreateContainerFileRequest
Request to create a container file. openapi spec type: CreateContainerFileBody
CreateContainerRequest
Request to create a container. openapi spec type: CreateContainerBody
CreateContainerRequestArgs
Builder for CreateContainerRequest.
CreateMessageRequest
CreateMessageRequestArgs
Builder for CreateMessageRequest.
CreateRunRequest
CreateRunRequestArgs
Builder for CreateRunRequest.
CreateThreadAndRunRequest
CreateThreadAndRunRequestArgs
Builder for CreateThreadAndRunRequest.
CreateThreadRequest
CreateThreadRequestArgs
Builder for CreateThreadRequest.
CreateVectorStoreFileBatchRequest
CreateVectorStoreFileBatchRequestArgs
Builder for CreateVectorStoreFileBatchRequest.
CreateVectorStoreFileRequest
CreateVectorStoreFileRequestArgs
Builder for CreateVectorStoreFileRequest.
CreateVectorStoreRequest
CreateVectorStoreRequestArgs
Builder for CreateVectorStoreRequest.
CreateVideoRequest
CreateVideoRequestArgs
Builder for CreateVideoRequest.
DeleteAssistantResponse
DeleteContainerFileResponse
Response when deleting a container file.
DeleteContainerResponse
Response when deleting a container.
DeleteMessageResponse
DeleteThreadResponse
DeleteVectorStoreFileResponse
DeleteVectorStoreResponse
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.
FunctionCall
The name and arguments of a function that should be called, as generated by the model.
FunctionCallStream
FunctionName
FunctionObject
FunctionObjectArgs
Builder for FunctionObject.
ImageFile
ImageUrl
ImageUrlArgs
Builder for ImageUrl.
InputAudio
Invite
Represents an individual invite to the organization.
InviteDeleteResponse
InviteListResponse
InviteRequest
InviteRequestArgs
Builder for InviteRequest.
LastError
ListAssistantsResponse
ListAuditLogsResponse
Represents a list of audit logs.
ListContainerFilesQuery
Query parameters for listing container files.
ListContainerFilesQueryArgs
Builder for ListContainerFilesQuery.
ListContainersQuery
Query parameters for listing containers.
ListContainersQueryArgs
Builder for ListContainersQuery.
ListMessagesResponse
ListRunStepsResponse
ListRunsResponse
ListVectorStoreFilesResponse
ListVectorStoresResponse
ListVideosResponse
LogProbProperties
Log probability information for a transcribed token.
Logprobs
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.
PromptTokensDetails
Breakdown of tokens used in a completion.
RankingOptions
Ranking options for search.
RemixVideoRequest
RemixVideoRequestArgs
Builder for RemixVideoRequest.
RequiredAction
ResponseFormatJsonSchema
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.
TopLogprobs
TruncationObject
Thread Truncation Controls
UpdateVectorStoreRequest
UpdateVectorStoreRequestArgs
Builder for UpdateVectorStoreRequest.
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.
VectorStoreExpirationAfter
Vector store expiration policy
VectorStoreFileBatchCounts
VectorStoreFileBatchObject
A batch of files attached to a vector store.
VectorStoreFileContentObject
Represents the parsed content of a vector store file.
VectorStoreFileContentResponse
Represents the parsed content of a vector store file.
VectorStoreFileCounts
VectorStoreFileError
VectorStoreFileObject
VectorStoreObject
A vector store is a collection of processed files can be used by the file_search tool.
VectorStoreSearchRequest
VectorStoreSearchRequestArgs
Builder for VectorStoreSearchRequest.
VectorStoreSearchResultContentObject
VectorStoreSearchResultItem
VectorStoreSearchResultsPage
VideoJob
Structured information describing a generated video job.
VideoJobError
VideoJobMetadata
WebSearchLocation
Approximate location parameters for the search.
WebSearchOptions
Options for the web search tool.
WebSearchUserLocation

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.
AttributeValue
The value to compare against the attribute key; supports string, number, or boolean types.
AuditLogActorApiKeyType
AuditLogEventType
The event type.
ChatCompletionAudioFormat
ChatCompletionAudioVoice
ChatCompletionFunctionCall
ChatCompletionModalities
Output types that you would like the model to generate for this request.
ChatCompletionRequestAssistantMessageContent
ChatCompletionRequestAssistantMessageContentPart
ChatCompletionRequestDeveloperMessageContent
ChatCompletionRequestMessage
ChatCompletionRequestMessageContentPartRefusalBuilderError
Error type for ChatCompletionRequestMessageContentPartRefusalBuilder
ChatCompletionRequestSystemMessageContent
ChatCompletionRequestSystemMessageContentPart
ChatCompletionRequestToolMessageContent
ChatCompletionRequestToolMessageContentPart
ChatCompletionRequestUserMessageContent
ChatCompletionRequestUserMessageContentPart
ChatCompletionToolChoiceOption
Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto 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. Specifying a particular tool via {"type": "function", "function": {"name": "my_function"}} forces the model to call that tool.
ChatCompletionToolType
CodeInterpreterOutput
ComparisonType
Specifies the comparison operator: eq, ne, gt, gte, lt, lte.
CompletionFinishReason
CompoundFilterType
Type of operation: and or or.
ContainerExpiresAfterAnchor
Anchor for container expiration.
CreateMessageRequestContent
DeltaCodeInterpreterOutput
DeltaStepDetails
FileSearchRanker
FinishReason
ImageDetail
InputAudioFormat
InputSource
InviteStatus
LastErrorCode
MCPToolAllowedTools
MCPToolApprovalSetting
MCPToolRequireApproval
Approval policy or filter for MCP tools.
McpToolConnectorId
MessageAttachmentTool
MessageContent
MessageContentInput
MessageContentTextAnnotations
MessageDeltaContent
MessageDeltaContentTextAnnotations
MessageIncompleteDetailsType
MessageRole
MessageStatus
OrganizationRole
PredictionContent
Static predicted output content, such as the content of a text file that is being regenerated.
PredictionContentContent
The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly.
ProjectApiKeyOwnerType
ProjectStatus
active or archived
ProjectUserRole
owner or member
Prompt
Ranker
ReasoningEffort
ResponseFormat
Role
RunObjectIncompleteDetailsReason
RunStatus
RunStepDeltaStepDetailsToolCalls
RunStepDetailsToolCalls
RunStepType
ServiceTier
ServiceTierResponse
StepDetails
Stop
TruncationObjectType
VectorStoreChunkingStrategy
VectorStoreFileBatchStatus
VectorStoreFileErrorCode
VectorStoreFileObjectChunkingStrategy
VectorStoreFileStatus
VectorStoreSearchFilter
VectorStoreSearchQuery
VectorStoreStatus
VideoSize
VideoVariant
WebSearchContextSize
The amount of context window space to use for the search.
WebSearchUserLocationType

Type Aliases§

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