Skip to main content
POST
https://api.pikzels.com
/
v1
/
edit
curl --location --request POST 'https://api.pikzels.com/v1/edit' \
--header 'X-Api-Key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
  "prompt": "make the cat blue",
  "image_url": "https://images.unsplash.com/photo-1514888286974-6c03e2ca1dba"
}'
{
  "output": "https://media.pikzels.com/temp/edited_7f8a9b2c3d4e.jpeg"
}
prompt
string
required
Instructions for how to edit the image
image_url
string
required
URL of the source image to edit
mask_url
string
Optional mask URL for selective editing
curl --location --request POST 'https://api.pikzels.com/v1/edit' \
--header 'X-Api-Key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
  "prompt": "make the cat blue",
  "image_url": "https://images.unsplash.com/photo-1514888286974-6c03e2ca1dba"
}'
{
  "output": "https://media.pikzels.com/temp/edited_7f8a9b2c3d4e.jpeg"
}

Common Errors

All errors return this JSON structure:
{
  "error": {
    "code": "ERROR_CODE_HERE",
    "message": "Human readable message",
    "details": "Additional context"
  }
}
Status CodeCodeDescription
400BAD_REQUESTInvalid or missing fields
400CONTENT_POLICY_VIOLATIONRequest violates content policy
401INVALID_AUTH_HEADERInvalid API Key
402INSUFFICIENT_BALANCENot enough credits
429CONCURRENT_LIMIT_EXCEEDEDToo many concurrent requests
500INTERNAL_ERRORServer problem
503MAINTENANCE_ACTIVEUnder maintenance