Describe Image
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
11
12
13
14
15
16
17 | using var api = new IdeogramClient(apiKey);
// Create a simple 1x1 pixel PNG for demonstration
var imageBytes = new byte[] { 0x89, 0x50, 0x4E, 0x47 };
DescribeResponse response = await api.Vision.PostDescribeAsync(new DescribeRequest
{
ImageFile = imageBytes,
ImageFilename = "test.png",
});
Console.WriteLine($"Description count: {response.Descriptions?.Count}");
foreach (var description in response.Descriptions ?? [])
{
Console.WriteLine($" Description: {description.Text}");
}
|