Skip to content

tryAGI/LeonardoAi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeonardoAi

Nuget package dotnet License: MIT Discord

Generated C# SDK based on LeonardoAi OpenAPI specification using NSwag.

Usage

using LeonardoAi;

using var client = new HttpClient();
var api = new LeonardoAiApi(apiKey, client);
var createResponse = await api.CreateGenerationAsync(new Body
{
    Prompt = "Generate cat",
});

await Task.Delay(TimeSpan.FromSeconds(15));

var response = await api.GetGenerationByIdAsync(createResponse.SdGenerationJob.GenerationId);
var url = response.Generations_by_pk.Generated_images.ElementAt(0).Url;

Support

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