GenerateImage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
using var api = new IdeogramApi(apiKey);

GenerateImageResponse image = await api.Generate.PostGenerateImageAsync(new ImageRequest
{
    Prompt = "A beautiful sunset",
    AspectRatio = AspectRatio.ASPECT169,
    Seed = Random.Shared.Next(),
    StyleType = StyleType.REALISTIC,
    Resolution = Resolution.RESOLUTION1024768,
});

Console.WriteLine($"Generated image: {image.Data[0].Url}");