Felo API PlatformFelo API Platform
v0.1.0-beta
OpenAPI 3.1.0

Model-grounded web search (Anthropic).

Server:https://openapi.felo.ai
Client Libraries

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.

Body
required
application/json
  • max_tokens
    Type: integer
    required

    Maximum number of tokens to generate in the answer. Required by the upstream Messages API.

  • messages
    Type: array object[]
    required

    Conversation messages, same format as the Anthropic Messages API. The user turn holds your question.

    • content
      Type: string

      Message text. Structured content blocks are also accepted.

    • role
      Type: string enum
      values
      • user
      • assistant
  • system
    Type: string

    Optional system prompt to steer the answer's tone or format.

Responses
  • 200
    Type: object

    A standard Anthropic Messages response. content[] interleaves the searches performed and the cited answer; usage.server_tool_use.web_search_requests is the billed search count.

    • content
      Type: array object[]

      Ordered blocks: server_tool_use (search queries), web_search_tool_result (sources), and text (the cited answer).

      Empty object
    • id
      Type: string
    • role
      Type: string
    • stop_reason
      Type: string
    • type
      Type: string
    • usage
      Type: object
      • cache_creation_input_tokens
        Type: integer

        Integer numbers.

      • cache_read_input_tokens
        Type: integer

        Integer numbers.

      • input_tokens
        Type: integer

        Integer numbers.

      • output_tokens
        Type: integer

        Integer numbers.

      • server_tool_use
        Type: object
        • web_search_requests
          Type: integer

          Billed web search count.

    application/json
  • 400

    The request could not be processed. Check the request parameters.

  • 401

    A valid Felo API key is required.

  • 402

    The request cannot proceed because a billing requirement is not met.

  • 403

    The account is not permitted to perform this operation.

  • 429

    A request or spending limit has been reached.

  • 502

    The service could not complete the request.

  • 503

    The API or billing service is temporarily unavailable.

  • 504

    The service timed out while processing the request.

  • default

    The operation failed. Keep the response request ID when contacting Felo support.

Request Example for post/v1/beta/anthropic-websearch/search
curl https://openapi.felo.ai/v1/beta/anthropic-websearch/search \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "max_tokens": 1024,
  "messages": [
    {
      "role": "user",
      "content": "What are the three biggest AI announcements this week? Give one sentence each with sources."
    }
  ]
}'
{
  "id": "string",
  "type": "message",
  "role": "assistant",
  "stop_reason": "end_turn",
  "content": [
    {}
  ],
  "usage": {
    "input_tokens": 1,
    "output_tokens": 1,
    "cache_read_input_tokens": 1,
    "cache_creation_input_tokens": 1,
    "server_tool_use": {
      "web_search_requests": 1
    }
  }
}
Model-grounded web search (Anthropic).