SylphxModels

Hosted tools

Hosted tools run on the platform, initiated by the model inside the same request. You declare what is available, the model decides when to use it, and the stream shows you a real trajectory — searching, fetched pages, discovered tools — before the turn continues.

How hosted tools workLink to this section

Five rules describe every hosted tool. They exist so that a request cannot be quietly rewritten behind your back.

  • Listing is not execution. Declaring web_search advertises it. With the default tool_choice: auto, the model chooses whether to call it — the platform never searches before a model call.
  • The model authors the arguments. Even a forced tool_choice only constrains the model’s next call; the query or URL is always model-authored, never a copy of your raw message.
  • One loop, one terminal. Tool activity is an item on the way to the assistant answer. The same stream continues after each tool round and ends exactly once.
  • Zero results is a valid outcome. An empty search is reported as an empty search, not an error and not a reason to silently try another engine.
  • Failures stay typed. A tool that cannot run under your policy fails before it is dispatched, instead of quietly running with fewer constraints.

web_fetchLink to this section

web_fetch opens one URL that the model chose and returns page content to the model. It is a hosted extension with its own declaration; you observe it as a web_search_call with an open_page action.

Declare web_fetch
{
  "model": "openai/gpt-5.5",
  "input": "Read https://example.com/pricing and list the plans.",
  "tools": [
    { "type": "web_fetch", "engine": "firecrawl" }
  ]
}
  • web_fetch accepts only type and engine. Source filters are inherited from the web_search declaration in the same request.
  • Pages are bounded (1 MiB per returned page) and extracted as clean markdown before they reach the model.
  • The observation is a web_search_call whose action is {"type":"open_page","url":…}. There is no invented web_fetch_call item.
  • A fetch engine that cannot satisfy a requested constraint (for example cache-only retrieval) is not used for that call.

datetimeLink to this section

datetime gives the model deterministic awareness of the current date and time with no external provider call — useful for relative dates such as “next Tuesday”.

Declare datetime
{
  "model": "openai/gpt-5.5",
  "input": "When is the next release train if releases ship every other Tuesday?",
  "tools": [
    { "type": "datetime", "timezone": "Asia/Hong_Kong" }
  ]
}
  • The timezone is an optional IANA name such as Asia/Hong_Kong; it defaults to UTC.
  • Execution happens inside the platform with no external API call, so it adds no tool round trip to a provider.

What you observeLink to this section

Tool activity appears on the same response and the same stream as everything else. On a streaming request, each call reports its progress before the answer continues.

SSE · hosted search trajectory
event: response.web_search_call.in_progress
event: response.web_search_call.searching
event: response.web_search_call.completed
data: {"type":"response.web_search_call.completed","item":{
          "type":"web_search_call","status":"completed",
          "action":{"type":"search","query":"…"},"results":[…]}}

# then the assistant continuation, still the same request:
event: response.output_text.delta
event: response.completed
  • Non-streaming responses carry the same items inside output, in order.
  • A completed search may add URL citations to the assistant text; the sources it used can be requested with the include field.
  • Tool results are evidence for the model — they are never rewritten into instructions, and they never end the turn on their own.

SamplesLink to this section

A complete request with search and fetch declared, and a streaming client that reacts to search events.

curl -N https://api.models.sylphx.ai/v1/responses \
  -H "Authorization: Bearer $SYLPHX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-5.5",
    "input": "What changed in the latest release? Cite the pages you used.",
    "tools": [
      {
        "type": "web_search",
        "engine": "auto",
        "filters": { "allowed_domains": ["example.com"] },
        "search_context_size": "medium"
      },
      { "type": "web_fetch", "engine": "exa" }
    ],
    "stream": true
  }'

Tool failures surface on the same typed error envelope as everything else — see errors and retries.