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

# Installation

> Install the Gradium Python SDK and get started

## Prerequisites

* **Python 3.10 or higher** - The Gradium SDK requires Python 3.10+. Check your version with:

```bash theme={null}
python3 --version
```

## Installation

```bash theme={null}
pip install gradium
```

## Quick Start

```python theme={null}
import asyncio
import gradium

async def main():
    client = gradium.client.GradiumClient(api_key="your-api-key")

    result = await client.tts(
        setup={"voice_id": "YTpq7expH9539ERJ", "output_format": "wav"},
        text="Welcome to Gradium! Transform your text into natural-sounding speech in seconds."
    )

    with open("welcome.wav", "wb") as f:
        f.write(result.raw_data)

if __name__ == "__main__":
    asyncio.run(main())
```

## Creating a Client

### Using API Key Directly

```python theme={null}
import gradium

client = gradium.client.GradiumClient(api_key="gd_your_api_key_here")
```

### Using Environment Variable

Set the `GRADIUM_API_KEY` environment variable:

```bash theme={null}
export GRADIUM_API_KEY=gd_your_api_key_here
```

Then create the client without passing the API key:

```python theme={null}
client = gradium.client.GradiumClient()
```
