Skip to main content

HTTP status

400 invalid_request_error

Typical cause

You included a hosted tool (e.g., web_search_preview, file_search) that the selected model doesn’t support.

Resolution

Remove the hosted tool from the request, or switch to a model that supports it. Function tools (type: "function") work with all models that support tool calling.