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