typetext
{
"text": "Floyd"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_1IO**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run vessl-ai/floyd-cpu-custom-cog-test using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"vessl-ai/floyd-cpu-custom-cog-test:e9bfe1a1a4f3d776c20779fe40b9f11d9fef48c227e2c5450e6a35fda5b2d6c5",
{
input: {
text: "Floyd"
}
}
);
console.log(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_1IO**********************************
This is your API token. Keep it to yourself.
import replicate
Run vessl-ai/floyd-cpu-custom-cog-test using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"vessl-ai/floyd-cpu-custom-cog-test:e9bfe1a1a4f3d776c20779fe40b9f11d9fef48c227e2c5450e6a35fda5b2d6c5",
input={
"text": "Floyd"
}
)
print(output)
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_1IO**********************************
This is your API token. Keep it to yourself.
Run vessl-ai/floyd-cpu-custom-cog-test 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": "vessl-ai/floyd-cpu-custom-cog-test:e9bfe1a1a4f3d776c20779fe40b9f11d9fef48c227e2c5450e6a35fda5b2d6c5",
"input": {
"text": "Floyd"
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
hello Floyd
{
"id": "4svdedzbrkkq6dx3vi6aknvg6e",
"model": "vessl-ai/floyd-cpu-custom-cog-test",
"version": "e9bfe1a1a4f3d776c20779fe40b9f11d9fef48c227e2c5450e6a35fda5b2d6c5",
"input": {
"text": "Floyd"
},
"logs": "",
"output": "hello Floyd",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2024-02-22T05:17:04.359468Z",
"started_at": "2024-02-22T05:17:04.374693Z",
"completed_at": "2024-02-22T05:17:04.379294Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/4svdedzbrkkq6dx3vi6aknvg6e/cancel",
"get": "https://api.replicate.com/v1/predictions/4svdedzbrkkq6dx3vi6aknvg6e"
},
"metrics": {
"predict_time": 0.004601,
"total_time": 0.019826
}
}