# GPT 4.1 WebSearch Over Api release?

**URL:** <https://community.openai.com/t/gpt-4-1-websearch-over-api-release/1266050>\
**Category:** API\
**Tags:** web-search\
**Created:** [May 19, 2025, 8:49pm UTC](https://community.openai.com/t/gpt-4-1-websearch-over-api-release/1266050 "2025-05-19T20:49:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![whizibackend](https://avatars.discourse-cdn.com/v4/letter/w/ecccb3/32.png) [@whizibackend](https://community.openai.com/u/whizibackend)\
**Post date:** [May 19, 2025, 8:49pm UTC](https://community.openai.com/t/gpt-4-1-websearch-over-api-release/1266050/1 "2025-05-19T20:49:47Z")

</div>

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.

 ![The image displays a pricing table for "Web search" showing different costs per 1,000 calls based on the model and search context size used. (Captioned by AI)](https://us1.discourse-cdn.com/openai1/original/4X/6/8/0/680d4bed2dbefee94a8b6483994f34004d1a03a3.png)  
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?

---

<div class="post-metadata">

**Author:** ![\_j](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/_j/32/766292_2.png) [@\_j](https://community.openai.com/u/_j)\
**Post date:** [May 19, 2025, 10:48pm UTC](https://community.openai.com/t/gpt-4-1-websearch-over-api-release/1266050/2 "2025-05-19T22:48:07Z")

</div>

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

```auto
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);

```

---

<div class="post-metadata">

**Author:** ![whizibackend](https://avatars.discourse-cdn.com/v4/letter/w/ecccb3/32.png) [@whizibackend](https://community.openai.com/u/whizibackend)\
**Post date:** [May 20, 2025, 8:57pm UTC](https://community.openai.com/t/gpt-4-1-websearch-over-api-release/1266050/3 "2025-05-20T20:57:34Z")

</div>

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