from openai import OpenAI
client = OpenAI(
api_key=os.environ.get("MIMO_API_KEY"),
base_url="https://api.xiaomimimo.com/v1"
)
completion = client.chat.completions.create(
model="mimo-v2-omni",
messages=[
{
"role": "system",
"content": "You are MiMo, an AI assistant developed by Xiaomi. Today is date: Tuesday, December 16, 2025. Your knowledge cutoff date is December 2024."
},
{
"role": "user",
"content": [
{
"type": "video_url",
"video_url": {
"url": "https://example-files.cnbj1.mi-fds.com/example-files/video/video_example.mp4"
},
"fps": 2,
"media_resolution": "default"
},
{
"type": "text",
"text": "please describe the content of the video"
}
]
}
],
max_completion_tokens=1024
)
print(completion.model_dump_json())
{
"id": "2cb45ce8504441c29f0601de5e5b61ff",
"choices": [
{
"finish_reason": "stop",
"index": 0,
"message": {
"content": "The video features a small, fluffy white kitten sitting on a polished wooden floor. The kitten is positioned near a window draped with light-colored, textured curtains. Bright sunlight streams through the window, casting distinct shadows and illuminating the kitten's fur. The kitten looks towards the left side of the frame and occasionally licks its nose or lips. In the background, to the right, a potted green plant with large leaves, resembling a Monstera, is visible against a plain wall. The overall scene is bright and peaceful.",
"role": "assistant",
"tool_calls": null,
"reasoning_content": "The user wants a description of the video provided.\n1. **Analyze the video:**\n* **Subject:** A white kitten.\n* **Action:** The kitten is sitting on a wooden floor, looking towards the left side of the frame. It occasionally licks its lips or nose.\n* **Setting:** Indoors, near a window with light-colored curtains. Sunlight is streaming in, creating shadows on the floor. There is a plant in the background (Monstera)."
}
}
],
"created": 1773831625,
"model": "mimo-v2-omni",
"object": "chat.completion",
"usage": {
"completion_tokens": 210,
"prompt_tokens": 1278,
"total_tokens": 1488,
"completion_tokens_details": {
"reasoning_tokens": 101
},
"prompt_tokens_details": {
"audio_tokens": 20,
"cached_tokens": 47,
"video_tokens": 1170
}
}
}
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ.get("MIMO_API_KEY"),
base_url="https://api.shubiaobiao.com/v1"
)
completion = client.chat.completions.create(
model="mimo-v2-omni",
messages=[
{
"role": "system",
"content": "You are MiMo, an AI assistant developed by Xiaomi. Today is date: Tuesday, December 16, 2025. Your knowledge cutoff date is December 2024."
},
{
"role": "user",
"content": [
{
"type": "video_url",
"video_url": {
"url": "https://example-files.cnbj1.mi-fds.com/example-files/video/video_example.mp4"
},
"fps": 2,
"media_resolution": "default"
},
{
"type": "text",
"text": "please describe the content of the video"
}
]
}
],
max_completion_tokens=1024
)
print(completion.model_dump_json())
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ.get("MIMO_API_KEY"),
base_url="https://api.shubiaobiao.com/v1"
)
completion = client.chat.completions.create(
model="mimo-v2-omni",
messages=[
{
"role": "system",
"content": "You are MiMo, an AI assistant developed by Xiaomi. Today is date: Tuesday, December 16, 2025. Your knowledge cutoff date is December 2024."
},
{
"role": "user",
"content": [
{
"type": "video_url",
"video_url": {
"url": "data:{MIME_TYPE};base64,$BASE64_VIDEO"
},
"fps": 2,
"media_resolution": "default"
},
{
"type": "text",
"text": "please describe the content of the video"
}
]
}
],
max_completion_tokens=1024
)
print(completion.model_dump_json())