Failed to load versions. Head to the versions page to see all versions for this model.
You're looking at a specific version of this model. Jump to the model overview.
Text to prefix with 'hello '
Run this model in Node.js with one line of code:
npm install replicate
REPLICATE_API_TOKEN
export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run replicate/hello-world using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "replicate/hello-world:5c7d5dc6dd8bf75c1acaa8565735e7986bc5b66206b55cca93cb72c9bf15ccaa", { input: { text: "world" } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
import replicate
output = replicate.run( "replicate/hello-world:5c7d5dc6dd8bf75c1acaa8565735e7986bc5b66206b55cca93cb72c9bf15ccaa", input={ "text": "world" } ) print(output)
To learn more, take a look at the guide on getting started with Python.
curl -s -X POST \ -H "Authorization: Bearer $REPLICATE_API_TOKEN" \ -H "Content-Type: application/json" \ -H "Prefer: wait" \ -d $'{ "version": "replicate/hello-world:5c7d5dc6dd8bf75c1acaa8565735e7986bc5b66206b55cca93cb72c9bf15ccaa", "input": { "text": "world" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{ "completed_at": "2024-04-17T16:50:37.770388Z", "created_at": "2024-04-17T16:50:37.755000Z", "data_removed": false, "error": null, "id": "4avzc0na7drhc0cexkvrwmbf50", "input": { "text": "world" }, "logs": null, "metrics": { "predict_time": 0.003287, "total_time": 0.015388 }, "output": "hello world", "started_at": "2024-04-17T16:50:37.767101Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/4avzc0na7drhc0cexkvrwmbf50", "cancel": "https://api.replicate.com/v1/predictions/4avzc0na7drhc0cexkvrwmbf50/cancel" }, "version": "5c7d5dc6dd8bf75c1acaa8565735e7986bc5b66206b55cca93cb72c9bf15ccaa" }