If I use the API to send a prompt to the completion endpoint, will the model do a web search?

I have an application with sensitive information that I do not want to leak into LLM models as training data or into systems outside of my customer and OpenAI. OpenAI says that data I send through the API is not used for training, so that is good. But, I can imagine if a model did a web search then it might compose search queries with my sensitive data and thus it could leak into systems that are processing that query.

Is the web search feature “opt in”? That is, if I don’t tell the model to do a web search, then is not going to do one?

not sure if it helps, but this page talks about the search functionality: https://platform.openai.com/docs/guides/tools-web-search?api-mode=chat

also, this topic has been covered here: Does the openai API get access to the data I send it or store the data

You need to explicitly ENABLE web search as a tool. It is NOT on by default.