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

# Install and Authenticate

> Install synth-ai and configure API keys, backend URLs, and client construction.

Install `synth-ai` in a Python environment. Add the **`research`** extra for Managed
Research and Research Factory (`client.research`):

```bash theme={null}
uv add "synth-ai[research]==0.13.0"
```

For one-off commands:

```bash theme={null}
uvx synth-ai --help
```

## API key

Set `SYNTH_API_KEY`:

```bash theme={null}
export SYNTH_API_KEY="sk_..."
```

Then construct the client:

```python theme={null}
from synth_ai import SynthClient

client = SynthClient()
```

You can also pass the key explicitly:

```python theme={null}
client = SynthClient(api_key="sk_...")
```

## Base URL

The SDK uses the production backend by default. Use `base_url` for local, staging, or private backend targets.

```python theme={null}
client = SynthClient(
    api_key="sk_...",
    base_url="http://127.0.0.1:8000",
)
```

The CLI accepts `--backend-url` and also reads `SYNTH_BACKEND_URL`.

```bash theme={null}
synth-ai containers list --backend-url http://127.0.0.1:8000
```

## Smoke test

```python theme={null}
from synth_ai import SynthClient

client = SynthClient()
print(client.research.get_limits())
print(client.tunnels.health())
```

If auth fails, check that `SYNTH_API_KEY` is present and belongs to the expected workspace.
