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