#!/usr/bin/env bash set -eo pipefail cd "$(dirname "$0")/../../.." source scripts/lib.sh MODEL="${MODEL:-claude-haiku-4-5-20251001}" # web_fetch_20250910 (GA, no beta header) with citations. The URL must already appear in the conversation (user message here). # STATUS: LIVE_VERIFIED 2026-09-18 (d1: web_fetch_result document text/plain title "Example Domain", web_fetch_requests=1, ~$0.004). R=$(ant POST /v1/messages -d "$(jq -n --arg m "$MODEL" '{model:$m,max_tokens:200,tools:[{type:"web_fetch_20250910",name:"web_fetch",max_uses:1,citations:{enabled:true},max_content_tokens:2000}],messages:[{role:"user",content:"Fetch https://example.com and tell me the page title in 3 words."}]}')") log_request anthropic POST /v1/messages "$ANT_STATUS" 0.004 "web-fetch/web_fetch.sh" echo "$R" | jq -c '.usage.server_tool_use, (.content[]|{type,name,input,result:(.content|objects|{type,url,retrieved_at,title:.content.title,error_code}),text})'