GPT 4.1 WebSearch Over Api release?

When I try using any of the GPT 4.1 over API with websearch API, I get an error code 400:
Code snippet:

** const completion = await client.chat.completions.create({**
** model: “gpt-4.1”,**
** web_search_options: {**
** search_context_size: “low”,**
** },**
** messages: [{**
** “role”: “user”,**
** “content”: query,**
** }],**
** });**

Logs:
Sending request to OpenAI…
Error: 400 Web search options not supported with this model.


But clearly from OpenAI docs it shows 4.1 as a model that has web search, is the web search variant just not released yet?

You are using parameters wrong and have confabulation of methods so bad I’m not even sure what language you are attempting. Web search is a “tool”, only available on the Responses endpoint.

API reference, using node.js SDK

import OpenAI from "openai";

const openai = new OpenAI();

const response = await openai.responses.create({
    model: "gpt-4.1",
    tools: [{ type: "web_search_preview" }],
    input: "What was a positive news story from today?",
});

console.log(response);

yea that was the problem, I didnt realize it only worked over responses EndPoint, thank you!