Documentation

Web Search

Web Search is a basic online search tool that helps your large model obtain real-time public online information (such as news, products, weather, etc.).

Core Capabilities

  • Flexible search modes: Supports forced search and intent recognition. With intent recognition enabled, the model will autonomously decide whether to perform an online search without manual triggering.

  • Early search source return: In the streaming response, the first packet will return all search sources.

  • Hybrid multi-tool invocation: Can work with custom functions and tools; the model will automatically determine invocation priority and necessity.

  • Flexible response modes: Supports both streaming and non-streaming responses, and both methods will return search and summary content.

Quick Start

The Web Search Plugin must be activated prior to use.

Enable the Service

  1. Go to Console → Plugin Management, and activate the Web Search Plugin.

  2. Web Search Plugin fee, refer to the Pricing. Note: Search invocation is determined by the model. A single search round (if required by the model) may initiate multiple keywords concurrently, resulting in multiple invocations of the Internet Content Plugin. You may use the max_keyword parameter to limit the maximum number of keywords per search round, thereby further controlling invocation frequency and costs.

Note:For preparations such as obtaining an API Key, please refer to First API Call.

Sample Code

import os
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.6-pro",
    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": "武汉明天天气怎么样?"
        }
    ],
    max_completion_tokens=1024,
    temperature=1.0,
    top_p=0.95,
    stream=False,
    stop=None,
    frequency_penalty=0,
    presence_penalty=0,
    extra_body={
        "thinking": {"type": "disabled"}
    },
    tools=[
        {
            "type": "web_search",
            "max_keyword": 3,
            "force_search": True,
            "limit": 1,
            "user_location": {
                "type": "approximate",
                "country": "China",
                "region": "Hubei",
                "city": "Wuhan"
            }
        }
    ],
    tool_choice="auto"
)

print(completion.model_dump_json())

Response

