typetext
{
"music_prompt": "dark ambient, suspenseful synth pads, distorted analog sounds, eerie drones, vintage horror soundtrack, found footage style, subtle dissonance, low rumbling bass",
"prompt": "a woman in a white dress in a sunflower field"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_JIt**********************************
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 pipeline-examples/hunyuan-glitch using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = {
music_prompt: "dark ambient, suspenseful synth pads, distorted analog sounds, eerie drones, vintage horror soundtrack, found footage style, subtle dissonance, low rumbling bass",
prompt: "a woman in a white dress in a sunflower field"
};
const output = await replicate.run("pipeline-examples/hunyuan-glitch", { 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_JIt**********************************
This is your API token. Keep it to yourself.
import replicate
Run pipeline-examples/hunyuan-glitch using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"pipeline-examples/hunyuan-glitch",
input={
"music_prompt": "dark ambient, suspenseful synth pads, distorted analog sounds, eerie drones, vintage horror soundtrack, found footage style, subtle dissonance, low rumbling bass",
"prompt": "a woman in a white dress in a sunflower field"
}
)
# 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_JIt**********************************
This is your API token. Keep it to yourself.
Run pipeline-examples/hunyuan-glitch 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": {
"music_prompt": "dark ambient, suspenseful synth pads, distorted analog sounds, eerie drones, vintage horror soundtrack, found footage style, subtle dissonance, low rumbling bass",
"prompt": "a woman in a white dress in a sunflower field"
}
}' \
https://api.replicate.com/v1/models/pipeline-examples/hunyuan-glitch/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "j6fb2m9yghrmc0crnxgtfczyp4",
"model": "pipeline-examples/hunyuan-glitch",
"version": "hidden",
"input": {
"music_prompt": "dark ambient, suspenseful synth pads, distorted analog sounds, eerie drones, vintage horror soundtrack, found footage style, subtle dissonance, low rumbling bass",
"prompt": "a woman in a white dress in a sunflower field"
},
"logs": "MoviePy - Building video output.mp4.\nMoviePy - Writing audio in outputTEMP_MPY_wvf_snd.mp3\n\nchunk: 0%| | 0/662 [00:00<?, ?it/s, now=None]\nchunk: 23%|██▎ | 150/662 [00:00<00:00, 1490.80it/s, now=None]\nchunk: 45%|████▌ | 300/662 [00:00<00:00, 1205.50it/s, now=None]\nchunk: 64%|██████▍ | 424/662 [00:00<00:00, 1146.16it/s, now=None]\nchunk: 82%|████████▏ | 541/662 [00:00<00:00, 1131.16it/s, now=None]\nchunk: 99%|█████████▉| 655/662 [00:00<00:00, 1120.65it/s, now=None]\n \nMoviePy - Done.\nMoviePy - Writing video output.mp4\n\n\nframe_index: 0%| | 0/720 [00:00<?, ?it/s, now=None]\nframe_index: 3%|▎ | 20/720 [00:00<00:03, 196.73it/s, now=None]\nframe_index: 6%|▌ | 40/720 [00:00<00:03, 194.88it/s, now=None]\nframe_index: 8%|▊ | 60/720 [00:00<00:04, 154.96it/s, now=None]\nframe_index: 11%|█ | 77/720 [00:00<00:04, 140.78it/s, now=None]\nframe_index: 14%|█▍ | 104/720 [00:01<00:07, 80.37it/s, now=None]\nframe_index: 16%|█▌ | 114/720 [00:01<00:08, 74.29it/s, now=None]\nframe_index: 17%|█▋ | 123/720 [00:01<00:08, 72.37it/s, now=None]/app/.venv/lib/python3.13/site-packages/moviepy/video/io/ffmpeg_reader.py:190: UserWarning: In file /tmp/cog-runner-tmp-695531102/59d7601268edc85a/output_1291.mp4, 61440 bytes wanted but 0 bytes read at frame index 129 (out of a total 129 frames), at time 5.38/5.38 sec. Using the last valid frame instead.\n warnings.warn(\n\nframe_index: 18%|█▊ | 131/720 [00:01<00:08, 66.86it/s, now=None]\nframe_index: 19%|█▉ | 139/720 [00:01<00:09, 63.47it/s, now=None]\nframe_index: 20%|██ | 146/720 [00:01<00:09, 60.60it/s, now=None]\nframe_index: 21%|██▏ | 153/720 [00:01<00:10, 55.80it/s, now=None]\nframe_index: 22%|██▏ | 159/720 [00:01<00:10, 55.19it/s, now=None]\nframe_index: 23%|██▎ | 166/720 [00:02<00:09, 57.46it/s, now=None]\nframe_index: 24%|██▍ | 172/720 [00:02<00:09, 56.39it/s, now=None]\nframe_index: 25%|██▍ | 178/720 [00:02<00:09, 55.03it/s, now=None]\nframe_index: 26%|██▌ | 184/720 [00:02<00:09, 55.85it/s, now=None]\nframe_index: 26%|██▋ | 190/720 [00:02<00:09, 56.71it/s, now=None]\nframe_index: 27%|██▋ | 197/720 [00:02<00:09, 57.65it/s, now=None]\nframe_index: 28%|██▊ | 203/720 [00:02<00:08, 57.49it/s, now=None]\nframe_index: 29%|██▉ | 209/720 [00:02<00:08, 57.21it/s, now=None]\nframe_index: 30%|██▉ | 215/720 [00:02<00:09, 55.40it/s, now=None]\nframe_index: 31%|███ | 221/720 [00:03<00:08, 55.56it/s, now=None]\nframe_index: 32%|███▏ | 227/720 [00:03<00:09, 52.98it/s, now=None]\nframe_index: 32%|███▏ | 233/720 [00:03<00:08, 54.61it/s, now=None]\nframe_index: 33%|███▎ | 239/720 [00:03<00:08, 54.61it/s, now=None]\nframe_index: 34%|███▍ | 245/720 [00:03<00:08, 52.91it/s, now=None]\nframe_index: 35%|███▌ | 252/720 [00:03<00:08, 55.65it/s, now=None]\nframe_index: 36%|███▌ | 258/720 [00:03<00:08, 55.73it/s, now=None]\nframe_index: 37%|███▋ | 264/720 [00:03<00:08, 52.59it/s, now=None]\nframe_index: 38%|███▊ | 270/720 [00:04<00:08, 52.00it/s, now=None]\nframe_index: 38%|███▊ | 276/720 [00:04<00:08, 51.65it/s, now=None]\nframe_index: 39%|███▉ | 282/720 [00:04<00:08, 48.88it/s, now=None]\nframe_index: 40%|███▉ | 287/720 [00:04<00:08, 48.78it/s, now=None]\nframe_index: 41%|████ | 292/720 [00:04<00:09, 47.31it/s, now=None]\nframe_index: 41%|████▏ | 297/720 [00:04<00:09, 46.59it/s, now=None]\nframe_index: 42%|████▏ | 303/720 [00:04<00:08, 47.17it/s, now=None]\nframe_index: 43%|████▎ | 308/720 [00:04<00:08, 46.45it/s, now=None]\nframe_index: 44%|████▎ | 314/720 [00:04<00:08, 48.67it/s, now=None]\nframe_index: 44%|████▍ | 319/720 [00:05<00:08, 47.70it/s, now=None]\nframe_index: 45%|████▌ | 325/720 [00:05<00:07, 49.52it/s, now=None]\nframe_index: 46%|████▌ | 330/720 [00:05<00:08, 48.37it/s, now=None]\nframe_index: 47%|████▋ | 335/720 [00:05<00:07, 48.47it/s, now=None]\nframe_index: 47%|████▋ | 341/720 [00:05<00:07, 49.17it/s, now=None]\nframe_index: 48%|████▊ | 347/720 [00:05<00:07, 50.06it/s, now=None]\nframe_index: 49%|████▉ | 354/720 [00:05<00:06, 54.09it/s, now=None]\nframe_index: 50%|█████ | 360/720 [00:05<00:06, 54.83it/s, now=None]\nframe_index: 51%|█████ | 366/720 [00:05<00:06, 54.36it/s, now=None]\nframe_index: 52%|█████▏ | 373/720 [00:06<00:05, 58.62it/s, now=None]\nframe_index: 53%|█████▎ | 379/720 [00:06<00:05, 58.54it/s, now=None]\nframe_index: 54%|█████▎ | 386/720 [00:06<00:05, 57.18it/s, now=None]\nframe_index: 54%|█████▍ | 392/720 [00:06<00:05, 55.81it/s, now=None]\nframe_index: 55%|█████▌ | 398/720 [00:06<00:05, 55.96it/s, now=None]\nframe_index: 56%|█████▋ | 406/720 [00:06<00:05, 58.84it/s, now=None]\nframe_index: 57%|█████▋ | 412/720 [00:06<00:05, 58.95it/s, now=None]\nframe_index: 58%|█████▊ | 418/720 [00:06<00:05, 59.19it/s, now=None]\nframe_index: 59%|█████▉ | 426/720 [00:06<00:04, 61.68it/s, now=None]\nframe_index: 60%|██████ | 433/720 [00:07<00:04, 60.80it/s, now=None]\nframe_index: 61%|██████ | 440/720 [00:07<00:04, 58.58it/s, now=None]\nframe_index: 62%|██████▏ | 447/720 [00:07<00:04, 59.54it/s, now=None]\nframe_index: 63%|██████▎ | 454/720 [00:07<00:04, 61.60it/s, now=None]\nframe_index: 64%|██████▍ | 461/720 [00:07<00:04, 58.22it/s, now=None]\nframe_index: 65%|██████▍ | 467/720 [00:07<00:04, 56.83it/s, now=None]\nframe_index: 66%|██████▌ | 473/720 [00:07<00:04, 57.64it/s, now=None]\nframe_index: 67%|██████▋ | 480/720 [00:07<00:04, 58.59it/s, now=None]\nframe_index: 68%|██████▊ | 486/720 [00:07<00:03, 58.68it/s, now=None]\nframe_index: 68%|██████▊ | 493/720 [00:08<00:03, 58.14it/s, now=None]\nframe_index: 69%|██████▉ | 500/720 [00:08<00:03, 60.54it/s, now=None]\nframe_index: 70%|███████ | 507/720 [00:08<00:03, 59.30it/s, now=None]\nframe_index: 71%|███████▏ | 514/720 [00:08<00:03, 61.21it/s, now=None]\nframe_index: 72%|███████▏ | 521/720 [00:08<00:03, 59.89it/s, now=None]\nframe_index: 73%|███████▎ | 529/720 [00:08<00:03, 62.38it/s, now=None]\nframe_index: 74%|███████▍ | 536/720 [00:08<00:02, 62.56it/s, now=None]\nframe_index: 75%|███████▌ | 543/720 [00:08<00:02, 60.35it/s, now=None]\nframe_index: 76%|███████▋ | 550/720 [00:09<00:02, 62.10it/s, now=None]\nframe_index: 77%|███████▋ | 557/720 [00:09<00:02, 62.44it/s, now=None]\nframe_index: 78%|███████▊ | 564/720 [00:09<00:02, 58.63it/s, now=None]\nframe_index: 79%|███████▉ | 570/720 [00:09<00:02, 56.98it/s, now=None]\nframe_index: 80%|████████ | 577/720 [00:09<00:02, 58.48it/s, now=None]\nframe_index: 81%|████████ | 584/720 [00:09<00:02, 59.04it/s, now=None]\nframe_index: 82%|████████▏ | 591/720 [00:09<00:02, 60.43it/s, now=None]\nframe_index: 83%|████████▎ | 598/720 [00:09<00:02, 60.07it/s, now=None]\nframe_index: 84%|████████▍ | 605/720 [00:09<00:01, 61.43it/s, now=None]\nframe_index: 85%|████████▌ | 612/720 [00:10<00:01, 58.19it/s, now=None]\nframe_index: 86%|████████▌ | 618/720 [00:10<00:01, 58.14it/s, now=None]\nframe_index: 87%|████████▋ | 624/720 [00:10<00:01, 56.06it/s, now=None]\nframe_index: 88%|████████▊ | 630/720 [00:10<00:01, 55.15it/s, now=None]\nframe_index: 88%|████████▊ | 636/720 [00:10<00:01, 53.53it/s, now=None]\nframe_index: 89%|████████▉ | 642/720 [00:10<00:01, 54.09it/s, now=None]\nframe_index: 90%|█████████ | 648/720 [00:10<00:01, 54.81it/s, now=None]\nframe_index: 91%|█████████ | 654/720 [00:10<00:01, 55.64it/s, now=None]\nframe_index: 92%|█████████▏| 661/720 [00:10<00:01, 58.97it/s, now=None]\nframe_index: 93%|█████████▎| 667/720 [00:11<00:00, 58.42it/s, now=None]\nframe_index: 94%|█████████▎| 674/720 [00:11<00:00, 59.76it/s, now=None]\nframe_index: 94%|█████████▍| 680/720 [00:11<00:00, 58.76it/s, now=None]\nframe_index: 96%|█████████▌| 688/720 [00:11<00:00, 61.10it/s, now=None]\nframe_index: 97%|█████████▋| 695/720 [00:11<00:00, 61.81it/s, now=None]\nframe_index: 98%|█████████▊| 702/720 [00:11<00:00, 62.21it/s, now=None]\nframe_index: 98%|█████████▊| 709/720 [00:11<00:00, 62.37it/s, now=None]\nframe_index: 99%|█████████▉| 716/720 [00:11<00:00, 62.19it/s, now=None]\n \nMoviePy - Done !\nMoviePy - video ready output.mp4",
"output": "https://replicate.delivery/xezq/fJJgeLknHksvvUyCL5opcPor6rFy7bAzcLGd8wjKdEitgULVA/output.mp4",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-08-15T20:17:22.564Z",
"started_at": "2025-08-15T20:17:22.939488Z",
"completed_at": "2025-08-15T20:18:53.419684Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/j6fb2m9yghrmc0crnxgtfczyp4/cancel",
"children": "https://api.replicate.com/v1/predictions/j6fb2m9yghrmc0crnxgtfczyp4/children",
"get": "https://api.replicate.com/v1/predictions/j6fb2m9yghrmc0crnxgtfczyp4",
"root": "https://api.replicate.com/v1/predictions/j6fb2m9yghrmc0crnxgtfczyp4",
"stream": "https://stream.replicate.com/v1/files/bcwr-xlhmgp2ccysncbufj723vaexivlc2jdq25aiuprtnwksspuezhba",
"web": "https://replicate.com/p/j6fb2m9yghrmc0crnxgtfczyp4"
},
"metrics": {
"predict_time": 90.480196211,
"total_time": 90.855684
}
}