default512
typenumeric-range
value typeinteger
minimum1
maximum4096
{
"depth": 3,
"format": "mp4",
"fps": 60,
"height": 1024,
"num_frames": 600,
"scale": 2,
"speed": 2,
"width": 1024
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_JDF**********************************
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 replicate/goo using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"replicate/goo:2b584b744053a34d738ef83ea0adef3fbf6c11ccb1cf6c270eace8c66cec624b",
{
input: {
depth: 3,
format: "mp4",
fps: 60,
height: 1024,
num_frames: 600,
scale: 2,
speed: 2,
width: 1024
}
}
);
// 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_JDF**********************************
This is your API token. Keep it to yourself.
import replicate
Run replicate/goo using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"replicate/goo:2b584b744053a34d738ef83ea0adef3fbf6c11ccb1cf6c270eace8c66cec624b",
input={
"depth": 3,
"format": "mp4",
"fps": 60,
"height": 1024,
"num_frames": 600,
"scale": 2,
"speed": 2,
"width": 1024
}
)
# 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_JDF**********************************
This is your API token. Keep it to yourself.
Run replicate/goo 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": "replicate/goo:2b584b744053a34d738ef83ea0adef3fbf6c11ccb1cf6c270eace8c66cec624b",
"input": {
"depth": 3,
"format": "mp4",
"fps": 60,
"height": 1024,
"num_frames": 600,
"scale": 2,
"speed": 2,
"width": 1024
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "g0nwqxs2qhrmc0cnh248x740v8",
"model": "replicate/goo",
"version": "2b584b744053a34d738ef83ea0adef3fbf6c11ccb1cf6c270eace8c66cec624b",
"input": {
"depth": 3,
"format": "mp4",
"fps": 60,
"height": 1024,
"num_frames": 600,
"scale": 2,
"speed": 2,
"width": 1024
},
"logs": "",
"output": "https://replicate.delivery/xezq/cSkUWr5uQY5YP5nwuqfZyQUxPLd0ooBejWxp7oYwmJBKprXUA/output.mp4",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-03-12T04:06:18.044Z",
"started_at": "2025-03-12T04:06:25.506189Z",
"completed_at": "2025-03-12T04:06:34.466307Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/g0nwqxs2qhrmc0cnh248x740v8/cancel",
"get": "https://api.replicate.com/v1/predictions/g0nwqxs2qhrmc0cnh248x740v8",
"stream": "https://stream.replicate.com/v1/files/bcwr-4q3u7xunxut5puhbfhyrvmcuqwgwpkq5anjucf2z5kcsebs53fka",
"web": "https://replicate.com/p/g0nwqxs2qhrmc0cnh248x740v8"
},
"metrics": {
"predict_time": 8.960117893,
"total_time": 16.422307
}
}