---
title: "Edit images"
method: POST
path: "/api/{workspaceID}/v1/images/edits"
tags: ["Image Edits"]
---

# Edit images

`POST /api/{workspaceID}/v1/images/edits`

Edits an existing image based on a text prompt. Requires `multipart/form-data` content type.

Supports up to 16 input images. A mask image can be provided for inpainting operations.

## Path parameters

- `workspaceID` string, required

## Response `200`

Successful response

- ImageResponse
  - `id` string — Log ID
  - `created` integer
  - `data` object[]
    - `url` string, uri — Image URL (when response_format is url)
    - `b64_json` string — Base64-encoded image data (when response_format is b64_json)
    - `revised_prompt` string — Revised prompt used by the model
  - `usage` object
    - `total_cost` number — Total cost in USD
    - `total_cost_toman` number — Total cost in Tomans

## Other responses

- `400` — Bad request
- `401` — Missing authentication
- `402` — Payment required
- `503` — Service unavailable (feature disabled)

---

[API](https://skmtc.net/liara-cloud/apis/ai-image-generation.md) · [All operations](https://skmtc.net/liara-cloud/apis/ai-image-generation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/liara-cloud/ai-image-generation/revisions/323c54177942/schema)
