---
title: "Edit Image"
method: POST
path: "/media/edit-image"
tags: ["media"]
---

# Edit Image

`POST /media/edit-image`

## Request

- Base URL: `https://api.moda.app/v1`
- URL: `https://api.moda.app/v1/media/edit-image`
- Auth: HTTP bearer

Generative image edit — the same primitive with required ``source_images`` (metered).

## Headers

- `Moda-Version` '2026-04-12' | '2026-05-01'

## Request body

- EditImageRequest
  - `prompt` string, required: Sent to the selected model VERBATIM.
  - `model` string, required: Concrete registry model id (no 'auto'); see GET /v1/media/models.
  - `aspect_ratio` string, nullable
  - `num_images` integer
  - `resolution` string, nullable
  - `width` integer, nullable
  - `height` integer, nullable
  - `source_images` string[], required: The image(s) to edit — required on this verb: file_ ids or http(s) URLs.
  - `reference_images` string[], nullable: Style/subject/composition references: file_ ids or http(s) URLs.
  - `model_params` object, nullable
  - `idempotency_key` string, nullable: A retried call with the same key replays the stored response (replayed:true) instead of paying for a second provider render.

## Response `200`

Successful Response

- object

## Other responses

- `401`: Authentication required.
- `402`: Insufficient credits for a metered operation.
- `403`: Permission denied for this scope.
- `404`: Resource not found.
- `409`: Conflict (idempotency / resource state).
- `422`: Request validation failed.
- `429`: Rate limit exceeded.
- `500`: Internal error.

## Changes

- **2026-11-03** `9ac6a3abc0f8`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/moda/apis/moda-public-api/changes/media/edit-image/post.md)

---

[API](https://skmtc.dev/moda/apis/moda-public-api.md) - [All operations](https://skmtc.dev/moda/apis/moda-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/moda/apis/moda-public-api/revisions/9ac6a3abc0f8?raw)
