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

# Uso do SDK PHP

> Métodos wrapper atualmente compatíveis com o SDK PHP.

## Configuração

```php theme={null}
<?php
require 'vendor/autoload.php';

use Phaseo\Sdk\Phaseo;

$client = new Phaseo(getenv('PHASEO_API_KEY'));
```

## Conclusões de chat

```php theme={null}
$chat = $client->generateText([
  'model' => 'openai/gpt-5-nano',
  'messages' => [
    ['role' => 'user', 'content' => 'Hello']
  ],
]);
```

## Responses

```php theme={null}
$response = $client->generateResponse([
  'model' => 'openai/gpt-5-nano',
  'input' => 'Reply with: php sdk works',
]);
```

## Imagens

```php theme={null}
$image = $client->generateImage([
  'model' => 'openai/gpt-image-1',
  'prompt' => 'A lighthouse at golden hour',
]);

$edit = $client->generateImageEdit([
  'model' => 'openai/gpt-image-1',
  'prompt' => 'Make it sunset',
  'image' => 'data:image/png;base64,...',
]);
```

## Áudio

```php theme={null}
$transcript = $client->generateTranscription([
  'model' => 'openai/gpt-4o-transcribe',
  'audio_b64' => 'base64-audio',
]);

$translation = $client->generateTranslation([
  'model' => 'openai/gpt-4o-transcribe',
  'audio_b64' => 'base64-audio',
]);
```

## Embeddings e moderação

```php theme={null}
$embedding = $client->generateEmbedding([
  'model' => 'openai/text-embedding-3-large',
  'input' => 'Sample text',
]);

$moderation = $client->generateModeration([
  'model' => 'openai/omni-moderation-latest',
  'input' => 'Some text to check',
]);
```

## Modelos e status

```php theme={null}
$models = $client->listModels(['limit' => 10]);
$health = $client->health();
```


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