> ## Documentation Index
> Fetch the complete documentation index at: https://www.adaline.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# ImageContent

> Image content type for prompt messages with detail level specification.

# ImageContent

Image content with detail level specification for multi-modal LLM messages.

## Import

```typescript theme={null}
import type { ImageContent } from '@adaline/api';
```

## Type Definition

```typescript theme={null}
interface ImageContent {
  modality: 'image';
  detail: 'low' | 'medium' | 'high' | 'auto';
  value: ImageContentValue;
}

type ImageContentValue = Base64ImageContentValue | UrlImageContentValue;

interface UrlImageContentValue {
  type: 'url';
  url: string;
}

interface Base64ImageContentValue {
  type: 'base64';
  base64: string;
  mediaType: 'png' | 'jpeg' | 'webp' | 'gif';
}
```

## Fields

<ParamField body="modality" type="string" required>
  Must be `"image"`.
</ParamField>

<ParamField body="detail" type="string" required>
  Detail level for image processing. One of: `"low"`, `"medium"`, `"high"`, `"auto"`.
</ParamField>

<ParamField body="value" type="ImageContentValue" required>
  Image data — either a URL reference or base64-encoded content with media type.
</ParamField>

***

## Example

```typescript theme={null}
import type { ImageContent, PromptMessage } from '@adaline/api';

const image: ImageContent = {
  modality: 'image',
  detail: 'high',
  value: {
    type: 'url',
    url: 'https://example.com/chart.png'
  }
};

const base64Image: ImageContent = {
  modality: 'image',
  detail: 'auto',
  value: {
    type: 'base64',
    base64: 'iVBORw0KGgoAAAANSUhEUgA...',
    mediaType: 'jpeg'
  }
};

const message: PromptMessage = {
  role: 'user',
  content: [
    { modality: 'text', value: 'Describe this image' },
    image
  ]
};
```

**JSON**:

```json theme={null}
{
  "modality": "image",
  "detail": "high",
  "value": {
    "type": "url",
    "url": "https://example.com/image.jpg"
  }
}
```

***

## Related

* [MessageContent](/docs/reference/sdk/v2/typescript/types/MessageContent) — union type that includes `ImageContent`
* [PromptMessage](/docs/reference/sdk/v2/typescript/types/PromptMessage) — uses `MessageContent[]` as its `content` field
