Edit
Edit modifies an existing image based on your text instructions. Like generate, there are three content types — each handles edits differently.
Content types
Section titled “Content types”Edit image
Section titled “Edit image”Pixel-level changes: swap backgrounds, add or remove objects, change style or lighting.
depicta edit image photo.png "Make the sky more dramatic with storm clouds"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"response = httpx.post( "https://api.depicta.ai/v1/edit/image", headers={"Authorization": "Bearer dpct_YOUR_API_KEY"}, files={"image": open("photo.png", "rb")}, data={"prompt": "Make the sky more dramatic with storm clouds"},)Edit graphic
Section titled “Edit graphic”Style and shape changes: recolor, resize elements, change proportions.
depicta edit graphic icon.png "Change the color to blue and make it bolder"API endpoint: POST /v1/edit/graphic
Edit diagram
Section titled “Edit diagram”Structural changes: move boxes, add connections, relabel nodes.
depicta edit diagram architecture.png "Add a load balancer between the client and the API servers"API endpoint: POST /v1/edit/diagram
Input methods
Section titled “Input methods”Provide the source image as:
- File path —
depicta edit image photo.png "..." - URL —
depicta edit image https://example.com/photo.png "..." - Stdin —
cat photo.png | depicta edit image - "..." - API upload — use
POST /v1/uploadfirst, then reference the URL
Reference images
Section titled “Reference images”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.
depicta edit image photo.png "Restyle in this art direction" --reference style-guide.png:"Warm tones, painterly"See Generate — Reference images for full details.
Response
Section titled “Response”Same format as generate — signed URLs for PNG, JPEG, WebP.