Basic example showing how to create a client and make a request.
This example assumes using Gonka; is in scope and apiKey contains your Gonka API key.
1 2 3 4 5 6 7 8 9101112131415161718192021
// 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.usingvarclient=awaitGetAuthenticatedClientAsync().ConfigureAwait(false);varmodel=Environment.GetEnvironmentVariable("GONKA_CHAT_MODEL")is{Length:>0}modelValue?modelValue:"Qwen/Qwen3-235B-A22B-Instruct-2507-FP8";varresponse=awaitclient.CreateChatCompletionAsync(newCreateChatCompletionRequest{Model=model,Messages=[ new ChatCompletionMessage { Role = ChatCompletionMessageRole.User, Content = "Hello, Gonka!", }, ],}).ConfigureAwait(false);