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

# Anthropic Vision

> Send multimodal images to Claude models using Base64 source blocks and URLs.

The `/anthropic/v1/messages` endpoint supports document and visual processing using standard [Anthropic](https://www.anthropic.com/?utm_source=neosantara-docs\&utm_medium=referral) image content blocks.

```python Python (Anthropic SDK - Base64) icon="python" theme={"theme":{"light":"catppuccin-latte","dark":"ayu-dark"}}
from anthropic import Anthropic
import base64
import os

client = Anthropic(
    base_url="https://api.neosantara.xyz/anthropic",
    api_key=os.environ["NEOSANTARA_API_KEY"]
)

with open("architecture_diagram.png", "rb") as img_file:
    image_data = base64.b64encode(img_file.read()).decode("utf-8")

response = client.messages.create(
    model="claude-sonnet-4-6",
    max_tokens=1024,
    messages=[
        {
            "role": "user",
            "content": [
                {
                    "type": "image",
                    "source": {
                        "type": "base64",
                        "media_type": "image/png",
                        "data": image_data
                    }
                },
                {
                    "type": "text",
                    "text": "Explain data flow between system components in this diagram."
                }
            ]
        }
    ]
)

print(response.content[0].text)
```

```bash cURL icon="terminal" theme={"theme":{"light":"catppuccin-latte","dark":"ayu-dark"}}
curl -X POST https://api.neosantara.xyz/anthropic/v1/messages \
  -H "x-api-key: $NEOSANTARA_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-4-6",
    "max_tokens": 1024,
    "messages": [
      {
        "role": "user",
        "content": [
          {
            "type": "image",
            "source": {
              "type": "url",
              "url": "https://images.unsplash.com/photo-1551288049-bebda4e38f71"
            }
          },
          {
            "type": "text",
            "text": "Analyze this chart."
          }
        ]
      }
    ]
  }'
```

## Supported Media Types

* `image/jpeg`
* `image/png`
* `image/gif`
* `image/webp`

Maximum file size is 20 MB per image.

## Next Steps

| Task | Guide |
| :- | :- |
| OpenAI Vision | [OpenAI Vision](https://docs.neosantara.xyz/en/gateway/chat-completions/vision.md) |
| Document OCR | [Document OCR](https://docs.neosantara.xyz/en/gateway/capabilities/ocr.md) |
| Extended Thinking | [Extended Thinking](https://docs.neosantara.xyz/en/gateway/anthropic-messages/thinking.md) |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.