Product: Vercel AI Gateway Feature: Speech-to-text / transcription Model: google/gemini-3.5-transcribe Endpoint: POST https://ai-gateway.vercel.sh/v4/ai/transcription-model Auth: AI Gateway API key (system credentials, not BYOK) Example generationId: gen_01M11K75WKZPWRXY37603K104G
What I need
Speaker diarization from Gemini 3.5 Transcribe: word-level speaker labels (spk_1, spk_2, …) so I can split a meeting transcript by speaker.
Google’s native Transcribe API supports this. Docs: https://ai.google.dev/gemini-api/docs/transcribe
Native request shape:
"mode": { "type": "verbatim", "diarization_mode": "speaker" }What Gateway does1. Native mode object is rejectedproviderOptions.google.mode as an object (type + diarization_mode) returns HTTP 400: “invalid google provider options”.Gateway does not accept the Google-native diarization config.2. Flattened options are accepted, but speaker metadata is strippedThis is accepted (HTTP 200):POST https://ai-gateway.vercel.sh/v4/ai/transcription-modelAuthorization: Bearer $AI_GATEWAY_API_KEYContent-Type: application/jsonai-model-id: google/gemini-3.5-transcribeai-transcription-model-specification-version: 4ai-gateway-protocol-version: 0.0.1ai-gateway-auth-method: api-key{ "audio": "", "mediaType": "audio/mpeg", "providerOptions": { "google": { "mode": "VERBATIM", "diarization": true, "languageCodes": ["ru-RU"] } }}Also tried (all 200, same empty speaker data):