Skip to content

Magic Prompt

This example assumes using Ideogram; is in scope and apiKey contains your Ideogram API key.

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

MagicPromptResponse response = await api.Prompt.PostMagicPromptAsync(new MagicPromptRequest
{
    Prompt = "a cat sitting on a windowsill",
    MagicPromptVersion = MagicPromptVersionEnum.V0,
    ClassifyPromptCategory = true,
});

Console.WriteLine($"Enhanced prompt: {response.MagicPrompt}");