typetext
{
"prompt": "hello world",
"seed": 0
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_UjT**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
import fs from "node:fs";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run aron/hello-pipeline using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = {
prompt: "hello world",
seed: 0
};
const output = await replicate.run("aron/hello-pipeline", { input });
// To access the file URL:
console.log(output.url()); //=> "http://example.com"
// To write the file to disk:
fs.writeFile("my-image.png", 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_UjT**********************************
This is your API token. Keep it to yourself.
import replicate
Run aron/hello-pipeline using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"aron/hello-pipeline",
input={
"prompt": "hello world",
"seed": 0
}
)
# To access the file URL:
print(output.url())
#=> "http://example.com"
# To write the file to disk:
with open("my-image.png", "wb") as file:
file.write(output.read())
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_UjT**********************************
This is your API token. Keep it to yourself.
Run aron/hello-pipeline 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 $'{
"input": {
"prompt": "hello world",
"seed": 0
}
}' \
https://api.replicate.com/v1/models/aron/hello-pipeline/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "aae0r5e5pnrmc0cqf4sakydjv0",
"model": "aron/hello-pipeline",
"version": "hidden",
"input": {
"prompt": "hello world",
"seed": 0
},
"logs": "",
"output": "https://replicate.delivery/xezq/EPU92dW0i0JHEhivOlN25IHbLdDZUqKo0U1dCtqSR1V4fubKA/out-0.webp",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-06-16T14:44:20.021Z",
"started_at": "2025-06-16T14:44:38.437053Z",
"completed_at": "2025-06-16T14:44:49.317649Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/aae0r5e5pnrmc0cqf4sakydjv0/cancel",
"children": "https://api.replicate.com/v1/predictions/aae0r5e5pnrmc0cqf4sakydjv0/children",
"get": "https://api.replicate.com/v1/predictions/aae0r5e5pnrmc0cqf4sakydjv0",
"root": "https://api.replicate.com/v1/predictions/aae0r5e5pnrmc0cqf4sakydjv0",
"stream": "https://stream.replicate.com/v1/files/bcwr-tpsfflnrr2bm2hzbsxpseja45pjqj5rn5vzle5c65rorx353mtbq",
"web": "https://replicate.com/p/aae0r5e5pnrmc0cqf4sakydjv0"
},
"metrics": {
"predict_time": 10.880596959,
"total_time": 29.296649
}
}