Skip to main content

Module openai

Module openai 

Source
Expand description

OpenAI provider wire models.

These modules mirror OpenAI JSON wire shapes only. Provider conversion and routing logic belongs outside this provider model layer.

Re-exports§

pub use generate_content::*;
pub use realtime::*;

Modules§

generate_content
realtime
OpenAI Realtime API wire models (GA: WebSocket GET /v1/realtime and WebRTC POST /v1/realtime/calls).

Structs§

AudioDurationUsage
AudioInputTokenDetails
AudioTokenUsage
ChatAllowedToolChoice
ChatAllowedTools
ChatJsonSchemaFormat
CompactMessageItem
CompactResponseRequestBody
CompactSummaryTextContent
CompactTextContent
CompactedResponseObject
ConversationObject
CreateConversationRequestBody
CreateVideoCharacterRequest
CreateVideoRequest
CustomToolDefinition
CustomToolGrammar
CustomToolGrammarFormat
CustomToolTextFormat
DeleteVideoRequest
DownloadVideoContentRequest
EditVideoRequest
Embedding
EmbeddingRequest
EmbeddingResponse
EmbeddingUsage
ExtendVideoRequest
FunctionCall
FunctionDefinition
GetVideoCharacterRequest
Image
ImageEditRequest
ImageGenerationRequest
ImageReference
ImageTokenDetails
ImageUsage
ImagesResponse
JsonObjectResponseFormat
JsonSchemaFormat
JsonSchemaResponseFormat
LegacyFunctionCallOption
LegacyFunctionDefinition
ListVideosRequest
Model
ModelListResponse
ModerationConfig
ModerationError
ModerationResult
NamedTool
OpenAiWireModel
PromptCacheBreakpoint
PromptCacheOptions
RemixVideoRequest
RerankDocumentContent
RerankRequest
RerankResponse
RerankResult
RerankUsage
ResponseAllowedToolChoice
ResponseApplyPatchToolChoice
ResponseCustomToolChoice
ResponseFunctionToolChoice
ResponseHostedToolChoice
ResponseInputTokensRequest
ResponseInputTokensResponse
ResponseMcpToolChoice
ResponseShellToolChoice
RetrieveVideoRequest
ServerVadConfig
SpeechRequest
StreamTokenLogprob
StreamTokenTopLogprob
TextResponseFormat
TokenLogprob
TokenLogprobTop
Transcription
TranscriptionDiarized
TranscriptionDiarizedSegment
TranscriptionLanguage
TranscriptionLogprob
TranscriptionRequest
TranscriptionSegment
TranscriptionVerbose
TranscriptionWord
Translation
TranslationRequest
TranslationVerbose
UnknownImageStreamEvent
UnknownTranscriptionStreamEvent
Video
VideoCharacter
VideoCreateError
VideoDeleteResponse
VideoIdReference
VideoImageReference
VideoListResponse

Enums§

