typefile
{
"blur": 5,
"image": "https://replicate.delivery/pbxt/J1sfRLwQpduwTZtdBV6o15BzrEpF7aAJl6FatWNX8vmX6otU/Namor%20dans%20Black%20Panther%20Wakanda%20Forever.jpeg"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_6ew**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
import fs from "node:fs";
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
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_6ew**********************************
This is your API token. Keep it to yourself.
import replicate
Run kharioki/blur-faces using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = 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:
print(output.url())
#=> "http://example.com"
# To write the file to disk:
with open("my-image.png", "wb") as file:
file.write(output.read())
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_6ew**********************************
This is your API token. Keep it to yourself.
Run kharioki/blur-faces using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
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.
{
"id": "2hjz5qzbtgdhkylakz6zoe5tva",
"model": "kharioki/blur-faces",
"version": "bdcc18be6a02a8f2efce1a3f7489f74a1d6729caea9b53061358fe75c93799d2",
"input": {
"blur": 5,
"image": "https://replicate.delivery/pbxt/J1sfRLwQpduwTZtdBV6o15BzrEpF7aAJl6FatWNX8vmX6otU/Namor%20dans%20Black%20Panther%20Wakanda%20Forever.jpeg"
},
"logs": "",
"output": "https://replicate.delivery/pbxt/bEFyY9yhaxryM9LK6HLN7I0VeXTlX5ORiGVjBMWleCefKQeIC/out.png",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2023-06-19T17:21:31.058824Z",
"started_at": "2023-06-19T17:21:50.816378Z",
"completed_at": "2023-06-19T17:21:52.441116Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/2hjz5qzbtgdhkylakz6zoe5tva/cancel",
"get": "https://api.replicate.com/v1/predictions/2hjz5qzbtgdhkylakz6zoe5tva"
},
"metrics": {
"predict_time": 1.624738,
"total_time": 21.382292
}
}
