Vision in Text Models
🏝️ Image analysis
import requests
import json # for getting a structured output with indentation
response = requests.post(
url = "https://api.aimlapi.com/v1/chat/completions",
headers = {
# Insert your AIML API Key instead of <YOUR_AIMLAPI_KEY>:
"Authorization": "Bearer <YOUR_AIMLAPI_KEY>",
"Content-Type": "application/json"
},
json = {
"model": "alibaba/qwen3.5-omni-flash",
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "Describe the content of this image."
},
{
"type": "image_url",
"image_url": {
"url": "https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/handwriting.jpg"
}
}
]
}
]
}
)
data = response.json()
print(json.dumps(data, indent=2, ensure_ascii=False))🎦 Video analysis
Last updated
Was this helpful?