xtract.bot
POST /api/image-charcoal

Stylise an image with a charcoal-sketch effect — high-contrast edges with soft mid-tones. Configurable radius and intensity.

Stylises an image as a charcoal sketch — high-contrast edges on a soft mid-tone background. Tunable: `radius` controls how thick the strokes are; `sigma` controls how soft the surrounding tones are. Defaults give a balanced "drawing" look.

Inputs

NameTypeDefaultDescription
image*fileInput image.
radiusnumber (0…50)0Kernel radius hint.
sigmanumber (0.1…50)1Gaussian standard deviation.
formatenum (png | jpeg | webp)Output format.

Response

Modes: binary, base64-json. Cache: yes (24h TTL).

Code samples

Built from the default example.

# Download or substitute the example input:
#   curl -O https://xtract.bot/examples/image-png-to-webp/sample.png
IMAGE=$(base64 -w0 < sample.png)

curl -X POST https://api.xtract.bot/api/image-charcoal \
  -H "Content-Type: application/json" \
  -H "Accept: application/octet-stream" \
  -H "X-Account-Id: $XTRACT_ACCOUNT_ID" \
  -H "X-Api-Key: $XTRACT_API_KEY" \
  -d '{
  "radius": 0,
  "sigma": 1,
  "image": "'"$IMAGE"'"
}'