> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vals.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# SDK Setup

## Installation

Make sure you have the Vals Python Package installed

```
pip install valsai
```

## Authentication

Create an [API key](/cli/cli#authentication) in the web app, then set it as an environment variable:

```bash theme={null}
export VALS_API_KEY="your-api-key"
```

Alternatively, you can configure credentials programmatically:

```python theme={null}
from vals import configure_credentials

configure_credentials(api_key="your-api-key")
```

### EU Region

If you are using the EU platform, set the `VALS_REGION` environment variable:

```bash theme={null}
export VALS_REGION="europe"
```

Or configure it programmatically:

```python theme={null}
configure_credentials(api_key="your-api-key", in_eu=True)
```

### Custom Endpoint

For custom deployments, you can set the `VALS_ENDPOINT` environment variable:

```bash theme={null}
export VALS_ENDPOINT="https://your-org.platform.vals.ai"
```

Or pass it programmatically:

```python theme={null}
configure_credentials(api_key="your-api-key", endpoint="https://your-org.platform.vals.ai")
```

## Prerequisites

This guide assumes you are familiar with the basic concepts of Test Suites, Tests, Checks, etc. If not, see the [Test Suite Creation Page](/web_app/creating_test_suites).

## Async Note

All SDK functions are asynchronous, so you will need to call them from an asynchronous context. For example:

```python theme={null}
import asyncio
from vals import Suite

async def main():
    suite = await Suite.from_id("your-suite-id")
    print(suite.title)

asyncio.run(main())
```

See [the async docs](https://docs.python.org/3/library/asyncio.html) for more information.
