typetext
{
"add_psychedelic_audio": true,
"animal": "lion",
"aspect_ratio": "16:9",
"duration": 8,
"quality": "720p",
"trip_intensity": "moderate",
"visual_style": "fractal_mandala"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_cvA**********************************
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 corywilkerson/animal-to-train using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = {
add_psychedelic_audio: true,
animal: "lion",
aspect_ratio: "16:9",
duration: 8,
quality: "720p",
trip_intensity: "moderate",
visual_style: "fractal_mandala"
};
const output = await replicate.run("corywilkerson/animal-to-train", { 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_cvA**********************************
This is your API token. Keep it to yourself.
import replicate
Run corywilkerson/animal-to-train using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"corywilkerson/animal-to-train",
input={
"add_psychedelic_audio": True,
"animal": "lion",
"aspect_ratio": "16:9",
"duration": 8,
"quality": "720p",
"trip_intensity": "moderate",
"visual_style": "fractal_mandala"
}
)
# 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_cvA**********************************
This is your API token. Keep it to yourself.
Run corywilkerson/animal-to-train 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": {
"add_psychedelic_audio": true,
"animal": "lion",
"aspect_ratio": "16:9",
"duration": 8,
"quality": "720p",
"trip_intensity": "moderate",
"visual_style": "fractal_mandala"
}
}' \
https://api.replicate.com/v1/models/corywilkerson/animal-to-train/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "sv3exn07g1rme0crnb3av4c4e8",
"model": "corywilkerson/animal-to-train",
"version": "hidden",
"input": {
"add_psychedelic_audio": true,
"animal": "lion",
"aspect_ratio": "16:9",
"duration": 8,
"quality": "720p",
"trip_intensity": "moderate",
"visual_style": "fractal_mandala"
},
"logs": "",
"output": "https://replicate.delivery/xezq/6iLyteHOrhSFIqPFogKOCSPBfkuX8Cgl3Mq4NVjnCFipoBLVA/tmp06oiubij.mp4",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-08-14T22:49:21.536Z",
"started_at": "2025-08-14T22:49:21.864628Z",
"completed_at": "2025-08-14T22:50:18.176228Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/sv3exn07g1rme0crnb3av4c4e8/cancel",
"children": "https://api.replicate.com/v1/predictions/sv3exn07g1rme0crnb3av4c4e8/children",
"get": "https://api.replicate.com/v1/predictions/sv3exn07g1rme0crnb3av4c4e8",
"root": "https://api.replicate.com/v1/predictions/sv3exn07g1rme0crnb3av4c4e8",
"stream": "https://stream.replicate.com/v1/files/bcwr-2iokskgdnik7taoby45ddmtbfpd55fpw56m63xixuwjppzbmyx7a",
"web": "https://replicate.com/p/sv3exn07g1rme0crnb3av4c4e8"
},
"metrics": {
"predict_time": 56.311600271,
"total_time": 56.640228
}
}