Skip to main content
POST
/
images
/
edits
Edit image
curl --request POST \
  --url https://www.dench.com/api/v1/images/edits \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "prompt": "string",
  "input_images_base64": []
}
'
{
  "error": {
    "message": "<string>",
    "type": "<string>",
    "code": "<string>",
    "details": "<unknown>"
  }
}

Authorizations

Authorization
string
header
required

Workspace-scoped Dench API key from workspace settings. This is the same key used by DENCH_API_KEY in sandboxes.

Body

application/json
prompt
string
required

Image prompt.

Required string length: 1 - 32000
input_images_base64
string[]
required

Base64-encoded source images (1-8).

Required array length: 1 - 8 elements
size
string

e.g. 1024x1024, 1536x1024, auto.

quality
enum<string>
Available options:
auto,
low,
medium,
high
format
enum<string>
Available options:
png,
jpeg,
webp
output_compression
integer
Required range: 0 <= x <= 100
background
enum<string>
Available options:
auto,
opaque,
transparent
savePath
string

Workspace path to write the image.

mask_base64
string

Optional base64 mask image.

Response

Successful response