Valyu provides official SDKs for Python and TypeScript to help you integrate with our API seamlessly. This guide will help you get started with installing and setting up our SDKs.

Installation

Authentication

Both SDKs require an API key for authentication. You can obtain your API key from your Valyu dashboard.

Setting up your API Key

First, set your API key as an environment variable:

Initializing the Client

You can then initialize the client without explicitly passing the API key:

Available Features

The Valyu SDK provides access to the following features:

  1. Context Search - Search and retrieve relevant context from our knowledge base
  2. More features coming soon…

Quick Start

Let’s see how to use the context search feature with a simple example:

For detailed documentation on each feature, please refer to their respective pages:

Error Handling

The SDKs provide comprehensive error handling for different types of responses:

  • HTTP 400: Bad request errors
  • HTTP 206: Partial content responses
  • Success status in response body