Expand description
Types used in OpenAI API requests and responses. These types are created from component schemas in the OpenAPI spec
Modules§
Structs§
- AddUpload
Part Request - Request parameters for adding a part to an Upload
- Assistant
Object - Represents an
assistant
that 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.
- Audio
Input - 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.
- Base64
Embedding - Represents an base64-encoded embedding vector returned by embedding endpoint.
- Base64
Embedding Vector - Batch
- Batch
Error - Batch
Errors - Batch
Request - Batch
Request Args - Builder for
BatchRequest
. - Batch
Request Counts - Batch
Request Input - The per-line object of the batch input file
- Batch
Request Output - The per-line object of the batch output and error files
- Batch
Request Output Error - Batch
Request Output Response - Category
- Category
Applied Input Types - A list of the categories along with the input type(s) that the score applies to.
- Category
Score - A list of the categories along with their scores as predicted by model.
- 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.
- Complete
Upload Request - Request parameters for completing an Upload
- Completion
Tokens Details - Breakdown of tokens used in a completion.
- Completion
Usage - Usage statistics for the completion request.
- Compound
Filter - Combine multiple filters using
and
oror
. - Content
Moderation Result - Create
Assistant Request - Create
Assistant Request Args - Builder for
CreateAssistantRequest
. - Create
Assistant Tool File Search Resources - Create
Assistant Tool Resources - Create
Base64 Embedding Response - 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
Embedding Request - Create
Embedding Request Args - Builder for
CreateEmbeddingRequest
. - Create
Embedding Response - Create
File Request - Create
File Request Args - Builder for
CreateFileRequest
. - Create
Fine Tuning JobRequest - Create
Fine Tuning JobRequest Args - Builder for
CreateFineTuningJobRequest
. - Create
Image Edit Request - Create
Image Edit Request Args - Builder for
CreateImageEditRequest
. - Create
Image Request - Create
Image Request Args - Builder for
CreateImageRequest
. - Create
Image Variation Request - Create
Image Variation Request Args - Builder for
CreateImageVariationRequest
. - Create
Message Request - Create
Message Request Args - Builder for
CreateMessageRequest
. - Create
Moderation Request - Create
Moderation Request Args - Builder for
CreateModerationRequest
. - Create
Moderation Response - Represents if a given text input is potentially harmful.
- Create
RunRequest - Create
RunRequest Args - Builder for
CreateRunRequest
. - Create
Speech Request - Create
Speech Request Args - Builder for
CreateSpeechRequest
. - Create
Speech Response - Create
Thread AndRun Request - Create
Thread AndRun Request Args - Builder for
CreateThreadAndRunRequest
. - Create
Thread Request - Create
Thread Request Args - Builder for
CreateThreadRequest
. - Create
Transcription Request - Create
Transcription Request Args - Builder for
CreateTranscriptionRequest
. - Create
Transcription Response Json - Represents a transcription response returned by model, based on the provided input.
- Create
Transcription Response Verbose Json - Represents a verbose json transcription response returned by model, based on the provided input.
- Create
Translation Request - Create
Translation Request Args - Builder for
CreateTranslationRequest
. - Create
Translation Response Json - Create
Translation Response Verbose Json - Create
Upload Request - Request to create an upload object that can accept byte chunks in the form of Parts.
- Create
Upload Request Args - Builder for
CreateUploadRequest
. - 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
. - DPOHyperparameters
- Delete
Assistant Response - Delete
File Response - Delete
Message Response - Delete
Model Response - Delete
Thread Response - Delete
Vector Store File Response - Delete
Vector Store Response - Delta
Code Interpreter - Embedding
- Represents an embedding vector returned by embedding endpoint.
- Embedding
Usage - File
Citation - File
Input - File
Path - File
Search Ranking Options - 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. - Fine
TuneDPO Method - Fine
Tune JobError - For fine-tuning jobs that have
failed
, this will contain more information on the cause of the failure. - Fine
Tune Supervised Method - Fine
Tuning Integration - Fine
Tuning Job - The
fine_tuning.job
object represents a fine-tuning job that has been created through the API. - Fine
Tuning JobCheckpoint - The
fine_tuning.job.checkpoint
object represents a model checkpoint for a fine-tuning job that is ready to use. - Fine
Tuning JobCheckpoint Metrics - Fine
Tuning JobEvent - Fine-tuning job event object
- 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
. - Hyperparameters
- Image
File - Image
Input - Image
Url - Image
UrlArgs - Builder for
ImageUrl
. - Images
Response - Input
Audio - Invite
- Represents an individual
invite
to 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
Batches Response - List
Files Response - List
Fine Tuning JobCheckpoints Response - List
Fine Tuning JobEvents Response - List
Messages Response - List
Model Response - List
Paginated Fine Tuning Jobs Response - List
RunSteps Response - List
Runs Response - List
Vector Store Files Response - List
Vector Stores Response - Logprobs
- 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_interpreter
tool 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 - Model
- Describes an OpenAI model offering that can be used with the API.
- Moderation
Image Url - Image URL configuration for image moderation
- Modify
Assistant Request - Modify
Assistant Request Args - Builder for
ModifyAssistantRequest
. - Modify
Message Request - Modify
RunRequest - Modify
Thread Request - OpenAI
File - The
File
object represents a document that has been uploaded to OpenAI. - 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.
- 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
- Transcription
Segment - Transcription
Word - Truncation
Object - Thread Truncation Controls
- Update
Vector Store Request - Update
Vector Store Request Args - Builder for
UpdateVectorStoreRequest
. - Upload
- The Upload object can accept byte chunks in the form of Parts.
- Upload
Part - The upload Part represents a chunk of bytes we can add to an Upload object.
- User
- Represents an individual
user
within an organization. - User
Delete Response - Confirmation of the deleted user
- User
List Response - A list of
User
objects. - 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_search
tool. - 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 - WandB
- 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.
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. - Attribute
Value - The value to compare against the attribute key; supports string, number, or boolean types.
- Audio
Response Format - Audit
LogActor ApiKey Type - Audit
LogEvent Type - The event type.
- Batch
Completion Window - Batch
Endpoint - Batch
Request Input Method - Batch
Size - Batch
Status - Beta
- 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.
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. - 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:
and
oror
. - Create
Message Request Content - Dall
E2Image Size - Delta
Code Interpreter Output - Delta
Step Details - Embedding
Input - Encoding
Format - File
Purpose - File
Search Ranker - Fine
Tune Method - The method used for fine-tuning.
- Fine
Tuning JobEvent Type - Fine
Tuning JobIntegration Type - Fine
Tuning JobStatus - Finish
Reason - Image
- Image
Detail - Image
Model - Image
Quality - Image
Response Format - Image
Size - Image
Style - Input
Audio Format - Input
Source - Invite
Status - Last
Error Code - Learning
Rate Multiplier - Level
- 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 - ModInput
Type - The type of input that was moderated
- Moderation
Content Part - Content part for multi-modal moderation input
- Moderation
Input - NEpochs
- OpenAI
File Purpose - 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 active
orarchived
- Project
User Role owner
ormember
- 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 - Speech
Model - Speech
Response Format - Step
Details - Stop
- Timestamp
Granularity - Truncation
Object Type - Upload
Purpose - The intended purpose of the uploaded file.
- Upload
Status - The status of an upload
- 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 - Voice
- 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.