typetext
{
"model_type": "fast",
"output_format": "jpg",
"output_quality": 80,
"prompt": "a purple cheetah holding a sign that says \"pip install pruna\"",
"resolution": "1024 Γ 1024 (Square)",
"seed": 10,
"speed_mode": "Extra Juiced π (even more speed)"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_Uaj**********************************
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 prunaai/hidream-l1-fast using Replicateβs API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"prunaai/hidream-l1-fast:91752cc0b07ccd5976f1db2b6b7f10296ac12d6cb2ba87056f79b17ffacca5f5",
{
input: {
model_type: "fast",
output_format: "jpg",
output_quality: 80,
prompt: "a purple cheetah holding a sign that says \"pip install pruna\"",
resolution: "1024 Γ 1024 (Square)",
seed: 10,
speed_mode: "Extra Juiced π (even more speed)"
}
}
);
// 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_Uaj**********************************
This is your API token. Keep it to yourself.
import replicate
Run prunaai/hidream-l1-fast using Replicateβs API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"prunaai/hidream-l1-fast:91752cc0b07ccd5976f1db2b6b7f10296ac12d6cb2ba87056f79b17ffacca5f5",
input={
"model_type": "fast",
"output_format": "jpg",
"output_quality": 80,
"prompt": "a purple cheetah holding a sign that says \"pip install pruna\"",
"resolution": "1024 Γ 1024 (Square)",
"seed": 10,
"speed_mode": "Extra Juiced π (even more speed)"
}
)
# 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_Uaj**********************************
This is your API token. Keep it to yourself.
Run prunaai/hidream-l1-fast 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": "prunaai/hidream-l1-fast:91752cc0b07ccd5976f1db2b6b7f10296ac12d6cb2ba87056f79b17ffacca5f5",
"input": {
"model_type": "fast",
"output_format": "jpg",
"output_quality": 80,
"prompt": "a purple cheetah holding a sign that says \\"pip install pruna\\"",
"resolution": "1024 Γ 1024 (Square)",
"seed": 10,
"speed_mode": "Extra Juiced π (even more speed)"
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicateβs HTTP API reference docs.
{
"id": "tdfnxg7masrmc0cqzrvbkbe1xw",
"model": "prunaai/hidream-l1-fast",
"version": "91752cc0b07ccd5976f1db2b6b7f10296ac12d6cb2ba87056f79b17ffacca5f5",
"input": {
"model_type": "fast",
"output_format": "jpg",
"output_quality": 80,
"prompt": "a purple cheetah holding a sign that says \"pip install pruna\"",
"resolution": "1024 Γ 1024 (Square)",
"seed": 10,
"speed_mode": "Extra Juiced π (even more speed)"
},
"logs": "Running inference...\n 0%| | 0/16 [00:00<?, ?it/s]\n 94%|ββββββββββ| 15/16 [00:01<00:00, 10.96it/s]\n100%|ββββββββββ| 16/16 [00:01<00:00, 10.23it/s]",
"output": "https://replicate.delivery/xezq/OALMfA3NE2XrR6CWzm349oQR2KcB1QVfidkzj4jiuLSh0efTB/output_10_0.jpeg",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-07-12T10:38:23.83Z",
"started_at": "2025-07-12T10:38:23.837114Z",
"completed_at": "2025-07-12T10:38:25.564161Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/tdfnxg7masrmc0cqzrvbkbe1xw/cancel",
"get": "https://api.replicate.com/v1/predictions/tdfnxg7masrmc0cqzrvbkbe1xw",
"stream": "https://stream.replicate.com/v1/files/bcwr-6j4k3blgj3bdqvx2sgl6sqo7jsbviyjjqbzuy6tbe5d4qqhizeoq",
"web": "https://replicate.com/p/tdfnxg7masrmc0cqzrvbkbe1xw"
},
"metrics": {
"predict_time": 1.7270467489999999,
"total_time": 1.734161
}
}