---
title: "Image Edit Api"
method: POST
path: "/images/edits"
tags: ["images"]
---

# Image Edit Api

`POST /images/edits`

## Request

- Base URL: `https://api.mammouth.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.mammouth.ai/images/edits`
- Auth: API key in header `x-litellm-api-key`
- TypeScript: <https://skmtc.dev/mammouth/apis/mammouth-api/docs/images/edits/post.ts> (a function with typed inputs; its response is checked against the schema)

Follows the OpenAI Images API spec: https://platform.openai.com/docs/api-reference/images/create

```bash
curl -s -D >(grep -i x-request-id >&2)     -o >(jq -r '.data[0].b64_json' | base64 --decode > gift-basket.png)     -X POST "http://localhost:4000/v1/images/edits"     -H "Authorization: Bearer sk-1234"         -F "model=gpt-image-1"         -F "image[]=@soap.png"         -F 'prompt=Create a studio ghibli image of this'
```

## Query parameters

- `model` string, nullable

## Request body `multipart/form-data`

- BodyImageEditApiImagesEditsPost
  - `image` string[], nullable
  - `image[]` string[], nullable
  - `mask` string[], nullable
  - `mask[]` string[], nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

## Changes

- **2026-11-07** `0221c7d45bb1`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/mammouth/apis/mammouth-api/changes/images/edits/post.md)

---

[API](https://skmtc.dev/mammouth/apis/mammouth-api.md) - [All operations](https://skmtc.dev/mammouth/apis/mammouth-api/llms.txt) - [OpenAPI document](https://skmtc.dev/mammouth/apis/mammouth-api/revisions/0221c7d45bb1?raw)
