typetext
{
"aspect_ratio": "16:9",
"output_format": "jpg",
"prompt": "dragon",
"upscale_factor": "4x"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_KaI**********************************
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 shridharathi/motion-blur-image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = {
aspect_ratio: "16:9",
output_format: "jpg",
prompt: "dragon",
upscale_factor: "4x"
};
const output = await replicate.run("shridharathi/motion-blur-image", { input });
// 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_KaI**********************************
This is your API token. Keep it to yourself.
import replicate
Run shridharathi/motion-blur-image using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"shridharathi/motion-blur-image",
input={
"aspect_ratio": "16:9",
"output_format": "jpg",
"prompt": "dragon",
"upscale_factor": "4x"
}
)
# 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_KaI**********************************
This is your API token. Keep it to yourself.
Run shridharathi/motion-blur-image 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 $'{
"input": {
"aspect_ratio": "16:9",
"output_format": "jpg",
"prompt": "dragon",
"upscale_factor": "4x"
}
}' \
https://api.replicate.com/v1/models/shridharathi/motion-blur-image/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "6t4w3r0he5rma0cqy86s80c8vc",
"model": "shridharathi/motion-blur-image",
"version": "hidden",
"input": {
"aspect_ratio": "16:9",
"output_format": "jpg",
"prompt": "dragon",
"upscale_factor": "4x"
},
"logs": "",
"output": "https://replicate.delivery/xezq/eUDwCPDuaxWqSS0ndugwINMWbOsbG7W6d1oWi7gHtabFgmfUA/tmpkil2_f7j.jpg",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-07-10T01:57:12.177Z",
"started_at": "2025-07-10T01:57:12.718982Z",
"completed_at": "2025-07-10T01:57:30.541263Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/6t4w3r0he5rma0cqy86s80c8vc/cancel",
"children": "https://api.replicate.com/v1/predictions/6t4w3r0he5rma0cqy86s80c8vc/children",
"get": "https://api.replicate.com/v1/predictions/6t4w3r0he5rma0cqy86s80c8vc",
"root": "https://api.replicate.com/v1/predictions/6t4w3r0he5rma0cqy86s80c8vc",
"stream": "https://stream.replicate.com/v1/files/bcwr-i2oyqvkavw6a7cepczeyavkklneatbamz5jxrhn52uphilpy4vcq",
"web": "https://replicate.com/p/6t4w3r0he5rma0cqy86s80c8vc"
},
"metrics": {
"predict_time": 17.82228111,
"total_time": 18.364263
}
}