Skip to content

Vercel.AI.OpenAI

API reference

OpenAI Chat Completions, Responses, images, speech, and transcription.

Type Summary
OpenAIApproximateLocation An approximate user location for the OpenAI web search tools.
OpenAIBatchApi OpenAI Batch API. Starts, reads, cancels, and lists Responses batches, and downloads their results.
OpenAICallWarning A warning produced while preparing an OpenAI request.
OpenAIChatLanguageModel OpenAI Chat Completions language model.
OpenAIChatMessageResult Chat Completions messages and the warnings produced while converting them.
OpenAIChatMessages Converts prompts into OpenAI Chat Completions messages.
OpenAIChatPreparedRequest Chat Completions request body and the warnings produced while building it.
OpenAIChatPromptMessage One prompt message converted into an OpenAI chat message.
OpenAIChatPromptPart One user or assistant content part.
OpenAIChatToolPreparation Chat Completions tools and tool choice.
OpenAIChatTools Prepares Chat Completions function tools.
OpenAICodeInterpreterToolOptions Options of CodeInterpreter(OpenAICodeInterpreterToolOptions). ContainerId and FileIds are alternatives; with neither the container is created automatically.
OpenAICompletionLanguageModel OpenAI legacy completions language model.
OpenAICompletionPreparedRequest Completion request body and warnings.
OpenAICompletionPrompt A completion prompt and its default stop sequences.
OpenAICustomToolOptions Options of CustomTool(OpenAICustomToolOptions).
OpenAIDecisionModel Answers questions through the OpenAI Decisions API (POST /decisions).
OpenAIEmbeddingCallResult Embedding vectors plus the raw response.
OpenAIEmbeddingModel OpenAI embeddings model.
OpenAIFileMetadata Metadata returned by the OpenAI Files API.
OpenAIFileReference A file reference that carries an OpenAI file id.
OpenAIFileSearchFilter A file search filter: a comparison (Key, Type, one value) or a compound (and/or over Filters).
OpenAIFileSearchToolOptions Options of FileSearch(OpenAIFileSearchToolOptions).
OpenAIFileStore OpenAI file store.
OpenAIImageCall Image generation settings beyond the shared prompt and size.
OpenAIImageFile An image file sent to the edits endpoint.
OpenAIImageGeneration Image generation result, including usage and warnings.
OpenAIImageGenerationToolOptions Options of ImageGeneration(OpenAIImageGenerationToolOptions). Maps to the upstream imageGeneration args.
OpenAIImageModel OpenAI image generation and edit model.
OpenAIJsonSchema Removes JSON Schema keywords OpenAI does not enforce: string propertyNames and regex lookaround in pattern.
OpenAIJsonSchemaResult JSON Schema adjusted for OpenAI structured outputs.
OpenAILanguageModelCapabilities Request limits derived from an OpenAI model id.
OpenAIMcpToolOptions Options of Mcp(OpenAIMcpToolOptions). One of ServerUrl or ConnectorId must be set.
OpenAIOptions OpenAI provider settings.
OpenAIProvider OpenAI provider: Chat Completions, Responses, embeddings, images, speech, transcription, files, and batches.
OpenAIRealtimeClientSecret A realtime client secret.
OpenAIRealtimeModel OpenAI Realtime session URI builder and WebSocket client.
OpenAIResponsesAllowedTools The tools a request may call, sent as toolchoice: { type: “allowedtools” }. Maps to the allowedTools option of the OpenAI Responses provider options.
OpenAIResponsesLanguageModel OpenAI Responses API language model.
OpenAIResponsesPreparedRequest Responses API request body and the warnings produced while building it.
OpenAIServiceCollectionExtensions Registers OpenAIProvider.
OpenAIShellDomainSecret A domain secret of an allowlist network policy.
OpenAIShellEnvironment Environment of Shell(OpenAIShellToolOptions): containerAuto, containerReference, or local.
OpenAIShellLocalSkill A skill available in a local shell environment.
OpenAIShellToolOptions Options of Shell(OpenAIShellToolOptions).
OpenAISkillFile One file uploaded as part of a skill.
OpenAISkillStore OpenAI skill store.
OpenAISkillUpload Skill upload result.
OpenAISpeechCall Speech synthesis settings.
OpenAISpeechModel OpenAI speech model.
OpenAISpeechPreparation Speech request body and warnings.
OpenAISpeechResult Speech audio plus the response metadata recorded for the call.
OpenAISpeechTranslationModel OpenAI speech translation model. REST calls use /audio/translations.
OpenAIText Generated text that carries the Responses output item id and its annotations.
OpenAITools Factories for the OpenAI provider-defined tools, the port of upstream openaiTools. Each builds the LanguageModelTool that OpenAI Responses maps to a hosted tool.
OpenAIToolSearchToolOptions Options of ToolSearch(OpenAIToolSearchToolOptions).
OpenAITranscriptionCall Transcription settings beyond the audio payload.
OpenAITranscriptionModel OpenAI audio transcription model.
OpenAITranscriptionResponse Response metadata recorded for a transcription.
OpenAITranscriptionResult Transcript with timed segments and response metadata.
OpenAIUnsupportedTool A non-function tool passed to Chat Completions preparation.
OpenAIWebSearchPreviewToolOptions Options of WebSearchPreview(OpenAIWebSearchPreviewToolOptions).
OpenAIWebSearchToolOptions Options of WebSearch(OpenAIWebSearchToolOptions).
PreparedResponsesTools Tools prepared for the OpenAI Responses API.
PrepareResponsesToolsOptions Options of PrepareResponsesToolsOptions) besides the tools and the tool choice.

Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product