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

# PHP SDK Installation

> Set up the preview PHP SDK from source.

<Note type="warning">
  The PHP SDK is not published on Packagist yet. Use it from source for now.
</Note>

## Requirements

* PHP 8.1+
* Composer
* Access to this repository

## Install from local source

1. Regenerate generated files (optional but recommended after API changes):

```bash theme={null}
pnpm openapi:gen:php
```

2. Add the SDK as a local Composer path repository:

```json theme={null}
{
  "repositories": [
    {
      "type": "path",
      "url": "../ai-stats-public/packages/sdk/sdk-php",
      "options": { "symlink": true }
    }
  ],
  "require": {
    "ai-stats/php-sdk": "*"
  }
}
```

3. Install dependencies:

```bash theme={null}
composer install
```
