Semantic Kernel with Meridian
Drop-in OpenAI-compatible endpoint for Microsoft Semantic Kernel
Overview
Meridian exposes an OpenAI-compatible chat completions endpoint. You can point Semantic Kernel's AddOpenAIChatCompletion method at Meridian by overriding the endpoint URI and supplying your Meridian API key. No custom connector required.
Usage
using Microsoft.SemanticKernel;
var kernel = Kernel.CreateBuilder()
.AddOpenAIChatCompletion(
modelId: "gpt-4o", // or any model routed in Meridian
apiKey: Environment.GetEnvironmentVariable("MERIDIAN_API_KEY"),
endpoint: new Uri("https://api.meridian.fooglegiber.com/v1")
)
.Build();
var response = await kernel.InvokePromptAsync("Explain zero-knowledge proofs in two sentences.");
Console.WriteLine(response);Parameters
| Argument | Value |
|---|---|
| modelId | Model name as configured in your Meridian routes |
| apiKey | Your Meridian API key (keep in env vars) |
| endpoint | https://api.meridian.fooglegiber.com/v1 |
Notes
- The /v1 suffix is required — Semantic Kernel appends /chat/completions automatically.
- Streaming responses work out of the box; use
InvokeStreamingAsyncif desired. - All requests are encrypted in transit and authenticated via Meridian's API key header.