Table of Contents

Class ImageSource

Namespace
AnthropicClient.Models
Assembly
AnthropicClient.dll

Represents an image source.

public class ImageSource
Inheritance
ImageSource
Inherited Members

Constructors

ImageSource(string, string)

Initializes a new instance of the ImageSource class.

public ImageSource(string mediaType, string data)

Parameters

mediaType string

The media type of the image.

data string

The data of the image.

Exceptions

ArgumentException

Thrown when the media type is invalid.

ArgumentNullException

Thrown when the media type or data is null.

Properties

Data

Gets the data of the image.

public string Data { get; init; }

Property Value

string

MediaType

Gets the media type of the image.

[JsonPropertyName("media_type")]
public string MediaType { get; init; }

Property Value

string

Type

Gets the type of encoding of the image data.

public string Type { get; init; }

Property Value

string