AllowedToolsMode
AllowedToolsType
ApplyPatchToolChoiceType
ApproximateLocationType
AudioChunkingAuto
AudioChunkingStrategy
AudioDurationUsageType
AudioResponseFormat
AudioTokenUsageType
AudioUsage
ChatCompletionChunkObjectType
ChatCompletionObjectType
ChatFinishReason
ChatImageDetailLevel
ChatNamedToolChoice
ChatResponseFormat
ChatToolCallType
ChatToolChoice
CodeInterpreterContainerType
CodeInterpreterMemoryLimit
CompactMessageContentPart
CompactMessageRole
CompactResponseItem
CompactServiceTier
CompactSummaryTextContentType
CompactTextContentType
ContextManagementType
ContextManagementTypeKnown
ConversationObjectType
CustomToolChoiceType
CustomToolGrammarFormatType
CustomToolGrammarSyntax
CustomToolInputFormat
CustomToolTextFormatType
DetailLevel
EmbeddingEncodingFormat
EmbeddingInput
EmbeddingObjectType
FunctionToolChoiceType
ImageBackground
ImageEditQuality
ImageEditSize
ImageEditStreamEvent
ImageGenerationAction
ImageGenerationStreamEvent
ImageInputFidelity
ImageModeration
ImageOutputFormat
ImageQuality
ImageResponseBackground
ImageResponseFormat
ImageResponseQuality
ImageResponseSize
ImageSize
ImageSizeKnown
ImageStreamEvent
ImageStreamEventType
ImageStreamEventTypeKnown
ImageStyle
IncompleteReason
InputAudioFormat
InputFileDetailLevel
JsonObjectResponseFormatType
JsonSchemaResponseFormatType
KnownImageEditStreamEvent
KnownImageGenerationStreamEvent
KnownImageStreamEvent
KnownTranscriptionStreamEvent
LegacyFunctionCallChoice
LegacyFunctionCallMode
ListObjectType
McpToolChoiceType
ModelObjectType
ModerationErrorType
ModerationInputType
ModerationResultType
OneOrMany
OpenAiModelId
OpenAiModelIdKnown
PromptCacheBreakpointMode
PromptCacheMode
PromptCacheRetention
PromptCacheTtl
ReasoningContext
ReasoningContextKnown
ReasoningEffort
ReasoningMode
ReasoningModeKnown
ReasoningSummary
RerankDocument
ResponseAllowedTool
ResponseApplyPatchCallOutputStatus
ResponseApplyPatchCallStatus
ResponseCodeInterpreterCallStatus
ResponseCompactionObjectType
ResponseComputerCallOutputStatus
ResponseErrorCode
ResponseErrorCodeKnown
ResponseFileSearchCallStatus
ResponseFormat
ResponseHostedToolChoiceType
ResponseImageGenerationCallStatus
ResponseImageGenerationSize
ResponseImageGenerationSizeKnown
ResponseIncludable
ResponseInputTokensObjectType
ResponseItemLifecycleStatus
ResponseItemType
ResponseItemTypeKnown
ResponseMcpCallStatus
ResponseObjectType
ResponsePersonality
ResponsePersonalityKnown
ResponsePhase
ResponseStatus
ResponseStreamEventType
ResponseStreamEventTypeKnown
ResponseToolChoice
ResponseWebSearchCallStatus
SearchContextSize
ServerVadType
ServiceTier
ShellToolChoiceType
SpeechResponseFormat
SpeechResponseFormatKnown
SpeechStreamFormat
SpeechStreamFormatKnown
StringOrList
TextOrAudioModality
TextResponseFormatType
TimestampGranularity
TimestampGranularityKnown
ToolCaller
ToolChoiceMode
ToolSearchExecution
ToolType
TranscriptionInclude
TranscriptionIncludeKnown
TranscriptionResponse
TranscriptionResponseFormat
TranscriptionResponseFormatKnown
TranscriptionSegmentType
TranscriptionStreamEvent
TranslationResponse
TranslationResponseFormat
TranslationResponseFormatKnown
TruncationStrategy
Verbosity
VideoContentVariant
VideoContentVariantKnown
VideoDeletedObjectType
VideoExtensionSeconds
VideoExtensionSecondsKnown
VideoInputReference
An image guiding video generation. Multipart files are represented by a normalized string; JSON requests use exactly one of file_id or image_url.
VideoListObjectType
VideoListOrder
VideoListOrderKnown
VideoModelId
VideoModelIdKnown
VideoObjectType
VideoReference
A normalized multipart upload string or a reference to an existing video.
VideoSeconds
VideoSecondsKnown
VideoSize
VideoSizeKnown
VideoStatus
VideoStatusKnown
VoiceName
VoiceNameKnown

Functions§

openai_video_endpoints
OpenAI video endpoint metadata. Resource identifiers remain path-template parameters so routers can bind them from the inbound request.

Type Aliases§

CompactResponseWireModel
CreateConversationWireModel
CreateVideoCharacterWireModel
CreateVideoWireModel
DeleteVideoWireModel
DownloadVideoContentWireModel
EditVideoWireModel
EmbeddingWireModel
ExtendVideoWireModel
Extra
GetVideoCharacterWireModel
ImageEditStreamWireModel
ImageEditWireModel
ImageGenerationStreamWireModel
ImageGenerationWireModel
JsonSchema
ListVideosWireModel
LogitBias
Metadata
ModelRetrieveWireModel
ModelsWireModel
RemixVideoWireModel
RerankWireModel
OpenAI-shaped rerank wire model used by compatible providers such as OpenRouter and DashScope. OpenAI itself does not expose this endpoint.
ResponseInputTokensWireModel
RetrieveVideoWireModel
SpeechWireModel
Speech responses are raw audio bytes unless stream_format=sse is used.
TranscriptionStreamWireModel
TranscriptionWireModel
TranslationWireModel