Regarding the gpt-4o-search-preview model…
This appears to be priced the same as 4o - https://platform.openai.com/docs/models/gpt-4o-search-preview
But is the token count comprised only by tokens in and tokens received, or could I be incurring any tokens incurred by the broader web search process OpenAI undertaken, ie going out and finding web pages, considering them, discarding some in order to returned the best results?
Is that the wrong way of thinking about it? Ie is it doing real live web search, or is it just using its old scraped knowledge up to the training cutoff?
2 Likes
The gpt-4o-search-preview model does not seem to have been rolled out to all users yet. The main difference between gpt-4o and gpt-4o-search-preview is likely that the latter has been specifically optimized for web search tasks.
Even if gpt-4o-search-preview is unavailable, you can still obtain responses that incorporate up-to-date web search results by using gpt-4o or gpt-4o-mini with the built-in “web_search_call” tool.
https://platform.openai.com/docs/guides/tools-web-search
The cost depends on how thoroughly the model analyzes the returned search results, which is determined by the search_context_size
parameter in your API call.
According to the pricing table, gpt-4o and gpt-4o-search-preview cost $30.00 per 1k calls at a low search context size, $35.00 at medium (the default), and $50.00 at high.
For gpt-4o-mini and gpt-4o-mini-search-preview, costs range from $25.00 to $30.00 per 1k calls depending on the context size.
Specifying a larger search_context_size
provides more detailed information but incurs a higher usage fee.
https://platform.openai.com/docs/pricing#web-search
I’m not entirely sure whether there is an additional charge for the tokens used to include search results in the response, separate from the cost of using the built-in tool. However, based on the following wording in the Pricing section, it seems likely that this cost is already included in the tool usage fees categorized as low, medium, and high.
Tool |
Cost |
Web Search |
Pricing depends on model and search context size. See details below. |
Model |
Search context size |
Cost |
gpt-4o or gpt-4o-search-preview |
low |
$30.00 (1k calls) |
|
medium (default) |
$35.00 (1k calls) |
|
high |
$50.00 (1k calls) |
gpt-4o-mini or gpt-4o-mini-search-preview |
low |
$25.00 (1k calls) |
|
medium (default) |
$27.50 (1k calls) |
|
high |
$30.00 (1k calls) |
That being said, I believe it would be desirable for OpenAI staff to provide clarification.
@dignity_for_all thanks!
I hadn’t discovered search_context_size
, though I see it now.
FYI, I was able to use the gpt-4o-search-preview
on the day it was announced.
In a world of $2.50 per million tokens with 4o
, $35 for a thousand searches (3 cents a search) seems like a huge amount. Of course, it isn’t really. For comparison, SerpAPI is $75 per month for 5,000 searches per month.
Anyway, I think my takeaway is that searches are priced per search rather than anything to do with tokens.
https://platform.openai.com/docs/pricing#web-search