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

# Image generations

> Call /images/generations with the TypeScript SDK.

**Method**: `client.generateImage()`.

### Example

```typescript theme={null}
const image = await client.generateImage({
  model: "openai/gpt-image-1",
  prompt: "A lighthouse at golden hour",
  size: "1024x1024",
  n: 1,
  response_format: "url",
});
```

### Key parameters

* `model` (required): Image-capable model id (e.g., `openai/gpt-image-1`).
* `prompt` (required): Text prompt.
* `n` (1–10): Number of images to generate.
* `size`: e.g., `1024x1024`, `1024x1792`, `1792x1024`.
* `quality`: `standard` or `hd` (model-dependent).
* `style`: e.g., `vivid` or `natural` (model-dependent).
* `response_format`: `url` or `b64_json`.
* `user`: Optional end-user tag for safety/abuse tracking.

### Returns

`ImageGenerationResponse`

```json theme={null}
{
  "data": [
    {
      "url": "https://example.com/generated_image.png"
    }
  ]
}
```
