Skip to content

Gretel

Nuget package dotnet License: MIT Discord

Features 🔥

  • Fully generated C# SDK based on official Gretel OpenAPI specification using AutoSDK
  • Same day update to support new features
  • Updated and supported automatically if there are no breaking changes
  • All modern .NET features - nullability, trimming, NativeAOT, etc.
  • Support .Net Framework/.Net Standard 2.0

Usage

1
2
3
using Gretel;

using var client = new GretelClient(apiKey);

Models

Example showing how to list and get synthetic data models in a project.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
// List all synthetic data models in a project.
using var client = new GretelClient(apiKey);

var projects = await client.Projects.ListProjectsAsync(limit: 1);
if (projects.Data is not { Count: > 0 })
{
    return;
}

var projectId = projects.Data[0].Uid ?? projects.Data[0].Name!;
var models = await client.Projects.ListModelsAsync(
    projectId: projectId,
    limit: 10);

MEAI Tools

Example showing how to use Gretel AIFunction tools with any IChatClient.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
// Gretel provides AIFunction tools that can be used with any `IChatClient`.
// These tools wrap common Gretel API operations for use in AI agent workflows.
using var client = new GretelClient(apiKey);

var tools = new[]
{
    client.AsListProjectsTool(),
    client.AsGetProjectTool(),
    client.AsListModelsTool(),
    client.AsGetModelTool(),
    client.AsGetWorkflowRunTool(),
    client.AsListWorkflowsTool(),
};

Support

Priority place for bugs: https://github.com/tryAGI/Gretel/issues
Priority place for ideas and general questions: https://github.com/tryAGI/Gretel/discussions
Discord: https://discord.gg/Ca2xhfBf3v

Acknowledgments

JetBrains logo

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