Image Operations

Resize, crop, rotate, watermark, and enhance images

13 endpoints in this category. All require X-API-Key header.


Resize Image

POST /api/ResizeImage 1 token

Resize an image with flexible fit options.

Parameters
NameTypeRequiredDescription
image string required Base64-encoded image
width number optional Target width
height number optional Target height
fit string optional cover, contain, fill, inside, outside (default: contain)
returnBase64 boolean optional Return base64 (default: true)
Request Example
JSON
{"image": "<base64-image>", "width": 800, "height": 600, "fit": "contain", "returnBase64": true}
Code Examples
curl -X POST "https://docbutterfly.com/api/ResizeImage" \
  -H "X-API-Key: df_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{"image": "<base64-image>", "width": 800, "height": 600, "fit": "contain", "returnBase64": true}'
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");

var json = @"{""image"": ""<base64-image>"", ""width"": 800, ""height"": 600, ""fit"": ""contain"", ""returnBase64"": true}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");

var response = await client.PostAsync("https://docbutterfly.com/api/ResizeImage", content);
response.EnsureSuccessStatusCode();

var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);
import requests
import json

url = "https://docbutterfly.com/api/ResizeImage"
headers = {
    "X-API-Key": "df_your_api_key_here",
    "Content-Type": "application/json"
}
payload = json.loads('{"image": "<base64-image>", "width": 800, "height": 600, "fit": "contain", "returnBase64": true}')

response = requests.post(url, headers=headers, json=payload)
response.raise_for_status()

data = response.json()
print(json.dumps(data, indent=2))
┌─────────────────────────────────────────────┐
│  Power Automate - HTTP Action               │
├─────────────────────────────────────────────┤
│                                             │
│  Method:  POST                              │
│  URI:     https://docbutterfly.com/api/ResizeImage
│                                             │
│  Headers:                                   │
│    X-API-Key:    df_your_api_key_here       │
│    Content-Type: application/json           │
│                                             │
│  Body:                                      │
│    {
│      "image": "\u003Cbase64-image\u003E",
│      "width": 800,
│      "height": 600,
│      "fit": "contain",
│      "returnBase64": true
│    }
│                                             │
└─────────────────────────────────────────────┘

Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://docbutterfly.com/api/ResizeImage"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as needed
Try in Testbed

Crop Image

POST /api/CropImage 1 token

Extract a rectangular region from an image.

Parameters
NameTypeRequiredDescription
image string required Base64-encoded image
left number required X offset
top number required Y offset
width number required Crop width
height number required Crop height
returnBase64 boolean optional Return base64 (default: true)
Request Example
JSON
{"image": "<base64-image>", "left": 100, "top": 100, "width": 400, "height": 300, "returnBase64": true}
Code Examples
curl -X POST "https://docbutterfly.com/api/CropImage" \
  -H "X-API-Key: df_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{"image": "<base64-image>", "left": 100, "top": 100, "width": 400, "height": 300, "returnBase64": true}'
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");

var json = @"{""image"": ""<base64-image>"", ""left"": 100, ""top"": 100, ""width"": 400, ""height"": 300, ""returnBase64"": true}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");

var response = await client.PostAsync("https://docbutterfly.com/api/CropImage", content);
response.EnsureSuccessStatusCode();

var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);
import requests
import json

url = "https://docbutterfly.com/api/CropImage"
headers = {
    "X-API-Key": "df_your_api_key_here",
    "Content-Type": "application/json"
}
payload = json.loads('{"image": "<base64-image>", "left": 100, "top": 100, "width": 400, "height": 300, "returnBase64": true}')

response = requests.post(url, headers=headers, json=payload)
response.raise_for_status()

data = response.json()
print(json.dumps(data, indent=2))
┌─────────────────────────────────────────────┐
│  Power Automate - HTTP Action               │
├─────────────────────────────────────────────┤
│                                             │
│  Method:  POST                              │
│  URI:     https://docbutterfly.com/api/CropImage
│                                             │
│  Headers:                                   │
│    X-API-Key:    df_your_api_key_here       │
│    Content-Type: application/json           │
│                                             │
│  Body:                                      │
│    {
│      "image": "\u003Cbase64-image\u003E",
│      "left": 100,
│      "top": 100,
│      "width": 400,
│      "height": 300,
│      "returnBase64": true
│    }
│                                             │
└─────────────────────────────────────────────┘

Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://docbutterfly.com/api/CropImage"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as needed
Try in Testbed

