typefile
{
"image": "https://replicate.delivery/pbxt/NWWUiJjPb9QaHySWmYFfSLGDB8pTmsEuLFTjvUSigIaKblv2/1.jpg"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_Deo**********************************
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 andreasjansson/jpg-glitch-animation using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = {
image: "https://replicate.delivery/pbxt/NWWUiJjPb9QaHySWmYFfSLGDB8pTmsEuLFTjvUSigIaKblv2/1.jpg"
};
const output = await replicate.run("andreasjansson/jpg-glitch-animation", { 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_Deo**********************************
This is your API token. Keep it to yourself.
import replicate
Run andreasjansson/jpg-glitch-animation using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"andreasjansson/jpg-glitch-animation",
input={
"image": "https://replicate.delivery/pbxt/NWWUiJjPb9QaHySWmYFfSLGDB8pTmsEuLFTjvUSigIaKblv2/1.jpg"
}
)
# 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_Deo**********************************
This is your API token. Keep it to yourself.
Run andreasjansson/jpg-glitch-animation 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": {
"image": "https://replicate.delivery/pbxt/NWWUiJjPb9QaHySWmYFfSLGDB8pTmsEuLFTjvUSigIaKblv2/1.jpg"
}
}' \
https://api.replicate.com/v1/models/andreasjansson/jpg-glitch-animation/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "ew76f7td2nrmc0crkx9v1vzgnr",
"model": "andreasjansson/jpg-glitch-animation",
"version": "hidden",
"input": {
"image": "https://replicate.delivery/pbxt/NWWUiJjPb9QaHySWmYFfSLGDB8pTmsEuLFTjvUSigIaKblv2/1.jpg"
},
"logs": "",
"output": "https://replicate.delivery/xezq/ixvOB0jn0f3dEidNbHTsadfSe5OJmRb8LONJmAHEh2JbglUqA/tmp_gs5d42v.mp4",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-08-12T17:28:13.333Z",
"started_at": "2025-08-12T17:28:13.748866Z",
"completed_at": "2025-08-12T17:29:49.844721Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/ew76f7td2nrmc0crkx9v1vzgnr/cancel",
"children": "https://api.replicate.com/v1/predictions/ew76f7td2nrmc0crkx9v1vzgnr/children",
"get": "https://api.replicate.com/v1/predictions/ew76f7td2nrmc0crkx9v1vzgnr",
"root": "https://api.replicate.com/v1/predictions/ew76f7td2nrmc0crkx9v1vzgnr",
"stream": "https://stream.replicate.com/v1/files/bcwr-mqrbuctzvfvggnjyiupl5ooptc6n2lxes3wf4ghfrrjyc7nky36a",
"web": "https://replicate.com/p/ew76f7td2nrmc0crkx9v1vzgnr"
},
"metrics": {
"predict_time": 96.095854944,
"total_time": 96.511721
}
}