Skip to content

Edit

Edit modifies an existing image based on your text instructions. Like generate, there are three content types — each handles edits differently.

Pixel-level changes: swap backgrounds, add or remove objects, change style or lighting.

Terminal window
depicta edit image photo.png "Make the sky more dramatic with storm clouds"
Terminal window
curl -X POST https://api.depicta.ai/v1/edit/image \
-H "Authorization: Bearer dpct_YOUR_API_KEY" \
-F "image=@photo.png" \
-F "prompt=Make the sky more dramatic with storm clouds"

Style and shape changes: recolor, resize elements, change proportions.

Terminal window
depicta edit graphic icon.png "Change the color to blue and make it bolder"

API endpoint: POST /v1/edit/graphic

Structural changes: move boxes, add connections, relabel nodes.

Terminal window
depicta edit diagram architecture.png "Add a load balancer between the client and the API servers"

API endpoint: POST /v1/edit/diagram

Provide the source image as:

  • File pathdepicta edit image photo.png "..."
  • URLdepicta edit image https://example.com/photo.png "..."
  • Stdincat photo.png | depicta edit image - "..."
  • API upload — use POST /v1/upload first, then reference the URL

Like generate, edit operations support up to 5 reference images to guide the result — useful when you want the edit to match a particular style or color palette.

Terminal window
depicta edit image photo.png "Restyle in this art direction" --reference style-guide.png:"Warm tones, painterly"

See Generate — Reference images for full details.

Same format as generate — signed URLs for PNG, JPEG, WebP.