Rotate Image

POST /api/RotateImage 1 token

Rotate an image by a specified angle.

Parameters
NameTypeRequiredDescription
image string required Base64-encoded image
angle number required Rotation in degrees
returnBase64 boolean optional Return base64 (default: true)
Request Example
JSON
{"image": "<base64-image>", "angle": 90, "returnBase64": true}
Code Examples
curl -X POST "https://docbutterfly.com/api/RotateImage" \
  -H "X-API-Key: df_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{"image": "<base64-image>", "angle": 90, "returnBase64": true}'
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");

var json = @"{""image"": ""<base64-image>"", ""angle"": 90, ""returnBase64"": true}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");

var response = await client.PostAsync("https://docbutterfly.com/api/RotateImage", content);
response.EnsureSuccessStatusCode();

var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);
import requests
import json

url = "https://docbutterfly.com/api/RotateImage"
headers = {
    "X-API-Key": "df_your_api_key_here",
    "Content-Type": "application/json"
}
payload = json.loads('{"image": "<base64-image>", "angle": 90, "returnBase64": true}')

response = requests.post(url, headers=headers, json=payload)
response.raise_for_status()

data = response.json()
print(json.dumps(data, indent=2))
┌─────────────────────────────────────────────┐
│  Power Automate - HTTP Action               │
├─────────────────────────────────────────────┤
│                                             │
│  Method:  POST                              │
│  URI:     https://docbutterfly.com/api/RotateImage
│                                             │
│  Headers:                                   │
│    X-API-Key:    df_your_api_key_here       │
│    Content-Type: application/json           │
│                                             │
│  Body:                                      │
│    {
│      "image": "\u003Cbase64-image\u003E",
│      "angle": 90,
│      "returnBase64": true
│    }
│                                             │
└─────────────────────────────────────────────┘

Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://docbutterfly.com/api/RotateImage"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as needed
Try in Testbed

Flip Image

POST /api/FlipImage 1 token

Flip an image horizontally or vertically.

Parameters
NameTypeRequiredDescription
image string required Base64-encoded image
direction string required horizontal or vertical
returnBase64 boolean optional Return base64 (default: true)
Request Example
JSON
{"image": "<base64-image>", "direction": "horizontal", "returnBase64": true}
Code Examples
curl -X POST "https://docbutterfly.com/api/FlipImage" \
  -H "X-API-Key: df_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{"image": "<base64-image>", "direction": "horizontal", "returnBase64": true}'
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");

var json = @"{""image"": ""<base64-image>"", ""direction"": ""horizontal"", ""returnBase64"": true}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");

var response = await client.PostAsync("https://docbutterfly.com/api/FlipImage", content);
response.EnsureSuccessStatusCode();

var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);
import requests
import json

url = "https://docbutterfly.com/api/FlipImage"
headers = {
    "X-API-Key": "df_your_api_key_here",
    "Content-Type": "application/json"
}
payload = json.loads('{"image": "<base64-image>", "direction": "horizontal", "returnBase64": true}')

response = requests.post(url, headers=headers, json=payload)
response.raise_for_status()

data = response.json()
print(json.dumps(data, indent=2))
┌─────────────────────────────────────────────┐
│  Power Automate - HTTP Action               │
├─────────────────────────────────────────────┤
│                                             │
│  Method:  POST                              │
│  URI:     https://docbutterfly.com/api/FlipImage
│                                             │
│  Headers:                                   │
│    X-API-Key:    df_your_api_key_here       │
│    Content-Type: application/json           │
│                                             │
│  Body:                                      │
│    {
│      "image": "\u003Cbase64-image\u003E",
│      "direction": "horizontal",
│      "returnBase64": true
│    }
│                                             │
└─────────────────────────────────────────────┘

Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://docbutterfly.com/api/FlipImage"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as needed
Try in Testbed

Compress Image

POST /api/CompressImage 1 token

Compress an image with quality control.

Parameters
NameTypeRequiredDescription
image string required Base64-encoded image
quality number optional Quality 1-100 (default: 80)
format string optional jpeg, png, webp
returnBase64 boolean optional Return base64 (default: true)
Request Example
JSON
{"image": "<base64-image>", "quality": 75, "format": "jpeg", "returnBase64": true}
Code Examples
curl -X POST "https://docbutterfly.com/api/CompressImage" \
  -H "X-API-Key: df_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{"image": "<base64-image>", "quality": 75, "format": "jpeg", "returnBase64": true}'
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");

