Image

Edit an image

Edit or inpaint an existing image using a text prompt. The response format follows the same output_type rules as /image/generate.

POST
/image/edit
Sign-In-With-X<token>

Base64-encoded JSON envelope containing a CAIP-122 sign-in message and its cryptographic signature.

{
  "message": "<CAIP-122 message>",
  "signature": "<base58 for Solana, hex for EVM>"
}

In: header

Request Body

application/json

model*string

Canonical model slug.

images*array<>

Input images. The first image is the base image.

mask?

Image source — provide either b64 (data URL) or url (HTTPS URL).

prompt*string

Text prompt describing the desired edit.

negative_prompt?string

Things to avoid.

n?integer

Number of output variants (1–6).

Range1 <= value <= 6
width?string

Output image width in pixels.

height?string

Output image height in pixels.

aspect_ratio?string

Aspect ratio hint.

prompt_extend?boolean

Whether to extend the prompt automatically.

watermark?boolean

Whether to add a watermark.

output_format?string
Value in"png" | "jpeg" | "webp"
output_type?string
Value in"data_url" | "file"
seed?integer

Seed for reproducibility.

guide_scale?number

Guidance scale (0.0–50.0).

stream?boolean

Whether to stream intermediate results.

user?string

End-user identifier.

metadata?object

Free-form metadata.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://beta.aimo.network/api/v1/image/edit" \  -H "Content-Type: application/json" \  -d '{    "model": "string",    "images": [      {}    ],    "prompt": "string"  }'
{
  "id": "string",
  "created": 0,
  "status": "completed",
  "images": [
    {
      "index": 0,
      "data_url": "string",
      "width": 0,
      "height": 0,
      "format": "string",
      "seed": 0
    }
  ],
  "input_images": [
    {
      "width": 0,
      "height": 0
    }
  ],
  "error": {
    "error": {
      "code": "string",
      "message": "string"
    }
  },
  "provider_metadata": {
    "provider": "string",
    "raw": {}
  }
}
{
  "error": {
    "code": "string",
    "message": "string"
  }
}
{
  "error": {
    "code": "string",
    "message": "string"
  }
}
{
  "error": {
    "code": "string",
    "message": "string"
  }
}