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.