Groq 0.0.0-dev.109
dotnet add package Groq --version 0.0.0-dev.109
NuGet\Install-Package Groq -Version 0.0.0-dev.109
<PackageReference Include="Groq" Version="0.0.0-dev.109" />
<PackageVersion Include="Groq" Version="0.0.0-dev.109" />
<PackageReference Include="Groq" />
paket add Groq --version 0.0.0-dev.109
#r "nuget: Groq, 0.0.0-dev.109"
#:package Groq@0.0.0-dev.109
#addin nuget:?package=Groq&version=0.0.0-dev.109&prerelease
#tool nuget:?package=Groq&version=0.0.0-dev.109&prerelease
Groq
Features 🔥
- Fully generated C# SDK based on official Groq OpenAPI specification using AutoSDK
- Same day update to support new features
- Updated and supported automatically if there are no breaking changes
- All modern .NET features - nullability, trimming, NativeAOT, etc.
- Support .Net Framework/.Net Standard 2.0
- Microsoft.Extensions.AI
IChatClientandIEmbeddingGeneratorsupport viatryAGI.OpenAICustomProviders
Usage
using Groq;
using var client = new GroqClient(apiKey);
IList<ChatCompletionRequestMessage> messages = [
new ChatCompletionRequestUserMessage {
Role = ChatCompletionRequestUserMessageRole.User,
Content = "Generate a random name"
}];
CreateChatCompletionRequest request = new() {
Messages = messages,
Model = CreateChatCompletionRequestModel.Llama370b8192
};
var response = await client.Chat.CreateChatCompletionAsync(request);
Console.WriteLine(response.Choices[0].Message.Content);
Microsoft.Extensions.AI (MEAI) Support
Groq provides an OpenAI-compatible API. For IChatClient and IEmbeddingGenerator support via Microsoft.Extensions.AI, use the tryAGI.OpenAI package:
dotnet add package tryAGI.OpenAI
using OpenAI;
using Microsoft.Extensions.AI;
using var client = CustomProviders.Groq(apiKey);
// IChatClient
IChatClient chatClient = client;
var response = await chatClient.GetResponseAsync("Hello!");
// IEmbeddingGenerator
IEmbeddingGenerator<string, Embedding<float>> generator = client;
var embeddings = await generator.GenerateAsync(["Hello, world!"]);
Audio
using var client = new GroqClient(apiKey);
var url = "https://speech.zone/simple4all/wp-content/uploads/2012/10/nina_01_071.wav";
string tempFilePath = await DownloadFileToTempAsync(url);
var request = new CreateTranscriptionRequest {
Filename = "sample",
File = System.IO.File.ReadAllBytes(tempFilePath),
Model = CreateTranscriptionRequestModel.WhisperLargeV3,
Language = "en",
};
var response = await client.Audio.CreateTranscriptionAsync(request);
Console.WriteLine(response);
Chat
using var client = new GroqClient(apiKey);
IList<ChatCompletionRequestMessage> messages = [
new ChatCompletionRequestUserMessage {
Role = ChatCompletionRequestUserMessageRole.User,
Content = "Generate five random words."
}];
CreateChatCompletionRequest request = new() {
Messages = messages,
Model = CreateChatCompletionRequestModel.Llama3370bVersatile
};
var response = await client.Chat.CreateChatCompletionAsync(request);
Console.WriteLine(response.Choices[0].Message.Content);
Embeddings
using var client = new GroqClient(apiKey);
CreateEmbeddingRequest request = new() {
Input = "Hello, world",
Model = CreateEmbeddingRequestModel.NomicEmbedTextV15
};
var response = await client.Embeddings.CreateEmbeddingAsync(request);
Console.WriteLine(response.Data[0].Embedding1);
Text to Speech
Generate speech audio from text using the Groq TTS API.
using var client = new GroqClient(apiKey);
// Generate speech from text using PlayAI TTS.
var audioBytes = await client.Audio.CreateSpeechAsync(
model: CreateSpeechRequestModel.PlayaiTts,
input: "Hello from Groq text to speech!",
voice: "Arista-PlayAI",
responseFormat: CreateSpeechRequestResponseFormat.Wav);
Files
Upload and manage files for use with the Groq Batch API.
using var client = new GroqClient(apiKey);
// List all uploaded files.
var response = await client.Files.ListFilesAsync();
Batches
List and manage batch processing jobs.
using var client = new GroqClient(apiKey);
// List all batch processing jobs.
var response = await client.Batch.ListBatchesAsync();
Support
Priority place for bugs: https://github.com/tryAGI/Groq/issues
Priority place for ideas and general questions: https://github.com/tryAGI/Groq/discussions
Discord: https://discord.gg/Ca2xhfBf3v
Acknowledgments
This project is supported by JetBrains through the Open Source Support Program.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.0.0-dev.109 | 35 | 3/20/2026 |
| 0.0.0-dev.107 | 30 | 3/20/2026 |
| 0.0.0-dev.106 | 30 | 3/20/2026 |
| 0.0.0-dev.105 | 31 | 3/20/2026 |
| 0.0.0-dev.104 | 31 | 3/20/2026 |
| 0.0.0-dev.103 | 39 | 3/20/2026 |
| 0.0.0-dev.102 | 32 | 3/19/2026 |
| 0.0.0-dev.101 | 34 | 3/19/2026 |
| 0.0.0-dev.100 | 30 | 3/19/2026 |
| 0.0.0-dev.99 | 36 | 3/19/2026 |
| 0.0.0-dev.98 | 30 | 3/19/2026 |
| 0.0.0-dev.97 | 30 | 3/19/2026 |
| 0.0.0-dev.96 | 33 | 3/19/2026 |
| 0.0.0-dev.95 | 34 | 3/19/2026 |
| 0.0.0-dev.91 | 35 | 3/19/2026 |
| 0.0.0-dev.90 | 35 | 3/19/2026 |
| 0.0.0-dev.89 | 30 | 3/19/2026 |
| 0.0.0-dev.88 | 31 | 3/19/2026 |
| 0.0.0-dev.87 | 30 | 3/19/2026 |
| 0.0.0-dev.86 | 36 | 3/19/2026 |