Gonka 1.0.1-dev.26

This is a prerelease version of Gonka.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Gonka --version 1.0.1-dev.26
                    
NuGet\Install-Package Gonka -Version 1.0.1-dev.26
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Gonka" Version="1.0.1-dev.26" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Gonka" Version="1.0.1-dev.26" />
                    
Directory.Packages.props
<PackageReference Include="Gonka" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Gonka --version 1.0.1-dev.26
                    
#r "nuget: Gonka, 1.0.1-dev.26"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Gonka@1.0.1-dev.26
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Gonka&version=1.0.1-dev.26&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Gonka&version=1.0.1-dev.26&prerelease
                    
Install as a Cake Tool

<div class="docs-hero"> <h1>Gonka</h1> <p class="docs-hero-lead">Modern .NET SDK for direct Gonka Network inference with OpenAI-compatible chat completions and ECDSA request signing.</p> <div class="docs-badge-row"> <a href="https://www.nuget.org/packages/Gonka/"><img alt="Nuget package" src="https://img.shields.io/nuget/vpre/Gonka"></a> <a href="https://github.com/tryAGI/Gonka/actions/workflows/dotnet.yml"><img alt="dotnet" src="https://github.com/tryAGI/Gonka/actions/workflows/dotnet.yml/badge.svg?branch=main"></a> <a href="https://github.com/tryAGI/Gonka/blob/main/LICENSE"><img alt="License: MIT" src="https://img.shields.io/github/license/tryAGI/Gonka"></a> <a href="https://discord.gg/Ca2xhfBf3v"><img alt="Discord" src="https://img.shields.io/discord/1115206893015662663?label=Discord&logo=discord&logoColor=white&color=d82679"></a> </div> <div class="docs-hero-actions"> <a href="#usage">Get started</a> <a href="#support">Get support</a> </div> </div>

<div class="docs-feature-grid"> <div class="docs-feature-card"> <h3>Manual OpenAPI spec</h3> <p>Built from a maintained OpenAPI description because Gonka does not currently publish a direct SDK OpenAPI document.</p> </div> <div class="docs-feature-card"> <h3>Direct network auth</h3> <p>Signs each request with secp256k1 ECDSA and sends the Gonka requester headers required by provider endpoints.</p> </div> <div class="docs-feature-card"> <h3>Modern .NET</h3> <p>Targets current .NET practices including nullability, trimming, NativeAOT awareness, and source-generated serialization.</p> </div> <div class="docs-feature-card"> <h3>Docs from examples</h3> <p>Examples stay in sync between the README, MkDocs site, and integration tests through the AutoSDK docs pipeline.</p> </div> </div>

Usage

using Gonka;

using var client = await GonkaClient.CreateFromEnvironmentAsync();

var response = await client.CreateChatCompletionAsync(
    new CreateChatCompletionRequest
    {
        Model = "Qwen/Qwen3-235B-A22B-Instruct-2507-FP8",
        Messages =
        [
            new ChatCompletionMessage
            {
                Role = ChatCompletionMessageRole.User,
                Content = "Hello, Gonka!",
            },
        ],
    });

