Skip to content

List TTS Models

This example assumes using Google.Gemini; is in scope and apiKey contains your Google.Gemini API key.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
using var client = new GeminiClient(apiKey);

// Discover every Gemini TTS model the API exposes today. Useful for
// surfacing newly released preview models without hard-coding IDs.
var ttsModels = await client.ListTtsModelsAsync();

foreach (var model in ttsModels)
{
    Console.WriteLine($"{model.Name} -- {model.DisplayName}");
}