> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tokenlab.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Semantic Kernel

> Microsoft Semantic Kernel'ı özel bir OpenAI uyumlu uç nokta ile TokenLab'e bağlayın

## Genel Bakış

Semantic Kernel, TokenLab'i OpenAI özel uç nokta sohbet tamamlama (chat completion) hizmeti aracılığıyla çağırabilir.

<Note>
  **Tür**: SDK / Ajan Çerçevesi

  **Birincil Yol**: OpenAI uyumlu sohbet tamamlamaları

  **Destek Güveni**: Desteklenen özel uç nokta yolu
</Note>

## Ortam

```bash theme={null}
export TOKENLAB_API_KEY="sk-your-tokenlab-key"
```

## .NET Kernel Builder

Semantic Kernel'ın özel uç noktası, `/v1/chat/completions` adresine değil, OpenAI uyumlu kök `/v1` uç noktasına işaret etmelidir.

```csharp theme={null}
using Microsoft.SemanticKernel;

#pragma warning disable SKEXP0010

var builder = Kernel.CreateBuilder();

builder.AddOpenAIChatCompletion(
    modelId: "gpt-5.4-mini",
    endpoint: new Uri("https://api.tokenlab.sh/v1"),
    apiKey: Environment.GetEnvironmentVariable("TOKENLAB_API_KEY"));

var kernel = builder.Build();
```

## Temel İstemi (Prompt)

```csharp theme={null}
var result = await kernel.InvokePromptAsync(
    "Give me a concise checklist for evaluating an LLM gateway.");

Console.WriteLine(result);
```

## Uç Nokta Notları

Şunu kullanın:

```text theme={null}
https://api.tokenlab.sh/v1
```

Şunu kullanmayın:

```text theme={null}
https://api.tokenlab.sh/v1/chat/completions
```

Semantic Kernel, bu bağlayıcı (connector) için sohbet tamamlama yolunu dahili olarak ekler.
