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

# Edição de imagens

> Chame /images/edits com o SDK Ruby.

**Métodos**: `client.generate_image_edit(...)` ou `client.create_image_edit(...)`.

### Exemplo

```ruby theme={null}
require 'phaseo_sdk'

client = PhaseoSdk::Phaseo.new(api_key: ENV.fetch("PHASEO_API_KEY"))
edited = client.generate_image_edit(
  model: 'openai/gpt-image-1',
  prompt: 'Make it sunset',
  image: 'data:image/png;base64,...',
  mask: 'data:image/png;base64,...'
)
```

### Parâmetros principais

* `model` (obrigatório): ID de um modelo compatível com edição de imagens.
* `image` (obrigatório): URL de dados base64 ou URL da imagem de origem.
* `prompt`: nova instrução opcional para a edição.
* `mask`: máscara opcional (as regiões transparentes são editadas).
* `n` (1–10): número de variantes editadas.
* `size`: por exemplo, `1024x1024`, `1024x1792` ou `1792x1024`.
* `response_format`: `url` ou `b64_json`.
* `user`: identificador opcional do usuário final.

### Retorno

`ImageGenerationResponse`


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