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

# Python SDK Installation

> How to install and set up the Phaseo Python SDK

<Note type="warning">
  **SDKs are in very early alpha**: We're working as hard as we can to get them into a stable state. Please bear with us as we iterate rapidly.
</Note>

## Installation

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

## Requirements

* Python 3.10+

## Setup

### API key

Create an API key in the [Phaseo Dashboard](https://phaseo.app/gateway/keys).

### Environment variable

```bash theme={null}
export PHASEO_API_KEY="phaseo_v1_sk_<kid>_<secret>"
```

### Basic usage

```python theme={null}
from phaseo import Phaseo
import os

client = Phaseo(api_key=os.environ["PHASEO_API_KEY"])

response = client.generate_text(
    {
        "model": "openai/gpt-5-nano",
        "messages": [{"role": "user", "content": "Hello!"}],
    }
)

print(response["choices"][0]["message"]["content"])
```

### Optional client configuration

```python theme={null}
from phaseo import Phaseo

client = Phaseo(
    api_key="your-api-key",
    base_url="https://api.phaseo.ai/v1",
    timeout=30.0,
)
```

## Next steps

* Check out the [Usage Guide](./usage.mdx)
* Browse the [API Reference](../../api-reference/introduction.mdx)
