Skip to content

Commit 3b1b29e

Browse files
HavenDVclaude
andcommitted
Regenerate docs from Example test files
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 43f0eb2 commit 3b1b29e

4 files changed

Lines changed: 104 additions & 0 deletions

File tree

docs/examples/edit-image.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Edit Image
2+
3+
4+
5+
This example assumes `using Ideogram;` is in scope and `apiKey` contains your Ideogram API key.
6+
7+
```csharp
8+
using var api = new IdeogramClient(apiKey);
9+
10+
// Create placeholder 1x1 pixel PNGs for demonstration
11+
var imageBytes = new byte[] { 0x89, 0x50, 0x4E, 0x47 };
12+
var maskBytes = new byte[] { 0x89, 0x50, 0x4E, 0x47 };
13+
14+
ImageGenerationResponseV3 response = await api.Generate.PostEditImageV3Async(
15+
new EditImageRequestV3
16+
{
17+
Image = imageBytes,
18+
Imagename = "photo.png",
19+
Mask = maskBytes,
20+
Maskname = "mask.png",
21+
Prompt = "Replace the background with a starry night sky",
22+
MagicPrompt = MagicPromptOption.On,
23+
StyleType = StyleTypeV3.General,
24+
Seed = 12345,
25+
});
26+
27+
Console.WriteLine($"Created: {response.Created}");
28+
29+
foreach (var image in response.Data)
30+
{
31+
Console.WriteLine($"Image URL: {image.Url}");
32+
Console.WriteLine($"Resolution: {image.Resolution}");
33+
}
34+
```

docs/examples/remix-image.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Remix Image
2+
3+
4+
5+
This example assumes `using Ideogram;` is in scope and `apiKey` contains your Ideogram API key.
6+
7+
```csharp
8+
using var api = new IdeogramClient(apiKey);
9+
10+
// Create a placeholder 1x1 pixel PNG for demonstration
11+
var imageBytes = new byte[] { 0x89, 0x50, 0x4E, 0x47 };
12+
13+
ImageGenerationResponseV3 response = await api.Generate.PostRemixImageV3Async(
14+
new RemixImageRequestV3
15+
{
16+
Image = imageBytes,
17+
Imagename = "source.png",
18+
Prompt = "Transform this scene into a watercolor painting style",
19+
ImageWeight = 40,
20+
AspectRatio = AspectRatioV3.x16x9,
21+
MagicPrompt = MagicPromptOption.On,
22+
NegativePrompt = "blurry, low quality",
23+
Seed = 12345,
24+
});
25+
26+
Console.WriteLine($"Created: {response.Created}");
27+
28+
foreach (var image in response.Data)
29+
{
30+
Console.WriteLine($"Image URL: {image.Url}");
31+
Console.WriteLine($"Resolution: {image.Resolution}");
32+
}
33+
```

docs/examples/upscale-image.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Upscale Image
2+
3+
4+
5+
This example assumes `using Ideogram;` is in scope and `apiKey` contains your Ideogram API key.
6+
7+
```csharp
8+
using var api = new IdeogramClient(apiKey);
9+
10+
// Create a placeholder 1x1 pixel PNG for demonstration
11+
var imageBytes = new byte[] { 0x89, 0x50, 0x4E, 0x47 };
12+
13+
GenerateImageResponse response = await api.Generate.PostUpscaleImageAsync(
14+
new UpscaleImageRequest
15+
{
16+
ImageRequest = new UpscaleInitialImageRequest
17+
{
18+
Prompt = "A detailed landscape with sharp textures",
19+
Resemblance = 60,
20+
Detail = 70,
21+
MagicPromptOption = MagicPromptOption.On,
22+
Seed = 12345,
23+
},
24+
ImageFile = imageBytes,
25+
ImageFilename = "input.png",
26+
});
27+
28+
Console.WriteLine($"Upscaled images count: {response.Data.Count}");
29+
30+
foreach (var image in response.Data)
31+
{
32+
Console.WriteLine($"Image URL: {image.Url}");
33+
}
34+
```

mkdocs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ nav:
66
- Generate Image: examples/generate-image.md
77
- Magic Prompt: examples/magic-prompt.md
88
- Describe Image: examples/describe-image.md
9+
- Remix Image: examples/remix-image.md
10+
- Upscale Image: examples/upscale-image.md
11+
- Edit Image: examples/edit-image.md
912
# EXAMPLES:END
1013

1114
theme:

0 commit comments

Comments
 (0)