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