News 2 min read

Web search in the Responses API for GPT models

GPT models in llmbox can search the web through the built-in web_search tool in the Responses API. Here is how to turn search on and account for token usage.

Web search in the Responses API for GPT models

Change of October 22, 2026

On October 22, 2026, web search became available for GPT models in /v1/responses. To let the model look things up online, add the built-in web_search tool to the request. You don't need a separate search service or a key for one.

How to enable it

The tool goes in the tools list:

bash
curl https://llmbox.cc/v1/responses \
  -H "Authorization: Bearer $LLMBOX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-6-sol",
    "input": "What is the latest stable version of Python right now?",
    "tools": [{"type": "web_search"}]
  }'

The same thing through the official SDK:

python
import os
from openai import OpenAI

client = OpenAI(base_url="https://llmbox.cc/v1", api_key=os.environ["LLMBOX_API_KEY"])
resp = client.responses.create(
    model="openai/gpt-6-sol",
    input="What is the latest stable version of Python right now?",
    tools=[{"type": "web_search"}],
)
print(resp.output_text)

Each search arrives in output as a separate web_search_call item, followed by the model's answer as a message item. If you want a search every time rather than at the model's discretion, set "tool_choice": {"type": "web_search"}.

Web search works on the GPT models in the catalog, for example GPT-6 Sol, GPT-6 Luna and GPT-6.1 Sol. You can use it in the Responses API through /v1/responses.

How search affects usage

There is no separate fee for search. The model reads the pages it finds as input tokens: they are counted in usage.input_tokens and billed at the model's input rate. A single search typically uses 3 to 5 thousand tokens, and a multi-part question can trigger several searches in one answer, so usage grows with their number. Rates and the calculator are on the model's page in the catalog.

Practical tips

  • A response with several searches takes longer than usual, so "stream": true is a better fit for such requests.
  • Send the full conversation history in input with every request: no state is kept on the model side.

For more, see the Responses and Request parameters documentation pages.

Published November 15, 2026

One key — every model

GPT, Gemini, DeepSeek, Qwen, video and audio. Pay as you go.

Create a key