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

# Bildgenerierung

> Rufe /images/generations mit dem PHP-SDK auf.

**Methode**: `$client->generateImage(...)`

### Beispiel

```php theme={null}
<?php

require 'vendor/autoload.php';

use Phaseo\Sdk\Phaseo;

$client = new Phaseo(getenv('PHASEO_API_KEY'));
$response = $client->generateImage([
    'model' => 'openai/gpt-image-1',
    'prompt' => 'A lighthouse at golden hour',
    'size' => '1024x1024',
    'n' => 1,
    'response_format' => 'url'
]);
echo $response['data'][0]['url'] ?? '';
```

### Wichtige Parameter

* `model` (erforderlich): ID eines bildfähigen Modells (z. B. `openai/gpt-image-1`).
* `prompt` (erforderlich): Textanweisung.
* `n` (1–10): Anzahl der zu generierenden Bilder.
* `size`: z. B. `1024x1024`, `1024x1792` oder `1792x1024`.
* `quality`: `standard` oder `hd` (modellabhängig).
* `style`: z. B. `vivid` oder `natural` (modellabhängig).
* `response_format`: `url` oder `b64_json`.
* `user`: optionales Endnutzer-Tag zur Verfolgung von Sicherheit und Missbrauch.

### Rückgabewert

ImageGenerationResponse


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