# Image AI Edit I/O

### Intro

With the Image AI Edit API, you can alter an image with just a single prompt.

**Cost**

* 2 credits per 1 output image.

**Rate limits**

* 1 generation per 1 second.
* 60 generations per 1 minute.

### Input

Our API supports several options to provide source images that need to be processed.

#### HTTP(S) URL

URL of the input image should be from 1 to 512 characters. The image must be accessible by our system.

```json
{
    "input": "https://letsenhance.io/docs/assets/samples/burger.jpg"
}
```

#### Connected storage

You can connect [Cloud Storage](https://docs.claid.ai/storage-connectors) and use it as a source for images. Currently, our API supports AWS S3 and Google Cloud Storage.

After connecting your Cloud Storage, you can refer the storage name as an input.

```json
{
    "input": "storage://storage-name/path/image-name.jpg"
}
```

#### Input image file types

Our API supports the following image formats as inputs: JPEG, PNG, WEBP, AVIF and HEIC.

### Output

Configuration of result output is optional.&#x20;

By default, you may omit the output option from the request payload. In this case, our system stores the result in a temporary bucket with a lifespan of 24 hours and provides a public URL to the image.

Alternatively, you can use a connected [Cloud Storage](https://docs.claid.ai/storage-connectors): just configure the path to the folder where you want to store results.

#### Output image file types

The following image formats are supported for the output: JPEG and PNG. Default is PNG.

#### Output number of images

The API supports from 1 to 4 output images. Default is 1 image per request.

#### Basic and advanced output options

{% tabs %}
{% tab title="Basic Usage" %}

```json
{
    "output": "storage://storage-name/result-path/image-name.jpg"
}
```

{% endtab %}

{% tab title="Advanced Usage" %}

<pre class="language-json"><code class="lang-json">{
    "output": {
<strong>        "destination": "storage://storage-name/result-path/image-name.jpg",
</strong>        "format": "jpeg",
        "number_of_images": 1
    }
}
</code></pre>

{% endtab %}
{% endtabs %}
