Skip to content

devlooped/GrokClient

Icon Grok Client (gRPC)

Version Downloads EULA OSS

Grok client based on the official gRPC API reference from xAI

Open Source Maintenance Fee

To ensure the long-term sustainability of this project, users of this package who generate revenue must pay an Open Source Maintenance Fee. While the source code is freely available under the terms of the License, this package and other aspects of the project require adherence to the Maintenance Fee.

To pay the Maintenance Fee, become a Sponsor at the proper OSMF tier. A single fee covers all of Devlooped packages.

Usage

This project provides a .NET client for the gRPC API of xAI with full support for all services documented in the official API reference and corresponding proto files.

var builder = Host.CreateApplicationBuilder(args); // or WebApplication.CreateBuilder(args);

builder.Services.AddGrokClient(Environment.GetEnvironmentVariable("XAI_API_KEY")!);

var app = builder.Build();

This package leverages the gRPC client factory integration for seamless dependency injection:

class MyService(Chat.ChatClient chat, Documents.DocumentsClient docs, Embedder.EmbedderClient embed)
{
    // use clients
}

Auto-updating

This project contains an automated mechanism to always fetch the latest version of the official .proto files from XAI, ensuring it remains up-to-date with any changes or additions made to the API as soon as they are published.

See for example the introduction of tool output and citations.

Sponsors

Clarius Org MFB Technologies, Inc. SandRock DRIVE.NET, Inc. Keith Pickford Thomas Bolon Kori Francis Uno Platform Reuben Swartz Jacob Foshee Eric Johnson David JENNI Jonathan Charley Wu Ken Bonny Simon Cropp agileworks-eu Zheyu Shen Vezel ChilliCream 4OTC Vincent Limo domischell Justin Wendlandt Adrian Alonso Michael Hagedorn torutek mccaffers Christoph Hochstätter ADS Fund

Sponsor this project

Learn more about GitHub Sponsors

About

Grok gRPC client from official .proto files

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Contributors 2

  •  
  •