typetext
{
"aspect_ratio": "1:1",
"go_fast": true,
"megapixels": "1",
"num_inference_steps": 8,
"num_outputs": 4,
"output_format": "webp",
"output_quality": 80,
"prompt": "The front view is a young woman with realistic adult proportions, featuring long legs, a slender waist, and balanced shoulders. She has short, slightly messy brown hair and expressive brown eyes. The medium bust is dressed in simple, armless garments with a clean and flowing silhouette. She is standing with her arms outstretched to the sides, palms facing downwards, and her legs slightly apart with a slight bend in her knees. Her hands and legs are equally outstretched to the sides, her palms facing downwards, and her knees apart, barefoot apart. She is wearing simple, flat shoes. Rendered in a clean anime style with soft shading, focusing on smooth shapes, proper proportions, and balanced anatomy. The background is beige, with soft lighting emphasizing her features and overall form. This is a front view. There are multiple consistent views."
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_0oR**********************************
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 fire/flux using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"fire/flux:de30fa90bbfddd50f18ce1a1cf3a427d93711eceab613ec398fab202a3d6303a",
{
input: {
aspect_ratio: "1:1",
go_fast: true,
megapixels: "1",
num_inference_steps: 8,
num_outputs: 4,
output_format: "webp",
output_quality: 80,
prompt: "The front view is a young woman with realistic adult proportions, featuring long legs, a slender waist, and balanced shoulders. She has short, slightly messy brown hair and expressive brown eyes. The medium bust is dressed in simple, armless garments with a clean and flowing silhouette. She is standing with her arms outstretched to the sides, palms facing downwards, and her legs slightly apart with a slight bend in her knees. Her hands and legs are equally outstretched to the sides, her palms facing downwards, and her knees apart, barefoot apart. She is wearing simple, flat shoes. Rendered in a clean anime style with soft shading, focusing on smooth shapes, proper proportions, and balanced anatomy. The background is beige, with soft lighting emphasizing her features and overall form. This is a front view. There are multiple consistent views."
}
}
);
// 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_0oR**********************************
This is your API token. Keep it to yourself.
import replicate
Run fire/flux using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"fire/flux:de30fa90bbfddd50f18ce1a1cf3a427d93711eceab613ec398fab202a3d6303a",
input={
"aspect_ratio": "1:1",
"go_fast": True,
"megapixels": "1",
"num_inference_steps": 8,
"num_outputs": 4,
"output_format": "webp",
"output_quality": 80,
"prompt": "The front view is a young woman with realistic adult proportions, featuring long legs, a slender waist, and balanced shoulders. She has short, slightly messy brown hair and expressive brown eyes. The medium bust is dressed in simple, armless garments with a clean and flowing silhouette. She is standing with her arms outstretched to the sides, palms facing downwards, and her legs slightly apart with a slight bend in her knees. Her hands and legs are equally outstretched to the sides, her palms facing downwards, and her knees apart, barefoot apart. She is wearing simple, flat shoes. Rendered in a clean anime style with soft shading, focusing on smooth shapes, proper proportions, and balanced anatomy. The background is beige, with soft lighting emphasizing her features and overall form. This is a front view. There are multiple consistent views."
}
)
# 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_0oR**********************************
This is your API token. Keep it to yourself.
Run fire/flux 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": "fire/flux:de30fa90bbfddd50f18ce1a1cf3a427d93711eceab613ec398fab202a3d6303a",
"input": {
"aspect_ratio": "1:1",
"go_fast": true,
"megapixels": "1",
"num_inference_steps": 8,
"num_outputs": 4,
"output_format": "webp",
"output_quality": 80,
"prompt": "The front view is a young woman with realistic adult proportions, featuring long legs, a slender waist, and balanced shoulders. She has short, slightly messy brown hair and expressive brown eyes. The medium bust is dressed in simple, armless garments with a clean and flowing silhouette. She is standing with her arms outstretched to the sides, palms facing downwards, and her legs slightly apart with a slight bend in her knees. Her hands and legs are equally outstretched to the sides, her palms facing downwards, and her knees apart, barefoot apart. She is wearing simple, flat shoes. Rendered in a clean anime style with soft shading, focusing on smooth shapes, proper proportions, and balanced anatomy. The background is beige, with soft lighting emphasizing her features and overall form. This is a front view. There are multiple consistent views."
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "963vbnvejnrj00ckzpzbwwsder",
"model": "fire/flux",
"version": "de30fa90bbfddd50f18ce1a1cf3a427d93711eceab613ec398fab202a3d6303a",
"input": {
"aspect_ratio": "1:1",
"go_fast": true,
"megapixels": "1",
"num_inference_steps": 8,
"num_outputs": 4,
"output_format": "webp",
"output_quality": 80,
"prompt": "The front view is a young woman with realistic adult proportions, featuring long legs, a slender waist, and balanced shoulders. She has short, slightly messy brown hair and expressive brown eyes. The medium bust is dressed in simple, armless garments with a clean and flowing silhouette. She is standing with her arms outstretched to the sides, palms facing downwards, and her legs slightly apart with a slight bend in her knees. Her hands and legs are equally outstretched to the sides, her palms facing downwards, and her knees apart, barefoot apart. She is wearing simple, flat shoes. Rendered in a clean anime style with soft shading, focusing on smooth shapes, proper proportions, and balanced anatomy. The background is beige, with soft lighting emphasizing her features and overall form. This is a front view. There are multiple consistent views."
},
"logs": "running quantized prediction\nUsing seed: 1137156351\n 0%| | 0/8 [00:00<?, ?it/s]\n 25%|██▌ | 2/8 [00:00<00:01, 3.11it/s]\n 38%|███▊ | 3/8 [00:01<00:02, 2.30it/s]\n 50%|█████ | 4/8 [00:01<00:01, 2.02it/s]\n 62%|██████▎ | 5/8 [00:02<00:01, 1.89it/s]\n 75%|███████▌ | 6/8 [00:03<00:01, 1.82it/s]\n 88%|████████▊ | 7/8 [00:03<00:00, 1.77it/s]\n100%|██████████| 8/8 [00:04<00:00, 1.75it/s]\n100%|██████████| 8/8 [00:04<00:00, 1.90it/s]\n 0%| | 0/8 [00:00<?, ?it/s]\n 12%|█▎ | 1/8 [00:00<00:04, 1.69it/s]\n 25%|██▌ | 2/8 [00:01<00:03, 1.69it/s]\n 38%|███▊ | 3/8 [00:01<00:02, 1.69it/s]\n 50%|█████ | 4/8 [00:02<00:02, 1.69it/s]\n 62%|██████▎ | 5/8 [00:02<00:01, 1.69it/s]\n 75%|███████▌ | 6/8 [00:03<00:01, 1.69it/s]\n 88%|████████▊ | 7/8 [00:04<00:00, 1.69it/s]\n100%|██████████| 8/8 [00:04<00:00, 1.69it/s]\n100%|██████████| 8/8 [00:04<00:00, 1.69it/s]\n 0%| | 0/8 [00:00<?, ?it/s]\n 12%|█▎ | 1/8 [00:00<00:04, 1.69it/s]\n 25%|██▌ | 2/8 [00:01<00:03, 1.69it/s]\n 38%|███▊ | 3/8 [00:01<00:02, 1.69it/s]\n 50%|█████ | 4/8 [00:02<00:02, 1.68it/s]\n 62%|██████▎ | 5/8 [00:02<00:01, 1.68it/s]\n 75%|███████▌ | 6/8 [00:03<00:01, 1.68it/s]\n 88%|████████▊ | 7/8 [00:04<00:00, 1.68it/s]\n100%|██████████| 8/8 [00:04<00:00, 1.69it/s]\n100%|██████████| 8/8 [00:04<00:00, 1.68it/s]\n 0%| | 0/8 [00:00<?, ?it/s]\n 12%|█▎ | 1/8 [00:00<00:04, 1.69it/s]\n 25%|██▌ | 2/8 [00:01<00:03, 1.69it/s]\n 38%|███▊ | 3/8 [00:01<00:02, 1.69it/s]\n 50%|█████ | 4/8 [00:02<00:02, 1.68it/s]\n 62%|██████▎ | 5/8 [00:02<00:01, 1.68it/s]\n 75%|███████▌ | 6/8 [00:03<00:01, 1.68it/s]\n 88%|████████▊ | 7/8 [00:04<00:00, 1.68it/s]\n100%|██████████| 8/8 [00:04<00:00, 1.68it/s]\n100%|██████████| 8/8 [00:04<00:00, 1.68it/s]\nTotal safe images: 4 out of 4",
"output": [
"https://replicate.delivery/yhqm/OvOs4jnjTmaZFlkBrpUqf2iekF0m0HVyDfF4CBslaeuR0q5PB/out-0.webp",
"https://replicate.delivery/yhqm/OLOltZLUG9pgD5QA4GSiRosGnWYLPQvphoQ3oUJTxkMRrmfJA/out-1.webp",
"https://replicate.delivery/yhqm/JXceGuvtUpR9JSdW2DkDPumdKva8e8ALKp8fWcCjCjHJa18nA/out-2.webp",
"https://replicate.delivery/yhqm/10FaFbFjJ4YeYCafC22fbWQKsJI1H2CIonHjUIExdXwIa18nA/out-3.webp"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2024-12-25T12:15:36.085Z",
"started_at": "2024-12-25T12:22:24.204517Z",
"completed_at": "2024-12-25T12:23:32.914761Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/963vbnvejnrj00ckzpzbwwsder/cancel",
"get": "https://api.replicate.com/v1/predictions/963vbnvejnrj00ckzpzbwwsder",
"stream": "https://stream.replicate.com/v1/files/qoxq-4zspuhaxakonhvn4e5il2ovumrn4hemgmni26mlvp5i5bvsjncba",
"web": "https://replicate.com/p/963vbnvejnrj00ckzpzbwwsder"
},
"metrics": {
"predict_time": 68.710243511,
"total_time": 476.829761
}
}


