Quickstart

Make your first request to Valyu

Create and Setup Your API Key

Get your Valyu API key and set it up for authentication.

Create a .env File

Create a file called .env in the root of your project and add the following line:

Valyu_API_KEY="your_api_key"

Make an API Request

Use our Python or call the API directly with cURL.

Install the Python SDK

pip install valyu

Once you’ve installed the SDK, create a file called valyu.py and add the following code:

from valyu import Valyu

valyu = Valyu()

query = "What is positional encoding in transformers"

response = valyu.context(
    query=query,
    search_type="proprietary",
    num_query=5,
    num_results=3,
    max_price=10
)

print(response)

Last updated

Was this helpful?