typetext
{
"duration": 5,
"frames_per_second": 24,
"guidance_scale": 9,
"prompt": "A gripping movie trailer showcasing a young female astronaut in a iridescent spacesuit, sporting a red wool knitted space helmet. She explores a bioluminescent alien forest under twin moons, filmed in vivid IMAX quality. Retro sci-fi aesthetic, lens flares",
"video_guidance_scale": 5
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_0d1**********************************
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 zsxkib/pyramid-flow using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"zsxkib/pyramid-flow:8e221e66498a52bb3a928a4b49d85379c99ca60fec41511265deec35d547c1fb",
{
input: {
duration: 5,
frames_per_second: 24,
guidance_scale: 9,
prompt: "A gripping movie trailer showcasing a young female astronaut in a iridescent spacesuit, sporting a red wool knitted space helmet. She explores a bioluminescent alien forest under twin moons, filmed in vivid IMAX quality. Retro sci-fi aesthetic, lens flares",
video_guidance_scale: 5
}
}
);
// 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_0d1**********************************
This is your API token. Keep it to yourself.
import replicate
Run zsxkib/pyramid-flow using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"zsxkib/pyramid-flow:8e221e66498a52bb3a928a4b49d85379c99ca60fec41511265deec35d547c1fb",
input={
"duration": 5,
"frames_per_second": 24,
"guidance_scale": 9,
"prompt": "A gripping movie trailer showcasing a young female astronaut in a iridescent spacesuit, sporting a red wool knitted space helmet. She explores a bioluminescent alien forest under twin moons, filmed in vivid IMAX quality. Retro sci-fi aesthetic, lens flares",
"video_guidance_scale": 5
}
)
# 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_0d1**********************************
This is your API token. Keep it to yourself.
Run zsxkib/pyramid-flow 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": "zsxkib/pyramid-flow:8e221e66498a52bb3a928a4b49d85379c99ca60fec41511265deec35d547c1fb",
"input": {
"duration": 5,
"frames_per_second": 24,
"guidance_scale": 9,
"prompt": "A gripping movie trailer showcasing a young female astronaut in a iridescent spacesuit, sporting a red wool knitted space helmet. She explores a bioluminescent alien forest under twin moons, filmed in vivid IMAX quality. Retro sci-fi aesthetic, lens flares",
"video_guidance_scale": 5
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "28b0nb8xnnrj60cjf2vb4fmp94",
"model": "zsxkib/pyramid-flow",
"version": "8e221e66498a52bb3a928a4b49d85379c99ca60fec41511265deec35d547c1fb",
"input": {
"duration": 5,
"frames_per_second": 24,
"guidance_scale": 9,
"prompt": "A gripping movie trailer showcasing a young female astronaut in a iridescent spacesuit, sporting a red wool knitted space helmet. She explores a bioluminescent alien forest under twin moons, filmed in vivid IMAX quality. Retro sci-fi aesthetic, lens flares",
"video_guidance_scale": 5
},
"logs": "0%| | 0/16 [00:00<?, ?it/s]\n 6%|▋ | 1/16 [00:08<02:01, 8.13s/it]\n 12%|█▎ | 2/16 [00:17<02:01, 8.69s/it]\n 19%|█▉ | 3/16 [00:27<02:03, 9.46s/it]\n 25%|██▌ | 4/16 [00:38<02:01, 10.13s/it]\n 31%|███▏ | 5/16 [00:50<01:58, 10.73s/it]\n 38%|███▊ | 6/16 [01:02<01:52, 11.27s/it]\n 44%|████▍ | 7/16 [01:15<01:46, 11.81s/it]\n 50%|█████ | 8/16 [01:29<01:38, 12.33s/it]\n 56%|█████▋ | 9/16 [01:43<01:30, 12.94s/it]\n 62%|██████▎ | 10/16 [01:58<01:21, 13.57s/it]\n 69%|██████▉ | 11/16 [02:13<01:10, 14.17s/it]\n 75%|███████▌ | 12/16 [02:30<00:59, 14.82s/it]\n 81%|████████▏ | 13/16 [02:47<00:46, 15.45s/it]\n 88%|████████▊ | 14/16 [03:05<00:32, 16.16s/it]\n 94%|█████████▍| 15/16 [03:23<00:16, 16.83s/it]\n100%|██████████| 16/16 [03:42<00:00, 17.58s/it]\n100%|██████████| 16/16 [03:42<00:00, 13.92s/it]\nhuggingface/tokenizers: The current process just got forked, after parallelism has already been used. Disabling parallelism to avoid deadlocks...\nTo disable this warning, you can either:\n- Avoid using `tokenizers` before the fork if possible\n- Explicitly set the environment variable TOKENIZERS_PARALLELISM=(true | false)",
"output": "https://replicate.delivery/yhqm/5fhDu5VhX21zBK3oCphPd2SvQ1px4wvLgF8Ughg5U1EjlwyJA/output_video.mp4",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2024-10-10T23:14:14.061Z",
"started_at": "2024-10-10T23:14:14.079883Z",
"completed_at": "2024-10-10T23:18:30.186752Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/28b0nb8xnnrj60cjf2vb4fmp94/cancel",
"get": "https://api.replicate.com/v1/predictions/28b0nb8xnnrj60cjf2vb4fmp94",
"web": "https://replicate.com/p/28b0nb8xnnrj60cjf2vb4fmp94"
},
"metrics": {
"predict_time": 256.106868797,
"total_time": 256.125752
}
}