Web Search
Enable web search capabilities in MiMo models for real-time information retrieval.
MiMo-V2-Pro, MiMo-V2-Omni, and MiMo-V2-Flash support built-in web search, allowing the model to retrieve up-to-date information from the internet during a conversation.
Enabling Web Search
To enable web search, add the web search tool in your API request:
from openai import OpenAI
client = OpenAI(
api_key="your_mimo_api_key",
base_url="https://api.mimo-v2.com/v1"
)
completion = client.chat.completions.create(
model="mimo-v2-pro",
messages=[
{"role": "user", "content": "What are the latest news about AI?"}
],
tools=[
{
"type": "function",
"function": {
"name": "web_search",
"description": "Search the web for current information",
"parameters": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "The search query"
}
},
"required": ["query"]
}
}
}
],
tool_choice="auto"
)Pricing
Web search is billed at $5.25 per 1,000 web search calls, in addition to the standard token-based pricing for the model used.
How It Works
When web search is enabled:
- The model analyzes the user's query to determine if a web search is needed.
- If needed, the model generates a search query and invokes the
web_searchtool. - Search results are automatically parsed and included in the model's context.
- The model synthesizes the search results to provide an informed response.
Web search results are automatically parsed and injected into the model's context. You do not need to handle the tool call response manually.
MiMo API Docs