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
- realtime
realtime - responses
- uploads
- 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.
- Chat
Choice - Chat
Choice Logprobs - Chat
Choice Stream - Chat
Completion Audio - Chat
Completion Functions Deprecated - Chat
Completion Functions Args - Builder for
ChatCompletionFunctions. - Chat
Completion Message Tool Call - Chat
Completion Message Tool Call Chunk - Chat
Completion Named Tool Choice - Specifies a tool the model should use. Use to force the model to call a specific function.
- Chat
Completion Request Assistant Message - Chat
Completion Request Assistant Message Args - Builder for
ChatCompletionRequestAssistantMessage. - Chat
Completion Request Assistant Message Audio - Chat
Completion Request Developer Message - Chat
Completion Request Developer Message Args - Builder for
ChatCompletionRequestDeveloperMessage. - Chat
Completion Request Function Message - Chat
Completion Request Function Message Args - Builder for
ChatCompletionRequestFunctionMessage. - Chat
Completion Request Message Content Part Audio - Learn about audio inputs.
- Chat
Completion Request Message Content Part Audio Args - Builder for
ChatCompletionRequestMessageContentPartAudio. - Chat
Completion Request Message Content Part Image - Chat
Completion Request Message Content Part Image Args - Builder for
ChatCompletionRequestMessageContentPartImage. - Chat
Completion Request Message Content Part Refusal - Chat
Completion Request Message Content Part Refusal Builder - Builder for
ChatCompletionRequestMessageContentPartRefusal. - Chat
Completion Request Message Content Part Text - Chat
Completion Request Message Content Part Text Args - Builder for
ChatCompletionRequestMessageContentPartText. - Chat
Completion Request System Message - Chat
Completion Request System Message Args - Builder for
ChatCompletionRequestSystemMessage. - Chat
Completion Request Tool Message - Tool message
- Chat
Completion Request Tool Message Args - Builder for
ChatCompletionRequestToolMessage. - Chat
Completion Request User Message - Chat
Completion Request User Message Args - Builder for
ChatCompletionRequestUserMessage. - Chat
Completion Response Message - A chat completion message generated by the model.
- Chat
Completion Response Message Audio - Chat
Completion Stream Options - Options for streaming response. Only set this when you set
stream: true. - Chat
Completion Stream Response Delta - A chat completion delta generated by streamed model responses.
- Chat
Completion Token Logprob - Chat
Completion Tool - Chat
Completion Tool Args - Builder for
ChatCompletionTool. - Choice
- Code
Interpreter - Comparison
Filter - A filter used to compare a specified attribute key to a given value using a defined comparison operation.
- Completion
Tokens Details - Breakdown of tokens used in a completion.
- Completion
Usage - Usage statistics for the completion request.
- Compound
Filter - Combine multiple filters using
andoror. - Container
Expires After - Expiration policy for containers.
- Container
File List Resource - Response when listing container files.
- Container
File Resource - The container file object represents a file in a container.
- Container
List Resource - Response when listing containers.
- Container
Resource - Create
Assistant Request - Create
Assistant Request Args - Builder for
CreateAssistantRequest. - Create
Assistant Tool File Search Resources - Create
Assistant Tool Resources - Create
Chat Completion Request - Create
Chat Completion Request Args - Builder for
CreateChatCompletionRequest. - Create
Chat Completion Response - Represents a chat completion response returned by model, based on the provided input.
- Create
Chat Completion Stream Response - Represents a streamed chunk of a chat completion response returned by model, based on the provided input.
- Create
Completion Request - Create
Completion Request Args - Builder for
CreateCompletionRequest. - Create
Completion Response - Create
Container File Request - Request to create a container file. openapi spec type: CreateContainerFileBody
- Create
Container Request - Request to create a container. openapi spec type: CreateContainerBody
- Create
Container Request Args - Builder for
CreateContainerRequest. - 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. - Create
Vector Store File Batch Request - Create
Vector Store File Batch Request Args - Builder for
CreateVectorStoreFileBatchRequest. - Create
Vector Store File Request - Create
Vector Store File Request Args - Builder for
CreateVectorStoreFileRequest. - Create
Vector Store Request - Create
Vector Store Request Args - Builder for
CreateVectorStoreRequest. - Create
Video Request - Create
Video Request Args - Builder for
CreateVideoRequest. - Delete
Assistant Response - Delete
Container File Response - Response when deleting a container file.
- Delete
Container Response - Response when deleting a container.
- Delete
Message Response - Delete
Thread Response - Delete
Vector Store File Response - Delete
Vector Store 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. - Function
Call - The name and arguments of a function that should be called, as generated by the model.
- Function
Call Stream - Function
Name - Function
Object - Function
Object Args - Builder for
FunctionObject. - Image
File - Image
Url - Image
UrlArgs - Builder for
ImageUrl. - Input
Audio - 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
Container Files Query - Query parameters for listing container files.
- List
Container Files Query Args - Builder for
ListContainerFilesQuery. - List
Containers Query - Query parameters for listing containers.
- List
Containers Query Args - Builder for
ListContainersQuery. - List
Messages Response - List
RunSteps Response - List
Runs Response - List
Vector Store Files Response - List
Vector Stores Response - List
Videos Response - LogProb
Properties - Log probability information for a transcribed token.
- Logprobs
- 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. - Prompt
Tokens Details - Breakdown of tokens used in a completion.
- Ranking
Options - Ranking options for search.
- Remix
Video Request - Remix
Video Request Args - Builder for
RemixVideoRequest. - Required
Action - Response
Format Json Schema - 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. - TopLogprobs
- Truncation
Object - Thread Truncation Controls
- Update
Vector Store Request - Update
Vector Store Request Args - Builder for
UpdateVectorStoreRequest. - 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. - Vector
Store Expiration After - Vector store expiration policy
- Vector
Store File Batch Counts - Vector
Store File Batch Object - A batch of files attached to a vector store.
- Vector
Store File Content Object - Represents the parsed content of a vector store file.
- Vector
Store File Content Response - Represents the parsed content of a vector store file.
- Vector
Store File Counts - Vector
Store File Error - Vector
Store File Object - Vector
Store Object - A vector store is a collection of processed files can be used by the
file_searchtool. - Vector
Store Search Request - Vector
Store Search Request Args - Builder for
VectorStoreSearchRequest. - Vector
Store Search Result Content Object - Vector
Store Search Result Item - Vector
Store Search Results Page - Video
Job - Structured information describing a generated video job.
- Video
JobError - Video
JobMetadata - WebSearch
Location - Approximate location parameters for the search.
- WebSearch
Options - Options for the web search tool.
- WebSearch
User Location
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. - Attribute
Value - The value to compare against the attribute key; supports string, number, or boolean types.
- Audit
LogActor ApiKey Type - Audit
LogEvent Type - The event type.
- Chat
Completion Audio Format - Chat
Completion Audio Voice - Chat
Completion Function Call - Chat
Completion Modalities - Output types that you would like the model to generate for this request.
- Chat
Completion Request Assistant Message Content - Chat
Completion Request Assistant Message Content Part - Chat
Completion Request Developer Message Content - Chat
Completion Request Message - Chat
Completion Request Message Content Part Refusal Builder Error - Error type for ChatCompletionRequestMessageContentPartRefusalBuilder
- Chat
Completion Request System Message Content - Chat
Completion Request System Message Content Part - Chat
Completion Request Tool Message Content - Chat
Completion Request Tool Message Content Part - Chat
Completion Request User Message Content - Chat
Completion Request User Message Content Part - Chat
Completion Tool Choice Option - Controls which (if any) tool is called by the model.
nonemeans the model will not call any tool and instead generates a message.automeans the model can pick between generating a message or calling one or more tools.requiredmeans 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. - Chat
Completion Tool Type - Code
Interpreter Output - Comparison
Type - Specifies the comparison operator:
eq,ne,gt,gte,lt,lte. - Completion
Finish Reason - Compound
Filter Type - Type of operation:
andoror. - Container
Expires After Anchor - Anchor for container expiration.
- Create
Message Request Content - Delta
Code Interpreter Output - Delta
Step Details - File
Search Ranker - Finish
Reason - Image
Detail - Input
Audio Format - 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 - Prediction
Content - Static predicted output content, such as the content of a text file that is being regenerated.
- Prediction
Content Content - 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.
- Project
ApiKey Owner Type - Project
Status activeorarchived- Project
User Role ownerormember- Prompt
- Ranker
- Reasoning
Effort - Response
Format - Role
- RunObject
Incomplete Details Reason - RunStatus
- RunStep
Delta Step Details Tool Calls - RunStep
Details Tool Calls - RunStep
Type - Service
Tier - Service
Tier Response - Step
Details - Stop
- Truncation
Object Type - Vector
Store Chunking Strategy - Vector
Store File Batch Status - Vector
Store File Error Code - Vector
Store File Object Chunking Strategy - Vector
Store File Status - Vector
Store Search Filter - Vector
Store Search Query - Vector
Store Status - Video
Size - Video
Variant - WebSearch
Context Size - The amount of context window space to use for the search.
- WebSearch
User Location Type
Type Aliases§
- Assistant
Event Stream - Chat
Completion Response Stream - Parsed server side events stream until an [DONE] is received from server.
- Completion
Response Stream - Parsed server side events stream until an [DONE] is received from server.