var json = @"{""image"": ""<base64-image>"", ""quality"": 75, ""format"": ""jpeg"", ""returnBase64"": true}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");

var response = await client.PostAsync("https://docbutterfly.com/api/CompressImage", content);
response.EnsureSuccessStatusCode();

var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);
import requests
import json

url = "https://docbutterfly.com/api/CompressImage"
headers = {
    "X-API-Key": "df_your_api_key_here",
    "Content-Type": "application/json"
}
payload = json.loads('{"image": "<base64-image>", "quality": 75, "format": "jpeg", "returnBase64": true}')

response = requests.post(url, headers=headers, json=payload)
response.raise_for_status()

data = response.json()
print(json.dumps(data, indent=2))
┌─────────────────────────────────────────────┐
│  Power Automate - HTTP Action               │
├─────────────────────────────────────────────┤
│                                             │
│  Method:  POST                              │
│  URI:     https://docbutterfly.com/api/CompressImage
│                                             │
│  Headers:                                   │
│    X-API-Key:    df_your_api_key_here       │
│    Content-Type: application/json           │
│                                             │
│  Body:                                      │
│    {
│      "image": "\u003Cbase64-image\u003E",
│      "quality": 75,
│      "format": "jpeg",
│      "returnBase64": true
│    }
│                                             │
└─────────────────────────────────────────────┘

Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://docbutterfly.com/api/CompressImage"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as needed
Try in Testbed

Convert Image Format

POST /api/ConvertImage 1 token

Convert an image between formats.

Parameters
NameTypeRequiredDescription
image string required Base64-encoded image
format string required png, jpeg, webp, tiff, gif
returnBase64 boolean optional Return base64 (default: true)
Request Example
JSON
{"image": "<base64-image>", "format": "webp", "returnBase64": true}
Code Examples
curl -X POST "https://docbutterfly.com/api/ConvertImage" \
  -H "X-API-Key: df_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{"image": "<base64-image>", "format": "webp", "returnBase64": true}'
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");

var json = @"{""image"": ""<base64-image>"", ""format"": ""webp"", ""returnBase64"": true}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");

var response = await client.PostAsync("https://docbutterfly.com/api/ConvertImage", content);
response.EnsureSuccessStatusCode();

var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);
import requests
import json

url = "https://docbutterfly.com/api/ConvertImage"
headers = {
    "X-API-Key": "df_your_api_key_here",
    "Content-Type": "application/json"
}
payload = json.loads('{"image": "<base64-image>", "format": "webp", "returnBase64": true}')

response = requests.post(url, headers=headers, json=payload)
response.raise_for_status()

data = response.json()
print(json.dumps(data, indent=2))
┌─────────────────────────────────────────────┐
│  Power Automate - HTTP Action               │
├─────────────────────────────────────────────┤
│                                             │
│  Method:  POST                              │
│  URI:     https://docbutterfly.com/api/ConvertImage
│                                             │
│  Headers:                                   │
│    X-API-Key:    df_your_api_key_here       │
│    Content-Type: application/json           │
│                                             │
│  Body:                                      │
│    {
│      "image": "\u003Cbase64-image\u003E",
│      "format": "webp",
│      "returnBase64": true
│    }
│                                             │
└─────────────────────────────────────────────┘

Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://docbutterfly.com/api/ConvertImage"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as needed
Try in Testbed

Add Image Text Watermark

POST /api/AddImageTextWatermark 1 token

Overlay text watermark on an image.

Parameters
NameTypeRequiredDescription
image string required Base64-encoded image
text string required Watermark text
options.fontSize number optional Font size (default: 48)
options.color string optional Text color
options.position string optional center, top-left, etc (default: center)
returnBase64 boolean optional Return base64 (default: true)
Request Example
JSON
{"image": "<base64-image>", "text": "DRAFT", "options": {"fontSize": 48, "position": "center"}, "returnBase64": true}
Code Examples
curl -X POST "https://docbutterfly.com/api/AddImageTextWatermark" \
  -H "X-API-Key: df_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{"image": "<base64-image>", "text": "DRAFT", "options": {"fontSize": 48, "position": "center"}, "returnBase64": true}'
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");

var json = @"{""image"": ""<base64-image>"", ""text"": ""DRAFT"", ""options"": {""fontSize"": 48, ""position"": ""center""}, ""returnBase64"": true}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");

