Skip to content

Vercel.AI.Google

API reference

Google Gemini and Vertex provider.

Type Summary
FileStreamPart A streamed file part. The shared stream model has no file delta, so this carries the bytes.
GoogleAssistantPart An assistant content part.
GoogleAssistantTurn An assistant turn.
GoogleBatchApi Gemini Batch API. Downloads the file-based JSONL results of a finished batch.
GoogleEmbeddingModel Gemini embedding model. One value uses :embedContent; several values use :batchEmbedContents.
GoogleFileAssistantPart An assistant file or reasoning file.
GoogleFileUrls URLs Gemini can read without downloading the bytes.
GoogleFileUserPart A user file. Kind is url, data, text, or reference.
GoogleFinishReason Maps Gemini finish reasons onto the shared finish-reason enum.
GoogleGeneratedFile A generated file, including thought images.
GoogleImageModel Gemini image generation. The call runs through GoogleLanguageModel with the IMAGE response modality, so the google provider options apply, and googleSearch enables Google Search grounding.
GoogleInteractionsAgent An agent to call through the Interactions API: { agent: name } or { managedAgent: name } upstream.
GoogleInteractionsFinish Maps an Interactions API status onto a finish reason.
GoogleInteractionsInput Converts a prompt into an Interactions input array.
GoogleInteractionsModel Language model that posts to the Gemini Interactions API.
GoogleInteractionsOutput Reads text and function calls from an Interactions response.
GoogleJson JSON settings shared by Gemini request builders.
GoogleJsonAccumulator Builds a JSON object from Gemini streaming partialArgs chunks. Concatenated text deltas plus Finalize() match the serialized object. Keys such as proto are stored as ordinary properties.
GoogleJsonSchema Rewrites JSON Schema so Gemini responseJsonSchema accepts it.
GoogleLanguageModel Gemini language model. Posts to models/{id}:generateContent.
GoogleMessageOptions Settings for converting a prompt into Gemini contents.
GoogleMessages Converts prompts into Gemini contents.
GoogleModelCapabilities Which Gemini request features a model id accepts.
GoogleModelCapability Classifies Gemini model ids. Unknown future Gemini ids inherit the newest behavior.
GoogleModelPath Builds the resource path Gemini expects for a model id.
GoogleOptions Gemini settings.
GoogleParseContext Ids and metadata keys used while parsing a Gemini response.
GooglePartialArgument One streamed function-call argument fragment.
GooglePartialArgumentsFinal The completed argument JSON and the suffix still needed to close it.
GooglePartialArgumentsUpdate The object and text produced by one GoogleJsonAccumulator update.
GooglePreparedRequest A generateContent request body plus the warnings and extra headers that go with it.
GooglePrompt Gemini contents plus an optional system instruction.
GoogleProvider Google Gemini provider.
GoogleProviderTool A Gemini provider-defined tool such as Google Search.
GoogleRealtime Maps Gemini Live WebSocket messages. No socket is opened, so this compiles on netstandard2.0.
GoogleRealtimeClientSecret An ephemeral Gemini Live auth token and the WebSocket URL it opens.
GoogleRealtimeEvent One normalized Gemini Live event.
GoogleRealtimeModel Realtime model. Event mapping is local; opening the Live socket is not available on this runtime.
GoogleRealtimeSession Session fields accepted by GoogleRealtime.
GoogleRealtimeTool A realtime function tool.
GoogleReasoning Reasoning text that can carry a thought signature.
GoogleReasoningAssistantPart Assistant reasoning.
GoogleRequest Builds a Gemini generateContent body.
GoogleResponse Parses a Gemini generateContent response.
GoogleServiceCollectionExtensions Registers Google and Vertex.
GoogleSpeechCall Speech request settings beyond the shared text and voice fields.
GoogleSpeechInput Inspects a speech transcript before a model call.
GoogleSpeechInspection Transcript text and whether the voice is a custom voice.
GoogleSpeechModel Gemini text-to-speech. Posts to generateContent with an audio response modality.
GoogleSpeechPreparation A prepared Gemini speech request.
GoogleSpeechTranslation Speech translation configuration for the Gemini Live API. The socket itself is not opened here.
GoogleSystemTurn A system turn.
GoogleText Generated text that can carry a thought signature.
GoogleTextAssistantPart Assistant text.
GoogleTextUserPart User text.
GoogleThinking Maps the shared reasoning option onto Gemini thinking configuration.
GoogleTokenUsage Token usage converted from Gemini usageMetadata.
GoogleToolCall A tool call that records whether the provider executed it.
GoogleToolCallAssistantPart An assistant function or server tool call.
GoogleToolContentPart One multimodal tool-result part.
GoogleToolPreparation Tools and toolConfig prepared for a generateContent request.
GoogleToolResult A provider-executed tool result.
GoogleToolResultPart One tool result.
GoogleTools Prepares Gemini function and provider-defined tools.
GoogleToolTurn A tool-result turn.
GoogleTranscriptionModel Gemini transcription. Unary models post to the Interactions API.
GoogleTurn One rich prompt turn used by the message converter.
GoogleUsage Converts Gemini usageMetadata.
GoogleUserPart A user content part.
GoogleUserTurn A user turn.
GoogleVertexAnthropicOptions Settings for Anthropic on Vertex.
GoogleVertexAnthropicProvider Anthropic on Vertex. Sends the Anthropic Messages body to rawPredict with anthropicversion in the body. Vertex does not accept URL sources, the native output format, or strict tools.
GoogleVertexAuth Header construction for Vertex. Live Application Default Credentials are not contacted.
GoogleVertexCloudSpeechModel Cloud Text-to-Speech text:synthesize for Chirp 3 HD voices.
GoogleVertexEndpoints Vertex host and URL construction. Locations are single DNS labels so they cannot rewrite the host.
GoogleVertexGeminiTranscriptionModel Vertex Gemini transcription through generateContent.
GoogleVertexMaasProvider Vertex MaaS OpenAI-compatible endpoint.
GoogleVertexPartnerOptions Settings for the OpenAI-compatible MaaS and xAI endpoints on Vertex.
GoogleVertexProvider Google Vertex AI provider.
GoogleVertexSpeechTranscriptionModel Cloud Speech-to-Text recognize.
GoogleVertexXaiProvider xAI Grok models hosted on Vertex.
GoogleWarning A warning produced while preparing a Gemini request.
VertexOptions Vertex settings. The default route stays compatible with the regional v1 publisher URL.

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