Integrating xAI's Grok API with Semantic Kernel is simple using the OpenAI connector. This tutorial covers the setup process for both C# and Python projects. Grok models offer a 128k context window and function-calling support, making them ideal for complex tasks. The API is compatible with OpenAI, and using Grok requires setting the base URL and API key. Pricing is based on token usage, and obtaining an API key requires logging into xAI’s console.

4m read timeFrom devblogs.microsoft.com
Post cover image
Table of contents
Why Grok? Copy linkPricing Copy linkObtaining a Grok API Key Copy linkSetting Up in .NET (C#) Copy linkSetting Up in Python Copy linkReferences Copy link

Sort: