Adds a blur filter on image
{ "blur": 5, "image": "https://replicate.delivery/pbxt/J1sfRLwQpduwTZtdBV6o15BzrEpF7aAJl6FatWNX8vmX6otU/Namor%20dans%20Black%20Panther%20Wakanda%20Forever.jpeg" }
npm install replicate
import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run kharioki/blur-faces using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "kharioki/blur-faces:bdcc18be6a02a8f2efce1a3f7489f74a1d6729caea9b53061358fe75c93799d2", { input: { blur: 5, image: "https://replicate.delivery/pbxt/J1sfRLwQpduwTZtdBV6o15BzrEpF7aAJl6FatWNX8vmX6otU/Namor%20dans%20Black%20Panther%20Wakanda%20Forever.jpeg" } } ); // To access the file URL: console.log(output.url()); //=> "http://example.com" // To write the file to disk: fs.writeFile("my-image.png", output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
import replicate
output = replicate.run( "kharioki/blur-faces:bdcc18be6a02a8f2efce1a3f7489f74a1d6729caea9b53061358fe75c93799d2", input={ "blur": 5, "image": "https://replicate.delivery/pbxt/J1sfRLwQpduwTZtdBV6o15BzrEpF7aAJl6FatWNX8vmX6otU/Namor%20dans%20Black%20Panther%20Wakanda%20Forever.jpeg" } ) print(output)
To learn more, take a look at the guide on getting started with Python.
curl -s -X POST \ -H "Authorization: Bearer $REPLICATE_API_TOKEN" \ -H "Content-Type: application/json" \ -H "Prefer: wait" \ -d $'{ "version": "kharioki/blur-faces:bdcc18be6a02a8f2efce1a3f7489f74a1d6729caea9b53061358fe75c93799d2", "input": { "blur": 5, "image": "https://replicate.delivery/pbxt/J1sfRLwQpduwTZtdBV6o15BzrEpF7aAJl6FatWNX8vmX6otU/Namor%20dans%20Black%20Panther%20Wakanda%20Forever.jpeg" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{ "completed_at": "2023-06-19T17:21:52.441116Z", "created_at": "2023-06-19T17:21:31.058824Z", "data_removed": false, "error": null, "id": "2hjz5qzbtgdhkylakz6zoe5tva", "input": { "blur": 5, "image": "https://replicate.delivery/pbxt/J1sfRLwQpduwTZtdBV6o15BzrEpF7aAJl6FatWNX8vmX6otU/Namor%20dans%20Black%20Panther%20Wakanda%20Forever.jpeg" }, "logs": null, "metrics": { "predict_time": 1.624738, "total_time": 21.382292 }, "output": "https://replicate.delivery/pbxt/bEFyY9yhaxryM9LK6HLN7I0VeXTlX5ORiGVjBMWleCefKQeIC/out.png", "started_at": "2023-06-19T17:21:50.816378Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/2hjz5qzbtgdhkylakz6zoe5tva", "cancel": "https://api.replicate.com/v1/predictions/2hjz5qzbtgdhkylakz6zoe5tva/cancel" }, "version": "bdcc18be6a02a8f2efce1a3f7489f74a1d6729caea9b53061358fe75c93799d2" }
Want to make some of these yourself?
This model is cold. You'll get a fast response if the model is warm and already running, and a slower response if the model is cold and starting up.