> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sciforium.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Image Edits

**Method:** `POST`\
**Endpoint:** `https://api.sciforium.com/v1/images/edits`\
**Content-Type:** `multipart/form-data`

### Overview

`/v1/images/edits` edits one or more input images using a text prompt.

### Request Body Parameters

| Parameter             | Type            | Required | Description                                                        |
| --------------------- | --------------- | -------- | ------------------------------------------------------------------ |
| `image`               | file or file\[] | Yes      | Source image(s). PNG/JPEG/WebP. Max file size: 50 MB each.         |
| `prompt`              | string          | Yes      | Description of the final desired image (1 to 32,000 chars).        |
| `model`               | string          | Yes      | Image model ID.                                                    |
| `mask`                | file            | No       | Optional mask file for targeted edits.                             |
| `input_fidelity`      | string          | No       | `low` or `high`. Default: `low`.                                   |
| `n`                   | integer         | No       | Number of outputs, `1` to `10`. Default: `1`.                      |
| `size`                | string          | No       | `1024x1024`, `1536x1024`, `1024x1536`, or `auto`. Default: `auto`. |
| `quality`             | string          | No       | `low`, `medium`, `high`, or `auto`. Default: `auto`.               |
| `background`          | string          | No       | `transparent`, `opaque`, or `auto`. Default: `auto`.               |
| `output_format`       | string          | No       | `png`, `jpeg`, or `webp`. Default: `png`.                          |
| `output_compression`  | integer         | No       | `0` to `100`. Default: `100`.                                      |
| `moderation`          | string          | No       | `auto` or `low`. Default: `auto`.                                  |
| `num_inference_steps` | integer         | No       | Optional step count (`1` to `50`).                                 |
| `partial_images`      | integer         | No       | Streaming partials (`0` to `3`). Default: `0`.                     |
| `response_format`     | string          | No       | `b64_json` or `url`.                                               |
| `user`                | string          | No       | Optional user identifier.                                          |
| `stream`              | boolean         | No       | Stream events when enabled.                                        |

> Pro tip: describe the **full final scene**, not only the delta.

### Example Response

```json theme={null}
{
  "created": 1775615000,
  "data": [
    {
      "b64_json": "iVBORw0KGgoAAAANSUhEUgAA...",
      "revised_prompt": "The original photograph of a living room is modified to include a modern black leather sofa where the wooden chair was, while maintaining the identical lighting and wall color."
    }
  ],
  "usage": {
    "input_tokens": 1200,
    "output_tokens": 0,
    "total_tokens": 1200
  },
  "filtered_count": 0
}
```
