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

> Call /images/edits with the TypeScript SDK.

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

### Example

```typescript theme={null}
const edited = await client.generateImageEdit({
  model: "openai/gpt-image-1",
  prompt: "Make it sunset",
  image: "data:image/png;base64,...",
  mask: "data:image/png;base64,...",
});
```

### Key parameters

* `model` (required): Image-edit capable model id.
* `image` (required): Base64 data URL or URL to source image.
* `prompt`: Optional new instruction for the edit.
* `mask`: Optional mask (transparent regions edited).
* `n` (1–10): Number of edited variants.
* `size`: e.g., `1024x1024`, `1024x1792`, `1792x1024`.
* `response_format`: `url` or `b64_json`.
* `user`: Optional end-user tag.

### Returns

`ImageGenerationResponse`

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