typetext
{
"aspect_ratio": "1:1",
"guidance": 3.5,
"image_size": 1024,
"num_inference_steps": 28,
"output_format": "webp",
"output_quality": 80,
"prompt": "a tiny astronaut hatching from an egg on the moon",
"seed": 2,
"speed_mode": "Extra Juiced π₯ (more speed)"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_7uw**********************************
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/flux.1-juiced using Replicateβs API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"prunaai/flux.1-juiced:6c7af2f8c6ad10467ac22f5f9cc892f4ef789e071d64f19199d5cc070cf6a32d",
{
input: {
aspect_ratio: "1:1",
guidance: 3.5,
image_size: 1024,
num_inference_steps: 28,
output_format: "webp",
output_quality: 80,
prompt: "a tiny astronaut hatching from an egg on the moon",
seed: 2,
speed_mode: "Extra Juiced π₯ (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_7uw**********************************
This is your API token. Keep it to yourself.
import replicate
Run prunaai/flux.1-juiced using Replicateβs API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"prunaai/flux.1-juiced:6c7af2f8c6ad10467ac22f5f9cc892f4ef789e071d64f19199d5cc070cf6a32d",
input={
"aspect_ratio": "1:1",
"guidance": 3.5,
"image_size": 1024,
"num_inference_steps": 28,
"output_format": "webp",
"output_quality": 80,
"prompt": "a tiny astronaut hatching from an egg on the moon",
"seed": 2,
"speed_mode": "Extra Juiced π₯ (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_7uw**********************************
This is your API token. Keep it to yourself.
Run prunaai/flux.1-juiced 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/flux.1-juiced:6c7af2f8c6ad10467ac22f5f9cc892f4ef789e071d64f19199d5cc070cf6a32d",
"input": {
"aspect_ratio": "1:1",
"guidance": 3.5,
"image_size": 1024,
"num_inference_steps": 28,
"output_format": "webp",
"output_quality": 80,
"prompt": "a tiny astronaut hatching from an egg on the moon",
"seed": 2,
"speed_mode": "Extra Juiced π₯ (more speed)"
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicateβs HTTP API reference docs.
{
"id": "e9txgngqzhrme0cpwc9brtv6rw",
"model": "prunaai/flux.1-juiced",
"version": "6c7af2f8c6ad10467ac22f5f9cc892f4ef789e071d64f19199d5cc070cf6a32d",
"input": {
"aspect_ratio": "1:1",
"guidance": 3.5,
"image_size": 1024,
"num_inference_steps": 28,
"output_format": "webp",
"output_quality": 80,
"prompt": "a tiny astronaut hatching from an egg on the moon",
"seed": 2,
"speed_mode": "Extra Juiced π₯ (more speed)"
},
"logs": "Using txt2img pipeline\nRunning prediction with args: ['prompt', 'height', 'width', 'guidance_scale', 'num_inference_steps', 'generator']\n 0%| | 0/28 [00:00<?, ?it/s]\n 54%|ββββββ | 15/28 [00:00<00:00, 15.55it/s]\n100%|ββββββββββ| 28/28 [00:01<00:00, 21.22it/s]",
"output": "https://replicate.delivery/xezq/ANjQ1v2E1g7nNhUZPWB6N0SJjG1maergfyMxy4MfNeYFQc3SB/output_2_0.webp",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-05-18T11:05:35.996Z",
"started_at": "2025-05-18T11:05:36.002769Z",
"completed_at": "2025-05-18T11:05:37.663763Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/e9txgngqzhrme0cpwc9brtv6rw/cancel",
"get": "https://api.replicate.com/v1/predictions/e9txgngqzhrme0cpwc9brtv6rw",
"stream": "https://stream.replicate.com/v1/files/bcwr-53tzkek6k3s32xcckqsfcfjykofhzcp5kipvneg4qu34wm6nuxfa",
"web": "https://replicate.com/p/e9txgngqzhrme0cpwc9brtv6rw"
},
"metrics": {
"predict_time": 1.6609943679999999,
"total_time": 1.667763
}
}