---
title: "Describe images with Claude in C# | Nutrient .NET SDK"
canonical_url: "https://www.nutrient.io/guides/dotnet/csharp/extraction/describe-image-with-claude/"
md_url: "https://www.nutrient.io/guides/dotnet/csharp/extraction/describe-image-with-claude.md"
last_updated: "2026-10-08T00:00:00.000Z"
description: "Generate accessible image descriptions using Claude AI with Nutrient .NET SDK."
---

# Generating image descriptions using Claude

Use image description to generate alt text and visual summaries from images.

Common use cases include:

- Accessibility workflows for screen readers

- Digital asset cataloging

- Document enrichment for scanned reports

- E-learning content description

- Archive and metadata generation

This guide uses Claude as the VLM provider through Nutrient Vision API.

[Download sample](https://www.nutrient.io/downloads/samples/csharp/describe-image-with-claude.zip)

## How Nutrient helps

Nutrient.NET SDK handles provider configuration, request handling, and response parsing.

The SDK handles:

- API authentication and endpoint configuration

- Image encoding and multimodal request payloads

- Model settings such as temperature and token limits

- Vision API failures and rate-limit handling

## Complete implementation

This example generates an image description using Claude:

```csharp

using Nutrient;

```

## Configuring the Claude provider

Open the image with a [using statement](https://learn.microsoft.com/dotnet/csharp/language-reference/statements/using) and configure Claude as the provider.

In this sample:

- Setting `VisionSettings.Provider` to `VlmProvider.Anthropic` selects Claude.

- Setting `AnthropicApiSettings.ApiKey` provides the Anthropic API key.

- Input can be PNG, JPEG, GIF, BMP, or TIFF.

```csharp

try
{
    using Document document = Document.Open("input_photo.png");
    var settings = document.Settings;

    // Configure Claude as the VLM provider
    settings.VisionSettings.Provider = VlmProvider.Anthropic;

    // Set the Anthropic API key
    settings.AnthropicApiSettings.ApiKey = "CLAUDE_API_KEY";

```

## Creating a vision instance and generating the description

Create a vision instance and call `Describe()` to generate text.

In this sample:

- `Vision.Set(document)` binds processing to the opened image.

- `vision.Describe()` returns a description string.

- The SDK handles encoding, request construction, and response parsing.

```csharp

    var vision = Vision.Set(document);
    string description = vision.Describe();

```

## Outputting the description

Print the description for review, or store it in your application.

Common destinations include:

- Database fields

- JSON output files

- HTML `alt` attributes

```csharp

    Console.WriteLine("Image description:");
    Console.WriteLine(description);
}
catch (NutrientException e)
{
    Console.Error.WriteLine($"Error: {e.Message}");
    Environment.Exit(1);
}

```

## Understanding the output

`Describe()` returns natural language text for accessibility and content understanding.

Claude descriptions are typically:

- **Concise** — Focused on key subjects and details, often one to three sentences

- **Accessible** — Suitable for users who rely on screen readers

- **Accurate** — Based on visible content only

- **Contextual** — Include relevant relationships and scene context

Use this output for accessibility metadata, image search, and document workflows.

## Claude API settings

The Claude provider uses these `AnthropicApiSettings` properties:

- `ApiEndpoint` — The Claude API endpoint (default: `https://api.anthropic.com/v1/`).

- `ApiKey` — Your Anthropic API key for authentication.

- `Model` — The model identifier to use (default: `claude-sonnet-4-5`).

- `Temperature` — Controls response creativity (0.0 = deterministic, 1.0 = creative).

- `MaxTokens` — Maximum tokens in the response (default: 16384).

## Error handling

The SDK throws a `NutrientException` when vision operations fail.

Common failure scenarios include:

- The input image can't be read due to path, permission, or format issues

- The Claude API key is missing or invalid

- The Claude API is unavailable

- Rate limits are exceeded

- Network requests fail before reaching the API

- Image data is too large or corrupted

In production code:

- Catch `NutrientException`.

- Return a clear error message.

- Log failure details for debugging.

- Add retry logic for transient API failures.

## Conclusion

Use this workflow to generate image descriptions with Claude:

1. Open the image file with a `using` statement for automatic resource cleanup.

2. The SDK supports multiple image formats, including PNG, JPEG, GIF, BMP, and TIFF.

3. Access the vision settings with `Settings.VisionSettings` to configure the VLM provider.

4. Set `Provider` to `VlmProvider.Anthropic` to select Claude instead of alternatives like OpenAI or local models.

5. Access the Anthropic API settings with the `AnthropicApiSettings` property for API configuration.

6. Set the Anthropic API key with the `ApiKey` property using credentials obtained from the Anthropic Console.

7. The Anthropic API settings control endpoint URLs, model selection (default: claude-sonnet-4-5), temperature, and max tokens.

8. Create a vision instance with `Vision.Set()` bound to the document with configured provider settings.

9. Generate the description with `vision.Describe()`, which sends the image to Claude's vision endpoint and returns natural language text.

10. The SDK encodes image data, constructs multimodal API requests, and parses responses automatically.

11. Generated descriptions are concise (1–3 sentences), accessible (WCAG-compliant alt text), accurate (observable details only), and contextual.

12. Print or save the description for use in accessibility systems, content management, or cataloging workflows.

13. Handle `NutrientException` failures for vision processing issues, including authentication errors, API failures, and rate limits.

For related image workflows, refer to the [.NET SDK guides](https://www.nutrient.io/guides/dotnet/csharp.md).

Download [this ready-to-use sample package](https://www.nutrient.io/downloads/samples/csharp/describe-image-with-claude.zip) to explore Claude-based image description.
---

## Related pages

- [Nutrient .NET SDK extraction guides](/guides/dotnet/csharp/extraction.md)
- [Applying OCR to a PDF page](/guides/dotnet/csharp/extraction/apply-ocr-to-pdf-page.md)
- [Applying OCR to a PDF document](/guides/dotnet/csharp/extraction/apply-ocr-to-pdf.md)
- [Classifying documents](/guides/dotnet/csharp/extraction/classify-document.md)
- [Generating image descriptions using local AI](/guides/dotnet/csharp/extraction/describe-image-with-local-ai.md)
- [Generating image descriptions using OpenAI](/guides/dotnet/csharp/extraction/describe-image-with-openai.md)
- [Detecting document language](/guides/dotnet/csharp/extraction/detect-document-language.md)
- [Extracting data from images using ICR](/guides/dotnet/csharp/extraction/extract-data-from-image-icr.md)
- [Extracting data from images using OCR](/guides/dotnet/csharp/extraction/extract-data-from-image-ocr.md)
- [Extracting data from images using vision language models](/guides/dotnet/csharp/extraction/extract-data-from-image-vlm.md)
- [Extracting data from specific pages](/guides/dotnet/csharp/extraction/extract-data-from-specific-pages.md)
- [Extracting form fields from images](/guides/dotnet/csharp/extraction/extract-form-fields-from-image.md)
- [Extracting structured data from documents](/guides/dotnet/csharp/extraction/extract-structured-data.md)
- [Generating extraction schemas](/guides/dotnet/csharp/extraction/generate-extraction-schema.md)
- [Extracting JSON data from a PDF document](/guides/dotnet/csharp/extraction/json-data-extraction.md)
- [Labeling form fields with a vision language model](/guides/dotnet/csharp/extraction/label-form-fields-with-vlm.md)
- [Parsing a document into structured content](/guides/dotnet/csharp/extraction/parse-document.md)
- [Extracting text from PDF documents](/guides/dotnet/csharp/extraction/pdf-to-text.md)
- [Reading barcodes with vision extraction](/guides/dotnet/csharp/extraction/read-barcodes-with-vision.md)
- [Extracting text from multilingual images](/guides/dotnet/csharp/extraction/read-text-from-image-multi-language.md)
- [Extracting text from images](/guides/dotnet/csharp/extraction/read-text-from-image.md)
- [Searching document text](/guides/dotnet/csharp/extraction/search-document-text.md)
- [Speeding up first ICR operation by predownloading models](/guides/dotnet/csharp/extraction/speed-up-first-icr-by-downloading-requirements.md)

