Image Editing

Crop images and add local hyperframes text overlays with the Wonda CLI.


Image editing is CLI-first. wonda edit image handles exact pixel crops locally, then uploads the result and prints the output mediaId.

The retired POST /api/v1/image/edit endpoint returns 410 Gone with a CLI migration hint. Move image editing scripts to the commands below.

Setup

npm i -g @degausai/wonda
wonda auth login
wonda doctor

Crop an image

Use imageCrop for exact pixel rectangles.

wonda edit image --operation imageCrop \
  --media 019e1b70-6f9e-80fd-8c49-690bcbdaf8db \
  --params '{"cropPixelX":100,"cropPixelY":50,"cropPixelWidth":500,"cropPixelHeight":500}' \
  --wait -o ./cropped.png

Parameters:

ParameterTypeDescription
cropPixelXintLeft edge of the crop rectangle, in pixels.
cropPixelYintTop edge of the crop rectangle, in pixels.
cropPixelWidthintCrop rectangle width, in pixels.
cropPixelHeightintCrop rectangle height, in pixels.

Without --output, the CLI prints:

{
  "mediaId": "019e1b70-6f9e-80fd-8c49-690bcbdaf8db",
  "status": "succeeded"
}

Add text to an image

textOverlay is a local hyperframes operation. Invoke it through wonda edit video even when the input media is an image.

wonda edit video --operation textOverlay \
  --media 019e1b70-6f9e-80fd-8c49-690bcbdaf8db \
  --prompt-text "New drop" \
  --params '{"fontFamily":"TikTok Sans SemiCondensed","position":"center","sizePercent":66,"fontSizeScale":0.5,"strokeWidth":4.5}' \
  --wait -o ./with-text.png

Common styling params include fontFamily, position, sizePercent, fontSizeScale, textColor, strokeColor, strokeWidth, highlightColor, and showShadow. Run wonda operations info textOverlay for the current shape.

Related image workflows

AI image editing, background removal, and vectorization are direct generation workflows. Use POST /image/generate with the appropriate model and attachments, or use the matching CLI generation commands.