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
- realtime
realtime - responses
- uploads
- vectorstores
- videos
- webhooks
webhook
Structs§
- Assistant
Object - Represents an
assistantthat can call the model and use tools. - Assistant
Tool Code Interpreter Resources - Assistant
Tool File Search Resources - Assistant
Tool Resources - Assistant
Tools File Search - Retrieval tool
- Assistant
Tools File Search Overrides - Assistant
Tools Function - Function tool
- Assistant
Vector Store - Assistants
Named Tool Choice - Specifies a tool the model should use. Use to force the model to call a specific tool.
- Audit
Log - A log of a user action or configuration change within this organization.
- Audit
LogActor - The actor who performed the audit logged action.
- Audit
LogActor ApiKey - The API Key used to perform the audit logged action.
- Audit
LogActor Service Account - The service account that performed the audit logged action.
- Audit
LogActor Session - The session in which the audit logged action was performed.
- Audit
LogActor User - The user who performed the audit logged action.
- Audit
LogApi KeyCreated - The details for events with the type
api_key.created. - Audit
LogApi KeyCreated Data - The payload used to create the API key.
- Audit
LogApi KeyDeleted - The details for events with the type
api_key.deleted. - Audit
LogApi KeyUpdated - The details for events with the type
api_key.updated. - Audit
LogApi KeyUpdated Changes Requested - The payload used to update the API key.
- Audit
LogInvite Accepted - The details for events with the type
invite.accepted. - Audit
LogInvite Deleted - The details for events with the type
invite.deleted. - Audit
LogInvite Sent - The details for events with the type
invite.sent. - Audit
LogInvite Sent Data - The payload used to create the invite.
- Audit
LogLogin Failed - The details for events with the type
login.failed. - Audit
LogLogout Failed - The details for events with the type
logout.failed. - Audit
LogOrganization Updated - The details for events with the type
organization.updated. - Audit
LogOrganization Updated Changes Requested - The payload used to update the organization settings.
- Audit
LogOrganization Updated Changes Requested Settings - The organization settings.
- Audit
LogProject - The project that the action was scoped to. Absent for actions not scoped to projects.
- Audit
LogProject Archived - The details for events with the type
project.archived. - Audit
LogProject Created - The details for events with the type
project.created. - Audit
LogProject Created Data - The payload used to create the project.
- Audit
LogProject Updated - The details for events with the type
project.updated. - Audit
LogProject Updated Changes Requested - The payload used to update the project.
- Audit
LogService Account Created - The details for events with the type
service_account.created. - Audit
LogService Account Created Data - The payload used to create the service account.
- Audit
LogService Account Deleted - The details for events with the type
service_account.deleted. - Audit
LogService Account Updated - The details for events with the type
service_account.updated. - Audit
LogService Account Updated Changes Requested - The payload used to updated the service account.
- Audit
LogUser Added - The details for events with the type
user.added. - Audit
LogUser Added Data - The payload used to add the user to the project.
- Audit
LogUser Deleted - The details for events with the type
user.deleted. - Audit
LogUser Updated - The details for events with the type
user.updated. - Audit
LogUser Updated Changes Requested - The payload used to update the user.
- Code
Interpreter - Create
Assistant Request - Create
Assistant Request Args - Builder for
CreateAssistantRequest. - Create
Assistant Tool File Search Resources - Create
Assistant Tool Resources - Create
Completion Request - Create
Completion Request Args - Builder for
CreateCompletionRequest. - Create
Completion Response - Create
Message Request - Create
Message Request Args - Builder for
CreateMessageRequest. - Create
RunRequest - Create
RunRequest Args - Builder for
CreateRunRequest. - Create
Thread AndRun Request - Create
Thread AndRun Request Args - Builder for
CreateThreadAndRunRequest. - Create
Thread Request - Create
Thread Request Args - Builder for
CreateThreadRequest. - Delete
Assistant Response - Delete
Message Response - Delete
Thread Response - Delta
Code Interpreter - File
Citation - File
Path - File
Search Ranking Options - The ranking options for the file search. If not specified, the file search tool will use the
autoranker and a score_threshold of 0. - Image
File - Invite
- Represents an individual
inviteto the organization. - Invite
Delete Response - Invite
List Response - Invite
Request - Invite
Request Args - Builder for
InviteRequest. - Last
Error - List
Assistants Response - List
Audit Logs Response - Represents a list of audit logs.
- List
Messages Response - List
RunSteps Response - List
Runs Response - LogProb
Properties - Log probability information for a transcribed token.
- MCPList
Tools Tool - MCPTool
- MCPTool
Approval Filter - MCPTool
Args - Builder for
MCPTool. - MCPTool
Filter - Message
Attachment - Message
Content Image File Object - References an image File in the content of a message.
- Message
Content Image UrlObject - References an image URL in the content of a message.
- Message
Content Refusal Object - Message
Content Text Annotations File Citation Object - 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.
- Message
Content Text Annotations File Path Object - Message
Content Text Object - The text content that is part of a message.
- Message
Creation - Message
Delta - Message
Delta Content Image File Object - References an image File in the content of a message.
- Message
Delta Content Image UrlObject - Message
Delta Content Refusal Object - Message
Delta Content Text - Message
Delta Content Text Annotations File Citation Object - 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.
- Message
Delta Content Text Annotations File Path Object - A URL for the file that’s generated when the assistant used the
code_interpretertool to generate a file. - Message
Delta Content Text Object - The text content that is part of a message.
- Message
Delta Object - Represents a message delta i.e. any changed fields on a message during streaming.
- Message
Incomplete Details - Message
Object - Represents a message within a thread.
- Message
Request Content Text Object - 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.
- Modify
Assistant Request - Modify
Assistant Request Args - Builder for
ModifyAssistantRequest. - Modify
Message Request - Modify
RunRequest - Modify
Thread Request - Project
- Represents an individual project.
- Project
ApiKey - Represents an individual API key in a project.
- Project
ApiKey Delete Response - Represents the response object for deleting a project API key.
- Project
ApiKey List Response - Represents the response object for listing project API keys.
- Project
ApiKey Owner - Represents the owner of a project API key.
- Project
Create Request - The project create request payload.
- Project
Create Request Args - Builder for
ProjectCreateRequest. - Project
List Response - A list of Project objects.
- Project
Service Account - Represents an individual service account in a project.
- Project
Service Account ApiKey - Represents the API key associated with a project service account.
- Project
Service Account Create Request - Represents the request object for creating a project service account.
- Project
Service Account Create Response - Represents the response object for creating a project service account.
- Project
Service Account Delete Response - Represents the response object for deleting a project service account.
- Project
Service Account List Response - Represents the response object for listing project service accounts.
- Project
Update Request - The project update request payload.
- Project
Update Request Args - Builder for
ProjectUpdateRequest. - Project
User - Represents an individual user in a project.
- Project
User Create Request - The project user create request payload.
- Project
User Create Request Args - Builder for
ProjectUserCreateRequest. - Project
User Delete Response - Project
User List Response - Project
User Update Request - Project
User Update Request Args - Builder for
ProjectUserUpdateRequest. - Required
Action - RunCompletion
Usage - RunObject
- Represents an execution run on a thread.
- RunObject
Incomplete Details - RunStep
Completion Usage - RunStep
Delta - RunStep
Delta Object - Represents a run step delta i.e. any changed fields on a run step during streaming.
- RunStep
Delta Step Details Message Creation Object - Details of the message creation by the run step.
- RunStep
Delta Step Details Tool Calls Code Object - Details of the Code Interpreter tool call the run step was involved in.
- RunStep
Delta Step Details Tool Calls Code Output Image Object - Code interpreter image output
- RunStep
Delta Step Details Tool Calls Code Output Logs Object - Text output from the Code Interpreter tool call as part of a run step.
- RunStep
Delta Step Details Tool Calls File Search Object - RunStep
Delta Step Details Tool Calls Function Object - Function tool call
- RunStep
Delta Step Details Tool Calls Object - Details of the tool call.
- RunStep
Details Message Creation Object - Details of the message creation by the run step.
- RunStep
Details Tool Calls Code Object - Code interpreter tool call
- RunStep
Details Tool Calls Code Output Image Object - RunStep
Details Tool Calls Code Output Logs Object - Text output from the Code Interpreter tool call as part of a run step.
- RunStep
Details Tool Calls File Search Object - File search tool call
- RunStep
Details Tool Calls File Search Object File Search - RunStep
Details Tool Calls File Search Result Object - A result instance of the file search.
- RunStep
Details Tool Calls File Search Result Object Content - RunStep
Details Tool Calls Function Object - RunStep
Details Tool Calls Object - Details of the tool call.
- RunStep
Function Object - RunStep
Function Object Delta - RunStep
Object - Represents a step in execution of a run.
- RunTool
Call Object - Static
Chunking Strategy - Static Chunking Strategy
- Submit
Tool Outputs - Submit
Tool Outputs RunRequest - Text
Data - Thread
Object - Represents a thread that contains messages.
- Tools
Outputs - Tools
Outputs Args - Builder for
ToolsOutputs. - Truncation
Object - Thread Truncation Controls
- User
- Represents an individual
userwithin an organization. - User
Delete Response - Confirmation of the deleted user
- User
List Response - A list of
Userobjects. - User
Role Update Request - User
Role Update Request Args - Builder for
UserRoleUpdateRequest.
Enums§
- Assistant
Stream Event - Represents an event emitted when streaming a Run.
- Assistant
Tool Type - Assistant
Tools - Assistant
Vector Store Chunking Strategy - Assistants
ApiResponse Format Option - 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. - Assistants
ApiTool Choice Option - Controls which (if any) tool is called by the model.
nonemeans the model will not call any tools and instead generates a message.autois the default value and means the model can pick between generating a message or calling one or more tools.requiredmeans 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. - Audit
LogActor ApiKey Type - Audit
LogEvent Type - The event type.
- Code
Interpreter Output - Create
Message Request Content - Delta
Code Interpreter Output - Delta
Step Details - File
Search Ranker - Input
Source - Invite
Status - Last
Error Code - MCPTool
Allowed Tools - MCPTool
Approval Setting - MCPTool
Require Approval - Approval policy or filter for MCP tools.
- McpTool
Connector Id - Message
Attachment Tool - Message
Content - Message
Content Input - Message
Content Text Annotations - Message
Delta Content - Message
Delta Content Text Annotations - Message
Incomplete Details Type - Message
Role - Message
Status - Organization
Role - Project
ApiKey Owner Type - Project
Status activeorarchived- Project
User Role ownerormember- RunObject
Incomplete Details Reason - RunStatus
- RunStep
Delta Step Details Tool Calls - RunStep
Details Tool Calls - RunStep
Type - Step
Details - Truncation
Object Type
Type Aliases§
- Assistant
Event Stream - Completion
Response Stream - Parsed server side events stream until an [DONE] is received from server.