defaultClose-up of a chameleon's eye, with its scaly skin changing color. Ultra high resolution 4k.
typetext
{
"fps": 24,
"guidance_scale": 6,
"num_frames": 121,
"num_inference_steps": 30,
"prompt": "a parrot flying in the blue skies, a grainy or noisy video effect in the background",
"seed": 8520
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_b8p**********************************
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 genmoai/mochi-1 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"genmoai/mochi-1:1944af04d098ef69bed7f9d335d102e652203f268ec4aaa2d836f6217217e460",
{
input: {
fps: 24,
guidance_scale: 6,
num_frames: 121,
num_inference_steps: 30,
prompt: "a parrot flying in the blue skies, a grainy or noisy video effect in the background",
seed: 8520
}
}
);
// 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_b8p**********************************
This is your API token. Keep it to yourself.
import replicate
Run genmoai/mochi-1 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"genmoai/mochi-1:1944af04d098ef69bed7f9d335d102e652203f268ec4aaa2d836f6217217e460",
input={
"fps": 24,
"guidance_scale": 6,
"num_frames": 121,
"num_inference_steps": 30,
"prompt": "a parrot flying in the blue skies, a grainy or noisy video effect in the background",
"seed": 8520
}
)
# 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_b8p**********************************
This is your API token. Keep it to yourself.
Run genmoai/mochi-1 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": "genmoai/mochi-1:1944af04d098ef69bed7f9d335d102e652203f268ec4aaa2d836f6217217e460",
"input": {
"fps": 24,
"guidance_scale": 6,
"num_frames": 121,
"num_inference_steps": 30,
"prompt": "a parrot flying in the blue skies, a grainy or noisy video effect in the background",
"seed": 8520
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "ec2a7442n1rmc0ckpwqsh01784",
"model": "genmoai/mochi-1",
"version": "1944af04d098ef69bed7f9d335d102e652203f268ec4aaa2d836f6217217e460",
"input": {
"fps": 24,
"guidance_scale": 6,
"num_frames": 121,
"num_inference_steps": 30,
"prompt": "a parrot flying in the blue skies, a grainy or noisy video effect in the background",
"seed": 8520
},
"logs": "Using seed: 8520\n 0%| | 0/30 [00:00<?, ?it/s]\n 3%|▎ | 1/30 [00:15<07:21, 15.22s/it]\n 7%|▋ | 2/30 [00:20<04:28, 9.58s/it]\n 10%|█ | 3/30 [00:27<03:40, 8.15s/it]\n 13%|█▎ | 4/30 [00:33<03:14, 7.48s/it]\n 17%|█▋ | 5/30 [00:40<02:57, 7.11s/it]\n 20%|██ | 6/30 [00:46<02:45, 6.88s/it]\n 23%|██▎ | 7/30 [00:53<02:35, 6.74s/it]\n 27%|██▋ | 8/30 [00:59<02:26, 6.65s/it]\n 30%|███ | 9/30 [01:06<02:18, 6.59s/it]\n 33%|███▎ | 10/30 [01:12<02:11, 6.55s/it]\n 37%|███▋ | 11/30 [01:18<02:03, 6.52s/it]\n 40%|████ | 12/30 [01:25<01:57, 6.51s/it]\n 43%|████▎ | 13/30 [01:31<01:50, 6.50s/it]\n 47%|████▋ | 14/30 [01:38<01:43, 6.49s/it]\n 50%|█████ | 15/30 [01:44<01:37, 6.49s/it]\n 53%|█████▎ | 16/30 [01:51<01:30, 6.48s/it]\n 57%|█████▋ | 17/30 [01:57<01:24, 6.48s/it]\n 60%|██████ | 18/30 [02:04<01:17, 6.48s/it]\n 63%|██████▎ | 19/30 [02:10<01:11, 6.48s/it]\n 67%|██████▋ | 20/30 [02:17<01:04, 6.48s/it]\n 70%|███████ | 21/30 [02:23<00:58, 6.48s/it]\n 73%|███████▎ | 22/30 [02:30<00:51, 6.48s/it]\n 77%|███████▋ | 23/30 [02:36<00:45, 6.48s/it]\n 80%|████████ | 24/30 [02:43<00:38, 6.47s/it]\n 83%|████████▎ | 25/30 [02:49<00:32, 6.47s/it]\n 87%|████████▋ | 26/30 [02:56<00:25, 6.47s/it]\n 90%|█████████ | 27/30 [03:02<00:19, 6.47s/it]\n 93%|█████████▎| 28/30 [03:08<00:12, 6.47s/it]\n 97%|█████████▋| 29/30 [03:15<00:06, 6.47s/it]\n100%|██████████| 30/30 [03:21<00:00, 6.47s/it]\n100%|██████████| 30/30 [03:21<00:00, 6.73s/it]",
"output": "https://replicate.delivery/xezq/8FHk9m4MFtL5JhxIbGvXKyKxV9uRvoqzPqKa3YJxhpJWae8JA/output.mp4",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2024-12-11T19:26:04.456Z",
"started_at": "2024-12-11T19:26:53.454959Z",
"completed_at": "2024-12-11T19:30:32.261161Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/ec2a7442n1rmc0ckpwqsh01784/cancel",
"get": "https://api.replicate.com/v1/predictions/ec2a7442n1rmc0ckpwqsh01784",
"stream": "https://stream.replicate.com/v1/files/bcwr-f5dcyatmzyhn5hhr72mru23dq5cbecrrunkbx3adfle3umhx5pda",
"web": "https://replicate.com/p/ec2a7442n1rmc0ckpwqsh01784"
},
"metrics": {
"predict_time": 218.806201529,
"total_time": 267.805161
}
}