Give your AI the power of sight. Analyze images, extract text, understand visual content, and reason about what's in a picture.
Describe scenes, identify objects, understand context
Read and extract text from images and documents
Answer questions about image content
Interpret graphs, charts, and diagrams
Identify and locate objects within images
Recognize artistic styles, colors, and composition
from mythicdot import MythicDot
import base64
client = MythicDot()
# Option 1: URL
response = client.chat.completions.create(
model="mythic-4",
messages=[
{
"role": "user",
"content": [
{"type": "text", "text": "What's in this image?"},
{
"type": "image_url",
"image_url": {"url": "https://example.com/photo.jpg"}
}
]
}
]
)
# Option 2: Base64
with open("image.png", "rb") as f:
image_data = base64.b64encode(f.read()).decode()
response = client.chat.completions.create(
model="mythic-4",
messages=[
{
"role": "user",
"content": [
{"type": "text", "text": "Describe this image"},
{
"type": "image_url",
"image_url": {
"url": f"data:image/png;base64,{image_data}"
}
}
]
}
]
)
Give your AI applications the power of vision.