Video Inputs
Video Inputs
Using Video URLs
import requests
import json
url = "https://llm.onerouter.pro/v1/chat/completions"
headers = {
"Authorization": f"Bearer {API_KEY_REF}",
"Content-Type": "application/json"
}
messages = [
{
"role": "user",
"content": [
{
"type": "text",
"text": "Please describe what's happening in this video."
},
{
"type": "video_url",
"video_url": {
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
}
}
]
}
]
payload = {
"model": "{{MODEL}}",
"messages": messages
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())Using Base64 Encoded Videos
Supported Video Formats
Common Use Cases
Best Practices
File Size Considerations
Optimal Video Length
Quality vs. Size Trade-offs
Provider-Specific Video URL Support
Last updated