gpt-4o-mini-search-preview · OpenAI
Using the Chat Completions API, you can directly access the fine-tuned models and tool used by Search in ChatGPT. When using Chat Completions, the model always retrieves information from the web before responding to your query. To use web_search_preview as a tool that models like gpt-4o and gpt-4o-mini invoke only when necessary, switch to using the Responses API. Currently, you need to use one of these models to use web search in Chat Completions: gpt-4o-search-preview gpt-4o-mini-search-preview Web search parameter example import OpenAI from "openai"; const client = new OpenAI(); const completion = await client.chat.completions.create({ model: "gpt-4o-search-preview", web_search_options: {}, messages: [{ "role": "user", "content": "What was a positive news story from today?" }], }); console.log(completion.choices[0].message.content); Output and citations The API response item in the choices array will include: message.content with the text result from the model, inclusive of any inline citations annotations with a list of cited URLs By default, the model's response will include inline citations for URLs found in the web search results. In addition to this, the url_citation annotation object will contain the URL and title of the cited source, as well as the start and end index characters in the model's response where those sources were used.
Using the Chat Completions API, you can directly access the fine-tuned models and tool used by Search in ChatGPT. When using Chat Completions, the model always retrieves information from the web before responding to your query. To use web_search_preview as a tool that models like gpt-4o and gpt-4o-mini invoke only when necessary, switch to using the Responses API. Currently, you need to use one of these models to use web search in Chat Completions: gpt-4o-search-preview gpt-4o-mini-search-preview Web search parameter example import OpenAI from "openai"; const client = new OpenAI(); const completion = await client.chat.completions.create({ model: "gpt-4o-search-preview", web_search_options: {}, messages: [{ "role": "user", "content": "What was a positive news story from today?" }], }); console.log(completion.choices[0].message.content); Output and citations The API response item in the choices array will include: message.content with the text result from the model, inclusive of any inline citations annotations with a list of cited URLs By default, the model's response will include inline citations for URLs found in the web search results. In addition to this, the url_citation annotation object will contain the URL and title of the cited source, as well as the start and end index characters in the model's response where those sources were used.
GPT 4o Mini Search Preview has a 128,000 token context window.
On AIHubMix, GPT 4o Mini Search Preview costs $0.15 per million input tokens and $0.6 per million output tokens. Cached input reads are billed at $0.075 per million tokens.
GPT 4o Mini Search Preview accepts text and image input.
GPT 4o Mini Search Preview supports web search, function calling and structured outputs. Per-protocol parameter support is listed in the capability table on this page.
GPT 4o Mini Search Preview is available through the AIHubMix unified API. The API is OpenAI-compatible: point your OpenAI SDK at https://aihubmix.com/v1, use your AIHubMix API key, and set the model name to gpt-4o-mini-search-preview — no other code changes needed.
GPT 4o Mini Search Preview is developed by OpenAI. AIHubMix aggregates it alongside models from other providers behind one API and one bill.
GPT-6.1 Sol is OpenAI's latest model in the GPT-6 series, specifically designed for…
GPT-6 Luna is OpenAI's latest and most efficient model, designed for focused…
GPT-6 Sol is OpenAI's latest model in the GPT-6 series, specifically designed for complex…
GPT-6 Astra is OpenAI's newest and most intelligent model, with industry-leading…
OpenAI's latest realtime speech-to-text model, built for low-latency use — it streams…
GPT-Realtime-2.1 is a reasoning speech-to-speech model for the Realtime API, with tool…
Use GPT 4o Mini Search Preview via the AIHubMix unified API — one interface for every major LLM.