var response = await client.PostAsync("https://docbutterfly.com/api/AddImageTextWatermark", content);
response.EnsureSuccessStatusCode();

var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);
import requests
import json

url = "https://docbutterfly.com/api/AddImageTextWatermark"
headers = {
    "X-API-Key": "df_your_api_key_here",
    "Content-Type": "application/json"
}
payload = json.loads('{"image": "<base64-image>", "text": "DRAFT", "options": {"fontSize": 48, "position": "center"}, "returnBase64": true}')

response = requests.post(url, headers=headers, json=payload)
response.raise_for_status()

data = response.json()
print(json.dumps(data, indent=2))
┌─────────────────────────────────────────────┐
│  Power Automate - HTTP Action               │
├─────────────────────────────────────────────┤
│                                             │
│  Method:  POST                              │
│  URI:     https://docbutterfly.com/api/AddImageTextWatermark
│                                             │
│  Headers:                                   │
│    X-API-Key:    df_your_api_key_here       │
│    Content-Type: application/json           │
│                                             │
│  Body:                                      │
│    {
│      "image": "\u003Cbase64-image\u003E",
│      "text": "DRAFT",
│      "options": {
│        "fontSize": 48,
│        "position": "center"
│      },
│      "returnBase64": true
│    }
│                                             │
└─────────────────────────────────────────────┘

Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://docbutterfly.com/api/AddImageTextWatermark"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as needed
Try in Testbed

Add Image Watermark

POST /api/AddImageWatermark 1 token

Overlay a watermark image on another image.

Parameters
NameTypeRequiredDescription
image string required Base64-encoded image
watermark string required Base64 watermark image
options.opacity number optional Opacity 0-1 (default: 0.5)
options.position string optional center, tile, etc (default: center)
returnBase64 boolean optional Return base64 (default: true)
Request Example
JSON
{"image": "<base64-image>", "watermark": "<base64-watermark>", "options": {"opacity": 0.5, "position": "center"}, "returnBase64": true}
Code Examples
curl -X POST "https://docbutterfly.com/api/AddImageWatermark" \
  -H "X-API-Key: df_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{"image": "<base64-image>", "watermark": "<base64-watermark>", "options": {"opacity": 0.5, "position": "center"}, "returnBase64": true}'
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");

var json = @"{""image"": ""<base64-image>"", ""watermark"": ""<base64-watermark>"", ""options"": {""opacity"": 0.5, ""position"": ""center""}, ""returnBase64"": true}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");

var response = await client.PostAsync("https://docbutterfly.com/api/AddImageWatermark", content);
response.EnsureSuccessStatusCode();

var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);
import requests
import json

url = "https://docbutterfly.com/api/AddImageWatermark"
headers = {
    "X-API-Key": "df_your_api_key_here",
    "Content-Type": "application/json"
}
payload = json.loads('{"image": "<base64-image>", "watermark": "<base64-watermark>", "options": {"opacity": 0.5, "position": "center"}, "returnBase64": true}')

response = requests.post(url, headers=headers, json=payload)
response.raise_for_status()

data = response.json()
print(json.dumps(data, indent=2))
┌─────────────────────────────────────────────┐
│  Power Automate - HTTP Action               │
├─────────────────────────────────────────────┤
│                                             │
│  Method:  POST                              │
│  URI:     https://docbutterfly.com/api/AddImageWatermark
│                                             │
│  Headers:                                   │
│    X-API-Key:    df_your_api_key_here       │
│    Content-Type: application/json           │
│                                             │
│  Body:                                      │
│    {
│      "image": "\u003Cbase64-image\u003E",
│      "watermark": "\u003Cbase64-watermark\u003E",
│      "options": {
│        "opacity": 0.5,
│        "position": "center"
│      },
│      "returnBase64": true
│    }
│                                             │
└─────────────────────────────────────────────┘

Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://docbutterfly.com/api/AddImageWatermark"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as needed
Try in Testbed

Extract EXIF Data

POST /api/ExtractExifData 1 token

Extract EXIF metadata from an image.

Parameters
NameTypeRequiredDescription
image string required Base64-encoded image
Request Example
JSON
{"image": "<base64-image>"}
Response Example
JSON
{"exif": {"make": "Canon", "model": "EOS R5", "dateTime": "2026:01:15 10:30:00"}}
Code Examples
curl -X POST "https://docbutterfly.com/api/ExtractExifData" \
  -H "X-API-Key: df_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{"image": "<base64-image>"}'
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");

