File search calls currently charges 0.0025 per call as per the docs.
However, on my use case I made some tests this week, daily usage shows:
1 request = <0.01$
4 requests = 0.04$
9 requests = 0.06$
1 request = 0.02$
These are for individual days of usage and I couldn’t make sense out of it. Especially for different days 1 request sometimes charge <0.01, sometimes 0.02.
How is the file search tool call pricing actually calculated? Is this a rounding error?
The AI has an internal tool iterator. It can call tools multiple times.
The file search tool provides NO information to the AI about what is in a vector store, meaning that it can make multiple exploratory searches.
In addition, there is an injected message added by OpenAI before every user input that says “the user has uploaded files…”, which is typically contrary to how the vector store is going to be used by a developer. This additional bad pattern makes the AI likely to not believe the results when the user is asking a question that supposedly could be answered by some files it was just told about, and then it makes multiple searches.
Multiple queries can be made in a list in one tool use, which the AI is told to do in the tool instructions which you cannot alter.
Thus: the responses endpoint has internal tools that in each case are worse than what you would provide yourself, in operation and in implementation, and you are left paying for these failings.