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
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#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
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
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> 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 | Versions 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.
-
net6.0
- Newtonsoft.Json (>= 13.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.