var json = @"{""image"": ""<base64-image>""}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");

var response = await client.PostAsync("https://docbutterfly.com/api/ExtractExifData", content);
response.EnsureSuccessStatusCode();

var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);
import requests
import json

url = "https://docbutterfly.com/api/ExtractExifData"
headers = {
    "X-API-Key": "df_your_api_key_here",
    "Content-Type": "application/json"
}
payload = json.loads('{"image": "<base64-image>"}')

response = requests.post(url, headers=headers, json=payload)
response.raise_for_status()

data = response.json()
print(json.dumps(data, indent=2))
┌─────────────────────────────────────────────┐
│  Power Automate - HTTP Action               │
├─────────────────────────────────────────────┤
│                                             │
│  Method:  POST                              │
│  URI:     https://docbutterfly.com/api/ExtractExifData
│                                             │
│  Headers:                                   │
│    X-API-Key:    df_your_api_key_here       │
│    Content-Type: application/json           │
│                                             │
│  Body:                                      │
│    {
│      "image": "\u003Cbase64-image\u003E"
│    }
│                                             │
└─────────────────────────────────────────────┘

Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://docbutterfly.com/api/ExtractExifData"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as needed
Try in Testbed

Remove EXIF Data

POST /api/RemoveExifData 1 token

Strip all metadata from an image.

Parameters
NameTypeRequiredDescription
image string required Base64-encoded image
returnBase64 boolean optional Return base64 (default: true)
Request Example
JSON
{"image": "<base64-image>", "returnBase64": true}
Code Examples
curl -X POST "https://docbutterfly.com/api/RemoveExifData" \
  -H "X-API-Key: df_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{"image": "<base64-image>", "returnBase64": true}'
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");

var json = @"{""image"": ""<base64-image>"", ""returnBase64"": true}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");

var response = await client.PostAsync("https://docbutterfly.com/api/RemoveExifData", content);
response.EnsureSuccessStatusCode();

var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);
import requests
import json

url = "https://docbutterfly.com/api/RemoveExifData"
headers = {
    "X-API-Key": "df_your_api_key_here",
    "Content-Type": "application/json"
}
payload = json.loads('{"image": "<base64-image>", "returnBase64": true}')

response = requests.post(url, headers=headers, json=payload)
response.raise_for_status()

data = response.json()
print(json.dumps(data, indent=2))
┌─────────────────────────────────────────────┐
│  Power Automate - HTTP Action               │
├─────────────────────────────────────────────┤
│                                             │
│  Method:  POST                              │
│  URI:     https://docbutterfly.com/api/RemoveExifData
│                                             │
│  Headers:                                   │
│    X-API-Key:    df_your_api_key_here       │
│    Content-Type: application/json           │
│                                             │
│  Body:                                      │
│    {
│      "image": "\u003Cbase64-image\u003E",
│      "returnBase64": true
│    }
│                                             │
└─────────────────────────────────────────────┘

Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://docbutterfly.com/api/RemoveExifData"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as needed
Try in Testbed

Clean Document Image

POST /api/CleanDocumentImage 1 token

Clean and enhance scanned document images.

Parameters
NameTypeRequiredDescription
image string required Base64-encoded image
sharpen boolean optional Apply sharpening (default: true)
normalize boolean optional Normalize contrast (default: true)
returnBase64 boolean optional Return base64 (default: true)
Request Example
JSON
{"image": "<base64-image>", "sharpen": true, "normalize": true, "returnBase64": true}
Code Examples
curl -X POST "https://docbutterfly.com/api/CleanDocumentImage" \
  -H "X-API-Key: df_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{"image": "<base64-image>", "sharpen": true, "normalize": true, "returnBase64": true}'
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");

var json = @"{""image"": ""<base64-image>"", ""sharpen"": true, ""normalize"": true, ""returnBase64"": true}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");

var response = await client.PostAsync("https://docbutterfly.com/api/CleanDocumentImage", content);
response.EnsureSuccessStatusCode();

var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);
import requests
import json

url = "https://docbutterfly.com/api/CleanDocumentImage"
headers = {
    "X-API-Key": "df_your_api_key_here",
    "Content-Type": "application/json"
}
payload = json.loads('{"image": "<base64-image>", "sharpen": true, "normalize": true, "returnBase64": true}')

response = requests.post(url, headers=headers, json=payload)
response.raise_for_status()

