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

# 画像編集

> TypeScript SDKで/images/editsを呼び出します。

**メソッド**: `client.generateImageEdit()`。

### 例

```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,...",
});
```

### 主なパラメーター

* `model`（必須）：画像編集に対応したモデルのID。
* `image`（必須）：base64データURLまたは元画像のURL。
* `prompt`：編集用の新しい任意の指示。
* `mask`：任意のマスク（透明な領域が編集されます）。
* `n`（1～10）：編集後のバリエーション数。
* `size`：例：`1024x1024`、`1024x1792`、`1792x1024`。
* `response_format`：`url`または`b64_json`。
* `user`：エンドユーザー用の任意のタグ。

### 戻り値

`ImageGenerationResponse`

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


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