Felo API PlatformFelo API Platform

Data 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.