{
    "id": "9ffcbd3a-d3a2-4788-9edd-d8a79e47ae15_33e773cc83af482aa0b41b9fd120fdf1",
    "choices": [
        {
            "finish_reason": "stop",
            "index": 0,
            "message": {
                "content": "武汉明天(9月23日)将以阴天为主,局部有阵雨,气温在22~25℃之间。受冷空气影响,近期气温有所回落,体感偏凉,出门建议携带雨具并适当添衣。",
                "role": "assistant",
                "annotations": [
                    {
                        "type": "url_citation",
                        "url": "https://www.weather.com.cn/weather/101200101.shtml",
                        "title": "武汉天气预报,武汉7天天气预报,武汉15天天气预报,武汉天气查询",
                        "summary": " 武汉天气预报,及时准确发布中央气象台天气信息,便捷查询武汉今日天气,武汉周末天气,武汉一周天气预报,武汉 …",
                        "site_name": "中国天气网",
                        "publish_time": "2026-09-21T08:32:25.0000000",
                        "logo_url": "https://weather.com.cn/favicon.ico"
                    },
                    {
                        "type": "url_citation",
                        "url": "https://www.qweather.com/weather/wuhan-101200101.html",
                        "title": "武汉市天气 空气质量 降水 预警以及武汉市历史天气 | 和风天气",
                        "summary": "2级 东北风56%相对湿度弱紫外线24°体感温度25km能见度0.0mm降水量1015hPa大气压24小时预报   5am    7am    8am    9am    11am    1pm    2pm    3pm    5pm    7pm    8pm    9pm    11pm    1am    2am    3am 温度 查看完整天气地图  未来预报今天09月15日 29°  22° 周三09月16日 26°  18° 周四09月17日 22°  18° 周五09月18日 24°  21° 周六09月19日 28°  23° 周日09月20日 31°  24° 周一09月21日 32°  22°   30天预报  空气质量优 34 PM2.5 39 PM10 92 O3 0.7 CO 11 SO2 17 NO2  预报和更多  太阳现在04:45现在04:45高度角-18°方位75°ENE月亮 蛾眉月 现在04:45现在04:45高度角-64°方位68°ENE生活指数舒适度指数较舒适洗车指数较适宜穿衣指数热感冒指数少发运动指数较不宜旅游指数适宜紫外线指数弱空气污染扩散指数良武汉市的历史天气  更多历史天气  武汉市气象概述武汉属亚热带季风气候区武汉稳定≥10℃活动积温在5000℃~5300℃之间,年无霜期240天。温度 查看完整天气地图  卫星云图天气排行  今日最高温    空气质量...",
                        "site_name": "和风天气",
                        "publish_time": "2026-09-15T00:00:00.0000000",
                        "logo_url": "https://www.qweather.com/favicon.ico"
                    },
                    {
                        "type": "url_citation",
                        "url": "https://www.sina.cn/news/article/comos_nishzsi2828295.html",
                        "title": "武汉未来一周天气预报:晴好升温至33℃,下周初阵雨来袭+FAQ|武汉天气|一周天气预报|武汉未来7天|武汉温度|武汉降雨_新浪新闻",
                        "summary": "和风天气30天预报指出,未来一周最高温出现在9月25日(33℃),最低温出现在9月... 🌡️ 最高33℃❄️ 最低21℃☀️ 晴好为主🌧️ 阵雨2天🍃 风力1-2级  | 日期 | 天气 | 气温(℃) | 风力 | 空气质量 |  |-----|-----|-----|-----|-----|  | 9月19日(周六) | 晴转多云 | 21~27 | 东北风2级 | 优 |   | 9月20日(周日) | 多云 | 22~30 | 北风1级 | 良 |   | 9月21日(周一) | 阴转阵雨 | 22~29 | 东北风2级 | 优 |   | 9月22日(周二) | 阴 | 22~25 | 东北风2级 | 优 |   | 9月23日(周三) | 多云 | 21~27 | 东北风1级 | 优 |   | 9月24日(周四) | 阴转多云 | 23~30 | 东北风1级 | 良 |   | 9月25日(周五) | 多云转中雨 | 24~33 | 北风1级 | 优|   数据来源:综合天气网、和风天气、全国天气网、2345天气预报(2026年9月19日发布) 02降雨分布:仅21日、25日有阵雨 ⏰ 出行提醒  9月21日(周一)阵雨伴雷电,建议错峰出行或备雨具  9月25日(周...",
                        "site_name": "新浪新闻",
                        "publish_time": "2026-09-19T06:13:50.0000000",
                        "logo_url": "https://sina.cn/favicon.ico"
                    }
                ],
                "tool_calls": null
            }
        }
    ],
    "created": 1790008349,
    "model": "mimo-v2.6-pro",
    "object": "chat.completion",
    "usage": {
        "completion_tokens": 60,
        "prompt_tokens": 1476,
        "total_tokens": 1536,
        "completion_tokens_details": {
            "reasoning_tokens": 0
        },
        "prompt_tokens_details": {
            "cached_tokens": 0
        },
        "web_search_usage": {
            "tool_usage": 3,
            "page_usage": 3
        }
    }
}

For detailed parameters and invocation instructions, please refer to the OpenAI Chat Completions API. Other API protocols are not supported for the time being.

Supported models

Currently, the mimo-v2.6-flash, mimo-v2.6-pro, mimo-v2.6-pro-ultraspeed models are supported.

Price

The billing for the Web Search Plugin consists of the following two parts:

  • Usage of Web Search: The number of times internet resources appear in one response of the Internet Service Plugin.

  • Cost per 1,000 calls from the Web Search tool: China ¥16 / 1K requests、Overseas $5 / 1K requests.

When invoking Web Search via API, one search round will initiate concurrent keyword searches according to the max_keyword value, resulting in multiple uses of this plugin.

  • Model token fee: The webpage content from internet search will be appended to the prompt, increasing the model’s input tokens. Billing is based on the model’s standard price. For price details, please refer to Pricing and Rate Limits.

FAQ

Why doesn’t the model perform a web search after enabling online search?

There may be three reasons:

  • Cache: There is a 5-minute cache period after enabling / disabling online search. The online search switch will not take effect immediately within 5 minutes.

  • Model determines no need for search: The model judges that the current query does not involve real-time information and can be answered directly with its own knowledge. To force a search, set force_search: true.

  • Model not supported: Currently, mimo-v2.6-flash, mimo-v2.6-pro, mimo-v2.6-pro-ultraspeed support web search.

Update Time October 20, 2026

Copyright©2026 Xiaomi. All Rights Reserved | Cookie Policy | Cookie Preferences

We use cookies and similar technologies of our own to ensure the proper functioning of the website, customize content according to user preferences and analyze users' interactions on the website, as well as their browsing habits. You can find more information in our Cookie Policy. Select an option or go to Cookie Settings to manage your preferences. Learn More.