> ## 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 (preview)

> Local-preview PHP wrapper for the AI Stats API.

<Note type="warning">
  The PHP SDK is in preview and is not yet published to Packagist.
</Note>

The local wrapper at `packages/sdk/sdk-php/src/index.php` currently exposes these methods:

* `generateText(...)`
* `generateResponse(...)`
* `createAnthropicMessage(...)`
* `generateImage(...)`
* `generateImageEdit(...)`
* `generateVideo(...)`, `getVideo(...)`, `cancelVideo(...)`, `deleteVideo(...)`, `listVideoModels(...)`, `listVideos(...)`
* `generateEmbedding(...)`
* `generateModeration(...)`
* `createSpeech(...)`
* `generateTranscription(...)`
* `generateTranslation(...)`
* `createBatch(...)`, `retrieveBatch(...)`, `cancelBatch(...)`
* `getAsyncJobWebSocketUrl(...)`, `getBatchWebSocketUrl(...)`, `getVideoWebSocketUrl(...)`, `asyncJobs()->websocketUrl(...)`
* `listFiles(...)`, `retrieveFile(...)`, `retrieveFileContent(...)`, `retrieveVideoContent(...)`, `getVideoDownloadUrl(...)`, `uploadFile(...)`
* `listModels(...)`
* `listApiKeys(...)`, `createApiKey(...)`, `updateApiKey(...)`, `deleteApiKey(...)`
* `getApiKey(...)`
* `listWorkspaces(...)`, `getWorkspace(...)`, `createWorkspace(...)`, `updateWorkspace(...)`, `deleteWorkspace(...)`
* `listEndpoints()`
* `listOrganisations(...)`
* `listPricingModels(...)`
* `calculatePricing(...)`
* `getCurrentApiKey()`
* `listProviders(...)`, `getAnalytics(...)`, `getCredits(...)`, `getActivity(...)`
* `getGeneration(...)`
* `health()`, `healthz()`

```php theme={null}
require 'vendor/autoload.php';

use AIStats\Sdk\AIStats;

$client = new AIStats('YOUR_KEY');
$models = $client->listModels(['limit' => 5]);
```
