Prediction
ahm3texe/blur:2b8674aa24f935e94118f57731a323753e8d1af836c42c265de156015173080eID
dmgtagh199rga0ckvf7rt78f2c
Status
Succeeded
Source
Web
Hardware
CPU
Total duration
Created
Input
{
"blur": 10,
"image": "https://replicate.delivery/pbxt/MAT1S5CrMehUJpkarzilKmk9v4hlcSnq1BRx3luRtdIv2Wrv/WhatsApp%20Image%202024-12-12%20at%2023.13.44.jpeg"
}
Install Replicate’s Node.js client library:
npm install replicate
Set the
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import and set up the client:
import Replicate from "replicate";
import fs from "node:fs";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run ahm3texe/blur using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"ahm3texe/blur:2b8674aa24f935e94118f57731a323753e8d1af836c42c265de156015173080e",
{
input: {
blur: 10,
image: "https://replicate.delivery/pbxt/MAT1S5CrMehUJpkarzilKmk9v4hlcSnq1BRx3luRtdIv2Wrv/WhatsApp%20Image%202024-12-12%20at%2023.13.44.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.
Install Replicate’s Python client library:
pip install replicate
Set the
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import the client:
import replicate
Run ahm3texe/blur using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"ahm3texe/blur:2b8674aa24f935e94118f57731a323753e8d1af836c42c265de156015173080e",
input={
"blur": 10,
"image": "https://replicate.delivery/pbxt/MAT1S5CrMehUJpkarzilKmk9v4hlcSnq1BRx3luRtdIv2Wrv/WhatsApp%20Image%202024-12-12%20at%2023.13.44.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.
Set the
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run ahm3texe/blur 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": "ahm3texe/blur:2b8674aa24f935e94118f57731a323753e8d1af836c42c265de156015173080e",
"input": {
"blur": 10,
"image": "https://replicate.delivery/pbxt/MAT1S5CrMehUJpkarzilKmk9v4hlcSnq1BRx3luRtdIv2Wrv/WhatsApp%20Image%202024-12-12%20at%2023.13.44.jpeg"
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{
"completed_at": "2024-12-18T22:07:14.783780Z",
"created_at": "2024-12-18T22:06:45.066000Z",
"data_removed": false,
"error": null,
"id": "dmgtagh199rga0ckvf7rt78f2c",
"input": {
"blur": 10,
"image": "https://replicate.delivery/pbxt/MAT1S5CrMehUJpkarzilKmk9v4hlcSnq1BRx3luRtdIv2Wrv/WhatsApp%20Image%202024-12-12%20at%2023.13.44.jpeg"
},
"logs": null,
"metrics": {
"predict_time": 1.3831582550000001,
"total_time": 29.71778
},
"output": "https://replicate.delivery/czjl/mFeBAJDHbIxbOywdCsfwXJpzkkx1t27sljsEWdehR32kMfwPB/out.png",
"started_at": "2024-12-18T22:07:13.400622Z",
"status": "succeeded",
"urls": {
"stream": "https://stream.replicate.com/v1/files/fddq-axzqmy7jixyhgnfmtjpktjrsd7yq3ny6sdw3jv7m4xt3mnia6sda",
"get": "https://api.replicate.com/v1/predictions/dmgtagh199rga0ckvf7rt78f2c",
"cancel": "https://api.replicate.com/v1/predictions/dmgtagh199rga0ckvf7rt78f2c/cancel"
},
"version": "2b8674aa24f935e94118f57731a323753e8d1af836c42c265de156015173080e"
}