데이터 API / Anthropic Web Search / Search
Model-grounded web search (Anthropic).
Generate a cited answer with Claude and web search. Supply messages and max_tokens. The model and web_search tool are managed by the service; max_uses bounds the number of searches. The response is an Anthropic Messages object with tool-use, search-result and text blocks. usage reports resource consumption, not a Felo charge.
파라미터
경로, 쿼리, 헤더 파라미터가 없습니다.
요청 본문
messagesobject[]필수Conversation messages, same format as the Anthropic Messages API. The user turn holds your question.
rolestring선택허용 값: user · assistant
contentstring선택Message text. Structured content blocks are also accepted.
max_tokensinteger필수Maximum number of tokens to generate in the answer. Required by the upstream Messages API.
systemstring선택Optional system prompt to steer the answer's tone or format.
요청 예시
curl -X POST "https://openapi.felo.ai/v1/beta/anthropic-websearch/search" \
-H "Authorization: Bearer $FELO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"messages": [
{}
],
"max_tokens": 0,
"system": "<string>"
}'응답
응답 필드
idstring선택typestring선택rolestring선택stop_reasonstring선택contentobject[]선택Ordered blocks: server_tool_use (search queries), web_search_tool_result (sources), and text (the cited answer).
usageobject선택input_tokensinteger선택output_tokensinteger선택cache_read_input_tokensinteger선택cache_creation_input_tokensinteger선택server_tool_useobject선택web_search_requestsinteger선택Billed web search count.