Felo API PlatformFelo API Platform

資料 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.