Skip to content

Simli

Modern .NET SDK for Simli generated from the provider's OpenAPI definition with AutoSDK.

Nuget package dotnet License: MIT Discord

Generated from the source spec

Built from Simli's OpenAPI definition so the SDK stays close to the upstream API surface.

Auto-updated

Designed for fast regeneration and low-friction updates when the upstream API changes without breaking compatibility.

Modern .NET

Targets current .NET practices including nullability, trimming, NativeAOT awareness, and source-generated serialization.

Docs from examples

Examples stay in sync between the README, MkDocs site, and integration tests through the AutoSDK docs pipeline.

Usage

1
2
3
using Simli;

using var client = new SimliClient(apiKey);

List Faces

Lists all available avatar faces for the authenticated user.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
using var client = new SimliClient(apiKey);

// List all available avatar faces
var faces = await client.GetFacesAsync();

Console.WriteLine($"Found {faces.Count} face(s)");
foreach (var face in faces)
{
    Console.WriteLine($"  Face ID: {face.Id}, Version: {face.SimliVersion}, Created: {face.CreatedAt}");
}

Create Session Token

Creates a Compose session token for WebRTC avatar streaming.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
using var client = new SimliClient(apiKey);

// Get available faces first
var faces = await client.GetFacesAsync();

var faceId = faces[0].Id.ToString();

// Create a Compose session token for realtime avatar streaming
var response = await client.StartAudioToVideoSessionComposeTokenPostAsync(
    faceId: faceId);

Console.WriteLine($"Session token: {response.SessionToken}");

Session History

Retrieves session history for the authenticated user.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
using var client = new SimliClient(apiKey);

// Retrieve session history
var response = await client.GetHistorySessionsAsync();

Console.WriteLine($"Found {response.Sessions?.Count ?? 0} session(s)");
if (response.Sessions is { Count: > 0 })
{
    foreach (var session in response.Sessions)
    {
        Console.WriteLine($"  Session ID: {session.Id}, Duration: {session.SessionTotalTime:F1}s");
    }
}

Active Sessions

Gets the current active session count.

1
2
3
4
5
6
using var client = new SimliClient(apiKey);

// Check the number of currently active sessions
var response = await client.GetRatelimiterSessionsAsync();

Console.WriteLine($"Active sessions: {response.CurrentUsage ?? 0}");

Support

Bugs

Open an issue in tryAGI/Simli.

Ideas and questions

Use GitHub Discussions for design questions and usage help.

Community

Join the tryAGI Discord for broader discussion across SDKs.

Acknowledgments

JetBrains logo

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