gpt-4o-search-preview

by 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.

API Pricing

Input$2.5 / 1M tokens
Output$10 / 1M tokens
Cache read$1.25 / 1M tokens

Specifications

Context window128,000 tokens
Modalitiestext, image
Featuresweb, function calling, structured outputs

FAQ

What is gpt-4o-search-preview?

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.

What is the context length of gpt-4o-search-preview?

gpt-4o-search-preview has a 128,000 token context window.

How much does gpt-4o-search-preview cost?

On AIHubMix, gpt-4o-search-preview costs $2.5 per million input tokens and $10 per million output tokens. Cached input reads are billed at $1.25 per million tokens.

What modalities does gpt-4o-search-preview support?

gpt-4o-search-preview accepts text and image input.

What features does gpt-4o-search-preview support?

gpt-4o-search-preview supports web, function calling and structured outputs. Per-protocol parameter support is listed in the capability table on this page.

How do I call gpt-4o-search-preview via API?

gpt-4o-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-search-preview — no other code changes needed.

Who develops gpt-4o-search-preview?

gpt-4o-search-preview is developed by OpenAI. AIHubMix aggregates it alongside models from other providers behind one API and one bill.

More from OpenAI

gpt-5.6-luna

by OpenAI

GPT-5.6 Luna is designed for cost-sensitive, high-volume workloads. It roughly…

$0.2/1M in · $1.2/1M out
1,050,000 tokens context

gpt-5.6-sol

by OpenAI

GPT‑5.6 Sol sets a new standard for both intelligence and efficiency, achieving…

$5/1M in · $30/1M out
1,050,000 tokens context

gpt-5.6-terra

by OpenAI

GPT-5.6 Terra is designed for workloads that balance intelligence and cost. It roughly…

$2/1M in · $12/1M out
1,050,000 tokens context

gpt-4o-transcribe-diarize

by OpenAI

GPT-4o Transcribe Diarize is an automatic speech recognition (ASR) model with built-in…

$2.5/1M in · $10/1M out
16,000 tokens context

gpt-audio-1.5

by OpenAI

The gpt-audio model is OpenAI's first officially released (generally available) audio…

$2.5/1M in · $10/1M out
128,000 tokens context

gpt-image-2

by OpenAI

GPT-image-2 is OpenAI's latest cutting-edge image generation model. Key value adds…

$5/1M in · $30/1M out

Use gpt-4o-search-preview via the AIHubMix unified API — one interface for every major LLM.