data = response.json()
print(json.dumps(data, indent=2))
┌─────────────────────────────────────────────┐
│  Power Automate - HTTP Action               │
├─────────────────────────────────────────────┤
│                                             │
│  Method:  POST                              │
│  URI:     https://docbutterfly.com/api/CleanDocumentImage
│                                             │
│  Headers:                                   │
│    X-API-Key:    df_your_api_key_here       │
│    Content-Type: application/json           │
│                                             │
│  Body:                                      │
│    {
│      "image": "\u003Cbase64-image\u003E",
│      "sharpen": true,
│      "normalize": true,
│      "returnBase64": true
│    }
│                                             │
└─────────────────────────────────────────────┘

Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://docbutterfly.com/api/CleanDocumentImage"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as needed
Try in Testbed

Clean Photo

POST /api/CleanPhoto 1 token

Auto-enhance photo brightness, contrast, and color.

Parameters
NameTypeRequiredDescription
image string required Base64-encoded image
returnBase64 boolean optional Return base64 (default: true)
Request Example
JSON
{"image": "<base64-image>", "returnBase64": true}
Code Examples
curl -X POST "https://docbutterfly.com/api/CleanPhoto" \
  -H "X-API-Key: df_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{"image": "<base64-image>", "returnBase64": true}'
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");

var json = @"{""image"": ""<base64-image>"", ""returnBase64"": true}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");

var response = await client.PostAsync("https://docbutterfly.com/api/CleanPhoto", content);
response.EnsureSuccessStatusCode();

var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);
import requests
import json

url = "https://docbutterfly.com/api/CleanPhoto"
headers = {
    "X-API-Key": "df_your_api_key_here",
    "Content-Type": "application/json"
}
payload = json.loads('{"image": "<base64-image>", "returnBase64": true}')

response = requests.post(url, headers=headers, json=payload)
response.raise_for_status()

data = response.json()
print(json.dumps(data, indent=2))
┌─────────────────────────────────────────────┐
│  Power Automate - HTTP Action               │
├─────────────────────────────────────────────┤
│                                             │
│  Method:  POST                              │
│  URI:     https://docbutterfly.com/api/CleanPhoto
│                                             │
│  Headers:                                   │
│    X-API-Key:    df_your_api_key_here       │
│    Content-Type: application/json           │
│                                             │
│  Body:                                      │
│    {
│      "image": "\u003Cbase64-image\u003E",
│      "returnBase64": true
│    }
│                                             │
└─────────────────────────────────────────────┘

Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://docbutterfly.com/api/CleanPhoto"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as needed
Try in Testbed

Auto-Rotate Image

POST /api/RotateImageExif 1 token

Auto-rotate based on EXIF orientation data.

Parameters
NameTypeRequiredDescription
image string required Base64-encoded image
returnBase64 boolean optional Return base64 (default: true)
Request Example
JSON
{"image": "<base64-image>", "returnBase64": true}
Code Examples
curl -X POST "https://docbutterfly.com/api/RotateImageExif" \
  -H "X-API-Key: df_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{"image": "<base64-image>", "returnBase64": true}'
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");

var json = @"{""image"": ""<base64-image>"", ""returnBase64"": true}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");

var response = await client.PostAsync("https://docbutterfly.com/api/RotateImageExif", content);
response.EnsureSuccessStatusCode();

var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);
import requests
import json

url = "https://docbutterfly.com/api/RotateImageExif"
headers = {
    "X-API-Key": "df_your_api_key_here",
    "Content-Type": "application/json"
}
payload = json.loads('{"image": "<base64-image>", "returnBase64": true}')

response = requests.post(url, headers=headers, json=payload)
response.raise_for_status()

data = response.json()
print(json.dumps(data, indent=2))
┌─────────────────────────────────────────────┐
│  Power Automate - HTTP Action               │
├─────────────────────────────────────────────┤
│                                             │
│  Method:  POST                              │
│  URI:     https://docbutterfly.com/api/RotateImageExif
│                                             │
│  Headers:                                   │
│    X-API-Key:    df_your_api_key_here       │
│    Content-Type: application/json           │
│                                             │
│  Body:                                      │
│    {
│      "image": "\u003Cbase64-image\u003E",
│      "returnBase64": true
│    }
│                                             │
└─────────────────────────────────────────────┘

Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://docbutterfly.com/api/RotateImageExif"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as needed
Try in Testbed