Skip to main content

Google GenAI SDK

Use the official Google GenAI SDK when you need Google-native route shapes or Gemini-specific SDK behavior.

The Google GenAI SDK requires both a base URL override and explicit Bearer auth injection for Sentinel:

import { GoogleGenAI } from "@google/genai";

const client = new GoogleGenAI({
apiKey: process.env.SP_API_KEY!,
httpOptions: {
baseUrl: `${process.env.SENTINEL_BASE_URL!}/v1/google`,
headers: {
Authorization: `Bearer ${process.env.SP_API_KEY!}`,
},
},
});

No additional Sentinel bootstrap step is required; the explicit Authorization header is still enough on the client side.

Broadly documented surfaces​

Supported with caveats

Google native support is strongest for generate, models, and embedding paths. Upload and live-style workflows are a separate compatibility class.

Broadly documented surfaces include:

  • generate content
  • stream generate content
  • models list and get
  • embeddings
  • batches

Caveats​

  • some SDK methods call different native routes than their method names suggest
  • uploads and live/websocket flows should be treated as separate compatibility checks, not implied by JSON request success
  • environment-specific runtime issues can affect live and file workflows even when the underlying gateway route exists

A native Google route can exist while still falling short of the exact behavior expected by the SDK in your runtime.

Not broadly verified yet​

The following should not be treated as broadly verified by default:

  • treating file upload as a blanket supported claim for all environments
  • assuming live or websocket workflows will work without validation in the exact runtime you use