DotNetCraiyon 3.0.0

dotnet add package DotNetCraiyon --version 3.0.0
NuGet\Install-Package DotNetCraiyon -Version 3.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DotNetCraiyon" Version="3.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DotNetCraiyon --version 3.0.0
#r "nuget: DotNetCraiyon, 3.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install DotNetCraiyon as a Cake Addin
#addin nuget:?package=DotNetCraiyon&version=3.0.0

// Install DotNetCraiyon as a Cake Tool
#tool nuget:?package=DotNetCraiyon&version=3.0.0

Craiyon.Net (DotNetCraiyon)

Craiyon.Net (also known as DotNetCraiyon on NuGet) is a library that allows you to interact with Craiyon. An AI Image generation service powered by DALL-E.

<br>NuGet version (DotNetCraiyon)

<br> Interacting with this library is simple, and there's two ways you can use it:

  • Bulk-Gallery Downloads, where you can download all the images based on the given prompt
  • Specific images from the gallery provided an index (starts at zero)

Usage

Bulk gallery downloads can be done as such:

using Craiyon.Net;

namespace Craiyon.Net.Tests
{
    public class GalleryDl
    {
        public static async Task Main(string[] args)
        {

            Console.WriteLine("Give me a prompt to generate:");
            string prompt = Console.ReadLine();

            var craiyonService = new CraiyonService(); // Gallery index isn't needed if you are downloading the entire gallery.

            try
            {
                await craiyonService.DownloadGalleryAsync(prompt, "testFolder");
            }
            catch (Exception e)
            {
                Console.WriteLine(e.ToString());
            }
        }
    }
}

And specific image downloads can be done like this:

using Craiyon.Net;
namespace Craiyon.Net.Tests
{
    public class ImageDl
    {
        public static async Task Main(string[] args)
        {
            
            Console.WriteLine("Generating Image...");
            var craiyonService = new CraiyonService(1); // Get the 2nd image within the image gallery.
            
                                                        // Note:
                                                        // The index parameter in the constructor is optional. You can set the     
                                                        // wanted index using SetGalleryIndex(index).
            try
            {
                await craiyonService.DownloadImageSpecificAsync("Space man", "specific.jpg");
            } catch(Exception e) {
                Console.WriteLine(e.ToString());
            }
        }
    }
}

Simple as that! Enjoy!

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
3.0.0 249 3/13/2023
2.0.2 410 9/20/2022
2.0.1 359 9/20/2022
2.0.0 383 9/19/2022
1.0.0 399 9/19/2022