Installation
Environment Setup
To use the SDK, you’ll need to set up your API key in your environment:Basic Usage
Input Parameters
Parameter | Type | Required | Description | ||
---|---|---|---|---|---|
query | str | Yes | The question or topic you want information on | ||
search_type | str | Yes | Type of search: “proprietary”, “web”, or “all” | ||
data_sources | List[str] | No | Specific indices or URLs to search | ||
over (e.g., [“valyu/valyu-arxiv”, “https://www.valyu.network/”]) | |||||
max_num_results | int | No | Number of results to return after reranking | ||
(default: 10) | similarity_threshold | float | No | Minimum similarity | |
score for results (default: 0.5) | query_rewrite | bool | No | Whether | |
to rewrite query for better performance (default: True) | max_price | ||||
float | Yes | Maximum allowed price for a thousand queries (CPM) |
Response Structure
Examples
Searching All Sources with Custom Parameters
Searching All Sources with Custom Parameters
Web-Only Search with Price Limit
Web-Only Search with Price Limit
Using Transaction ID for Feedback
Using Transaction ID for Feedback