Skip to content

PromptLayer

Nuget package dotnet License: MIT Discord

Features 🔥

  • Fully generated C# SDK based on official PromptLayer 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 PromptLayer;

using var client = new PromptLayerClient(apiKey);

Workflows

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
using var client = new PromptLayerClient(apiKey);

// List available workflows with pagination.
// Each workflow includes its name, latest version number,
// and any release labels (e.g., "prod", "staging").
var response = await client.Workflow.ListWorkflowsAsync(
    page: 1,
    perPage: 10);

Console.WriteLine($"Total workflows: {response.Total}, Page: {response.Page}/{response.Pages}");

foreach (var workflow in response.Items)
{
    var labels = workflow.ReleaseLabels.Count > 0
        ? string.Join(", ", workflow.ReleaseLabels)
        : "none";
    Console.WriteLine($"  - {workflow.Name} (id: {workflow.Id}, version: {workflow.LatestVersionNumber}, labels: {labels})");
}

Support

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

Acknowledgments

JetBrains logo

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