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

# C# SDK Usage

> Current wrapper methods supported by the preview C# SDK.

## Setup

```csharp theme={null}
using AiStatsSdk;

var client = new AIStats("<API_KEY>");
```

## Chat completions

```csharp theme={null}
var chat = await client.GenerateText(new Dictionary<string, object>
{
  ["model"] = "openai/gpt-5-nano",
  ["messages"] = new[]
  {
    new Dictionary<string, object>
    {
      ["role"] = "user",
      ["content"] = "Hello"
    }
  }
});
```

## Responses

```csharp theme={null}
var resp = await client.GenerateResponse(new Dictionary<string, object>
{
  ["model"] = "openai/gpt-5-nano",
  ["input"] = "Reply with: csharp sdk works"
});
```

## Images

```csharp theme={null}
var image = await client.GenerateImage(new Dictionary<string, object>
{
  ["model"] = "openai/gpt-image-1",
  ["prompt"] = "A lighthouse at golden hour"
});
```

## Moderations

```csharp theme={null}
var moderation = await client.GenerateModeration(new Dictionary<string, object>
{
  ["model"] = "openai/omni-moderation-latest",
  ["input"] = "Some text to check"
});
```

## Models and health

```csharp theme={null}
var models = await client.ListModels(new Dictionary<string, string> { ["limit"] = "10" });
var health = await client.Health();
```
