# Imagineart 2.0 Edit Preview

> ImagineArt 2.0 Edit delivers precise prompt-guided image editing at 2K resolution, preserving fine detail and realism while accurately applying targeted changes across one or more reference images.


## Overview

- **Endpoint**: `https://fal.run/imagineart/imagineart-2.0-edit-preview/image-to-image`
- **Model ID**: `imagineart/imagineart-2.0-edit-preview/image-to-image`
- **Category**: image-to-image
- **Kind**: inference
**Tags**: stylized, transform, typography



## Pricing

Output Resolution: 2K. Pricing: **$0.05** (1 image) then **$0.007** for any additional input image other than 1st image.

For more details, see [fal.ai pricing](https://fal.ai/pricing).

## API Information

This model can be used via our HTTP API or more conveniently via our client libraries.
See the input and output schema below, as well as the usage examples.


### Input Schema

The API accepts the following input parameters:


- **`image_urls`** (`list<string>`, _required_):
  Reference image URL(s). Up to 4 images.
  - Array of string

- **`prompt`** (`string`, _required_):
  Editing instruction (e.g. 'replace the background with a sunset beach').

- **`aspect_ratio`** (`AspectRatioEnum`, _optional_):
  Output aspect ratio. 'auto' = match the first input image's aspect ratio, sized to fill Default value: `"auto"`
  - Default: `"auto"`
  - Options: `"auto"`, `"1:1"`, `"9:16"`, `"16:9"`, `"3:2"`, `"2:3"`, `"4:3"`, `"3:4"`, `"4:5"`, `"5:4"`, `"3:1"`, `"1:3"`, `"21:9"`



**Required Parameters Example**:

```json
{
  "prompt": ""
}
```

**Full Example**:

```json
{
  "prompt": "",
  "aspect_ratio": "auto"
}
```


### Output Schema

The API returns the following output format:

- **`images`** (`list<Image>`, _required_):
  Edited image
  - Array of Image
  - Examples: [{"width":2048,"url":"https://v3b.fal.media/files/b/0a9513b1/to-rcKHMkC7e9jQFN7tZE_U8VLyc50wRU6V_UbIh0Hi_generated_ImagineArt_2_0.png","content_type":"image/png","height":2048}]



**Example Response**:

```json
{
  "images": [
    {
      "width": 2048,
      "url": "https://v3b.fal.media/files/b/0a9513b1/to-rcKHMkC7e9jQFN7tZE_U8VLyc50wRU6V_UbIh0Hi_generated_ImagineArt_2_0.png",
      "content_type": "image/png",
      "height": 2048
    }
  ]
}
```


## Usage Examples

### cURL

```bash
curl --request POST \
  --url https://fal.run/imagineart/imagineart-2.0-edit-preview/image-to-image \
  --header "Authorization: Key $FAL_KEY" \
  --header "Content-Type: application/json" \
  --data '{
     "prompt": ""
   }'
```

### Python

Ensure you have the Python client installed:

```bash
pip install fal-client
```

Then use the API client to make requests:

```python
import fal_client

def on_queue_update(update):
    if isinstance(update, fal_client.InProgress):
        for log in update.logs:
           print(log["message"])

result = fal_client.subscribe(
    "imagineart/imagineart-2.0-edit-preview/image-to-image",
    arguments={
        "prompt": ""
    },
    with_logs=True,
    on_queue_update=on_queue_update,
)
print(result)
```

### JavaScript

Ensure you have the JavaScript client installed:

```bash
npm install --save @fal-ai/client
```

Then use the API client to make requests:

```javascript
import { fal } from "@fal-ai/client";

const result = await fal.subscribe("imagineart/imagineart-2.0-edit-preview/image-to-image", {
  input: {
    prompt: ""
  },
  logs: true,
  onQueueUpdate: (update) => {
    if (update.status === "IN_PROGRESS") {
      update.logs.map((log) => log.message).forEach(console.log);
    }
  },
});
console.log(result.data);
console.log(result.requestId);
```


## Additional Resources

### Documentation

- [Model Playground](https://fal.ai/models/imagineart/imagineart-2.0-edit-preview/image-to-image)
- [API Documentation](https://fal.ai/models/imagineart/imagineart-2.0-edit-preview/image-to-image/api)
- [OpenAPI Schema](https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=imagineart/imagineart-2.0-edit-preview/image-to-image)

### fal.ai Platform

- [Platform Documentation](https://docs.fal.ai)
- [Python Client](https://docs.fal.ai/clients/python)
- [JavaScript Client](https://docs.fal.ai/clients/javascript)
