Import and set up the client:
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run meltred/cavalry-1 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"meltred/cavalry-1:fd1ca1dd118ad5d243a24cbb2ca9ff2bf87111f490ef33eb27a3d45ec92de97e",
{
input: {
text: "World"
}
}
);
console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
Run meltred/cavalry-1 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"meltred/cavalry-1:fd1ca1dd118ad5d243a24cbb2ca9ff2bf87111f490ef33eb27a3d45ec92de97e",
input={
"text": "World"
}
)
print(output)
To learn more, take a look at the guide on getting started with Python.
Run meltred/cavalry-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": "fd1ca1dd118ad5d243a24cbb2ca9ff2bf87111f490ef33eb27a3d45ec92de97e",
"input": {
"text": "World"
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.