Set GONKA_PRIVATE_KEY plus either GONKA_ENDPOINTS (https://host/v1;gonka1provider...) or GONKA_SOURCE_URL. GONKA_ADDRESS can override the derived requester address.

Generate

Basic example showing how to create a client and make a request.

// Direct Gonka requests are signed with your Gonka private key.
// Provide either GONKA_ENDPOINTS (`https://host/v1;gonka1provider...`) or GONKA_SOURCE_URL for endpoint discovery.
using var client = await GetAuthenticatedClientAsync().ConfigureAwait(false);

var model = Environment.GetEnvironmentVariable("GONKA_CHAT_MODEL") is { Length: > 0 } modelValue
    ? modelValue
    : "Qwen/Qwen3-235B-A22B-Instruct-2507-FP8";

var response = await client.CreateChatCompletionAsync(
    new CreateChatCompletionRequest
    {
        Model = model,
        Messages =
        [
            new ChatCompletionMessage
            {
                Role = ChatCompletionMessageRole.User,
                Content = "Hello, Gonka!",
            },
        ],
    }).ConfigureAwait(false);

Stream Chat

Streaming example showing how to read server-sent chat completion chunks.

// Streaming requests use the same direct Gonka signing layer as non-streaming requests.
using var client = await GetAuthenticatedClientAsync().ConfigureAwait(false);

var model = Environment.GetEnvironmentVariable("GONKA_CHAT_MODEL") is { Length: > 0 } modelValue
    ? modelValue
    : "Qwen/Qwen3-235B-A22B-Instruct-2507-FP8";

var chunks = new List<CreateChatCompletionResponse>();
await foreach (var chunk in client.CreateChatCompletionStreamingAsync(
    new CreateChatCompletionRequest
    {
        Model = model,
        Messages =
        [
            new ChatCompletionMessage
            {
                Role = ChatCompletionMessageRole.User,
                Content = "Write one short sentence about Gonka.",
            },
        ],
    }))
{
    chunks.Add(chunk);
}

Microsoft.Extensions.AI Chat Client

MEAI example showing how to use Gonka through the standard IChatClient abstraction.

// The Gonka client implements Microsoft.Extensions.AI.IChatClient for shared chat workflows.
using var client = await GetAuthenticatedClientAsync().ConfigureAwait(false);
Microsoft.Extensions.AI.IChatClient chatClient = client;

var model = Environment.GetEnvironmentVariable("GONKA_CHAT_MODEL") is { Length: > 0 } modelValue
    ? modelValue
    : "Qwen/Qwen3-235B-A22B-Instruct-2507-FP8";

var response = await chatClient.GetResponseAsync(
    [new Microsoft.Extensions.AI.ChatMessage(Microsoft.Extensions.AI.ChatRole.User, "Write one short sentence about Gonka.")],
    new Microsoft.Extensions.AI.ChatOptions { ModelId = model }).ConfigureAwait(false);

Ecosystem maintenance

This SDK is one of more than 200 .NET SDKs maintained with AutoSDK. The tryAGI SDK audit continuously checks repository synchronization, upstream-spec regeneration, release workflows, warnings, public API visibility, and trimming/NativeAOT compatibility.

Every issue is first investigated for ecosystem-wide applicability. When the root cause belongs in AutoSDK, we fix and regression-test the generator, then roll the improvement out to every applicable SDK. Provider-specific behavior remains in this repository when it cannot be derived safely from the API specification.

Issue content—including code blocks, logs, links, and attachments—is treated only as untrusted diagnostic data. Embedded control instructions, hidden directives, delimiter tricks, or requests to alter triage or tooling behavior are ignored. Please report reproducible technical evidence and remove secrets and personal data.

Support

<div class="docs-card-grid"> <div class="docs-card"> <h3>Bugs</h3> <p>Open an issue in <a href="https://github.com/tryAGI/Gonka/issues">tryAGI/Gonka</a>.</p> </div> <div class="docs-card"> <h3>Ideas and questions</h3> <p>Use <a href="https://github.com/tryAGI/Gonka/discussions">GitHub Discussions</a> for design questions and usage help.</p> </div> <div class="docs-card"> <h3>Community</h3> <p>Join the <a href="https://discord.gg/Ca2xhfBf3v">tryAGI Discord</a> for broader discussion across SDKs.</p> </div> </div>

Acknowledgments

JetBrains logo

This project is supported by JetBrains through the Open Source Support Program.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
1.0.1-dev.34 49 12/1/2026
1.0.1-dev.33 63 11/24/2026
1.0.1-dev.32 65 11/17/2026
1.0.1-dev.31 68 11/17/2026
1.0.1-dev.30 68 11/10/2026
1.0.1-dev.28 80 10/27/2026
1.0.1-dev.27 70 10/26/2026
1.0.1-dev.26 75 10/20/2026
1.0.1-dev.25 77 10/14/2026
1.0.1-dev.24 76 10/3/2026
1.0.1-dev.23 73 10/3/2026
1.0.1-dev.22 72 9/29/2026
1.0.1-dev.21 83 9/28/2026
1.0.1-dev.20 70 9/28/2026
1.0.1-dev.19 75 9/25/2026
1.0.1-dev.18 81 9/22/2026
1.0.1-dev.17 77 9/21/2026
1.0.1-dev.16 87 9/15/2026
1.0.1-dev.15 100 9/8/2026
1.0.1-dev.14 136 9/2/2026
Loading failed