Redact text in image
About this tool
How to use it
- Choose this tool.
- Add your screenshot or photo with Upload or drag and drop.
- Type the words to hide, or tick the kinds of data to hide.
- Choose how to cover them (box, blur or pixelate) and the language of the text.
- Press Generate, then download the picture.
What you get back
Try Redact text in image in the Studio
Use it from your code
cURL
curl -X POST "https://app.h2i.davixlabs.io/v1/images/redact-text" \
-H "X-Api-Key: $DAVIX_H2I_API_KEY" \
-F 'images=@photo.jpg' \
-F 'terms=["John Smith","Project Falcon"]' \
-F 'kinds=["email","card"]' \
-F 'mode=box'Node.js
const { DavixH2I } = require('@davixlabs/h2i-sdk');
const h2i = new DavixH2I({ apiKey: process.env.DAVIX_H2I_API_KEY, baseUrl: process.env.DAVIX_H2I_URL });
const result = await h2i.images.redactText({
"images": 'photo.jpg',
"terms": "[\"John Smith\",\"Project Falcon\"]",
"kinds": "[\"email\",\"card\"]",
"mode": "box"
});
console.log(result.data, result.requestId);PHP
<?php
require 'vendor/autoload.php';
$h2i = new \Davix\H2I\Client(['apiKey' => getenv('DAVIX_H2I_API_KEY'), 'baseUrl' => getenv('DAVIX_H2I_URL')]);
$result = $h2i->images()->redactText([
'images' => 'photo.jpg',
'terms' => '["John Smith","Project Falcon"]',
'kinds' => '["email","card"]',
'mode' => 'box',
]);
echo $result->requestId;