typetext
{
"aspect_ratio": "1:1",
"extra_lora_scale": 1,
"go_fast": true,
"guidance_scale": 3,
"lora_scale": 1,
"megapixels": "1",
"model": "dev",
"num_inference_steps": 28,
"num_outputs": 1,
"output_format": "webp",
"output_quality": 80,
"prompt": "a portrait photo of JENAI wearing a red sweater",
"prompt_strength": 0.8
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_ENX**********************************
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 lucataco/flux-jennai using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"lucataco/flux-jennai:256ddf3c5429bc028df29221cadb161393ed67f6eaf2c7de01cc2f77cf86b459",
{
input: {
aspect_ratio: "1:1",
extra_lora_scale: 1,
go_fast: true,
guidance_scale: 3,
lora_scale: 1,
megapixels: "1",
model: "dev",
num_inference_steps: 28,
num_outputs: 1,
output_format: "webp",
output_quality: 80,
prompt: "a portrait photo of JENAI wearing a red sweater",
prompt_strength: 0.8
}
}
);
// To access the file URL:
console.log(output[0].url()); //=> "http://example.com"
// To write the file to disk:
fs.writeFile("my-image.png", output[0]);
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_ENX**********************************
This is your API token. Keep it to yourself.
import replicate
Run lucataco/flux-jennai using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"lucataco/flux-jennai:256ddf3c5429bc028df29221cadb161393ed67f6eaf2c7de01cc2f77cf86b459",
input={
"aspect_ratio": "1:1",
"extra_lora_scale": 1,
"go_fast": True,
"guidance_scale": 3,
"lora_scale": 1,
"megapixels": "1",
"model": "dev",
"num_inference_steps": 28,
"num_outputs": 1,
"output_format": "webp",
"output_quality": 80,
"prompt": "a portrait photo of JENAI wearing a red sweater",
"prompt_strength": 0.8
}
)
# To access the file URL:
print(output[0].url())
#=> "http://example.com"
# To write the file to disk:
with open("my-image.png", "wb") as file:
file.write(output[0].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_ENX**********************************
This is your API token. Keep it to yourself.
Run lucataco/flux-jennai 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": "lucataco/flux-jennai:256ddf3c5429bc028df29221cadb161393ed67f6eaf2c7de01cc2f77cf86b459",
"input": {
"aspect_ratio": "1:1",
"extra_lora_scale": 1,
"go_fast": true,
"guidance_scale": 3,
"lora_scale": 1,
"megapixels": "1",
"model": "dev",
"num_inference_steps": 28,
"num_outputs": 1,
"output_format": "webp",
"output_quality": 80,
"prompt": "a portrait photo of JENAI wearing a red sweater",
"prompt_strength": 0.8
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "pfrsqc0s6srme0cq0beane7jac",
"model": "lucataco/flux-jennai",
"version": "256ddf3c5429bc028df29221cadb161393ed67f6eaf2c7de01cc2f77cf86b459",
"input": {
"aspect_ratio": "1:1",
"extra_lora_scale": 1,
"go_fast": true,
"guidance_scale": 3,
"lora_scale": 1,
"megapixels": "1",
"model": "dev",
"num_inference_steps": 28,
"num_outputs": 1,
"output_format": "webp",
"output_quality": 80,
"prompt": "a portrait photo of JENAI wearing a red sweater",
"prompt_strength": 0.8
},
"logs": "2025-05-24 15:14:28.366 | INFO | fp8.lora_loading:restore_base_weights:600 - Unloaded 304 layers\n2025-05-24 15:14:28.367 | SUCCESS | fp8.lora_loading:unload_loras:571 - LoRAs unloaded in 0.025s\nfree=27485852782592\nDownloading weights\n2025-05-24T15:14:28Z | INFO | [ Initiating ] chunk_size=150M dest=/tmp/tmphrujda0f/weights url=https://replicate.delivery/xezq/p8zgemKuTgStByHgZxmRSq1jevHC4ewn5K8Ivpe98SWU4f9lC/flux-lora.tar\n2025-05-24T15:14:28Z | INFO | [ Cache Service ] enabled=true scheme=http target=hermes.services.svc.cluster.local\n2025-05-24T15:14:29Z | INFO | [ Complete ] dest=/tmp/tmphrujda0f/weights size=\"172 MB\" total_elapsed=1.190s url=https://replicate.delivery/xezq/p8zgemKuTgStByHgZxmRSq1jevHC4ewn5K8Ivpe98SWU4f9lC/flux-lora.tar\nDownloaded weights in 1.21s\n2025-05-24 15:14:29.575 | INFO | fp8.lora_loading:convert_lora_weights:502 - Loading LoRA weights for /src/weights-cache/951862e7f6698d62\n2025-05-24 15:14:29.647 | INFO | fp8.lora_loading:convert_lora_weights:523 - LoRA weights loaded\n2025-05-24 15:14:29.648 | DEBUG | fp8.lora_loading:apply_lora_to_model_and_optionally_store_clones:610 - Extracting keys\n2025-05-24 15:14:29.648 | DEBUG | fp8.lora_loading:apply_lora_to_model_and_optionally_store_clones:617 - Keys extracted\nApplying LoRA: 0%| | 0/304 [00:00<?, ?it/s]\nApplying LoRA: 43%|████▎ | 130/304 [00:00<00:00, 1280.02it/s]\nApplying LoRA: 85%|████████▌ | 259/304 [00:00<00:00, 1073.90it/s]\nApplying LoRA: 100%|██████████| 304/304 [00:00<00:00, 1067.70it/s]\n2025-05-24 15:14:29.933 | INFO | fp8.lora_loading:apply_lora_to_model_and_optionally_store_clones:669 - Loading LoRA in fp8\n2025-05-24 15:14:29.933 | SUCCESS | fp8.lora_loading:load_lora:547 - LoRA applied in 0.36s\nrunning quantized prediction\nUsing seed: 1977165122\n 0%| | 0/28 [00:00<?, ?it/s]\n 11%|█ | 3/28 [00:00<00:01, 15.81it/s]\n 18%|█▊ | 5/28 [00:00<00:01, 12.97it/s]\n 25%|██▌ | 7/28 [00:00<00:01, 12.06it/s]\n 32%|███▏ | 9/28 [00:00<00:01, 11.63it/s]\n 39%|███▉ | 11/28 [00:00<00:01, 11.07it/s]\n 46%|████▋ | 13/28 [00:01<00:01, 10.92it/s]\n 54%|█████▎ | 15/28 [00:01<00:01, 10.91it/s]\n 61%|██████ | 17/28 [00:01<00:01, 10.91it/s]\n 68%|██████▊ | 19/28 [00:01<00:00, 10.91it/s]\n 75%|███████▌ | 21/28 [00:01<00:00, 10.82it/s]\n 82%|████████▏ | 23/28 [00:02<00:00, 10.73it/s]\n 89%|████████▉ | 25/28 [00:02<00:00, 10.74it/s]\n 96%|█████████▋| 27/28 [00:02<00:00, 10.77it/s]\n100%|██████████| 28/28 [00:02<00:00, 11.14it/s]\nTotal safe images: 1 out of 1",
"output": [
"https://replicate.delivery/xezq/gLKueqkp7ZXaYyekkPDYZWd0c4lc2lHcsWG4jtaPNgLYR5vUA/out-0.webp"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-05-24T15:14:28.278Z",
"started_at": "2025-05-24T15:14:28.344335Z",
"completed_at": "2025-05-24T15:14:32.866281Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/pfrsqc0s6srme0cq0beane7jac/cancel",
"get": "https://api.replicate.com/v1/predictions/pfrsqc0s6srme0cq0beane7jac",
"stream": "https://stream.replicate.com/v1/files/bcwr-ul7rau7k4ezbuk5qonybz3oq4dbx6ds7fhzrszc6qjzsemt7fc7q",
"web": "https://replicate.com/p/pfrsqc0s6srme0cq0beane7jac"
},
"metrics": {
"predict_time": 4.521945584,
"total_time": 4.588281
}
}