> ## 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.

# PHP SDK

> Phaseo 网关的官方 PHP 客户端。

从 Packagist 安装已发布的包 [`phaseo/sdk`](https://packagist.org/packages/phaseo/sdk)。

`packages/sdk/sdk-php/src/index.php` 中的本地封装目前提供以下方法：

* `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(...)`
* `getModelEndpointCapabilities(...)`, `checkModelParameters(...)`
* `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 Phaseo\Sdk\Phaseo;

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

`checkModelParameters(...)` 使用提供商路由的实时元数据，突出显示不受支持或无效的值，并返回接受完整参数集的路由。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.