typetext
{
"prompt": "Stephan Elliott, man, (art by Janet Delaney:1.3) , photograph, wearing long baggy pants:1. 5, tiny crop top:1. 5, at burning man festival, Snowing, split diopter, Ultra Real, Dark, Crowcore, hard light, film grain, Kodak portra 800, Depth of field 100mm, overlapping compositions, blended visuals, trending on artstation, award winning, light from front"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_YWZ**********************************
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 b0ndt/my-flux-lora using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"b0ndt/my-flux-lora:3861f78c9c18e92822ae1c660c59091644efc372b87a4d4cbf529e5c14ba1f4d",
{
input: {
prompt: "Stephan Elliott, man, (art by Janet Delaney:1.3) , photograph, wearing long baggy pants:1. 5, tiny crop top:1. 5, at burning man festival, Snowing, split diopter, Ultra Real, Dark, Crowcore, hard light, film grain, Kodak portra 800, Depth of field 100mm, overlapping compositions, blended visuals, trending on artstation, award winning, light from front"
}
}
);
// 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_YWZ**********************************
This is your API token. Keep it to yourself.
import replicate
Run b0ndt/my-flux-lora using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"b0ndt/my-flux-lora:3861f78c9c18e92822ae1c660c59091644efc372b87a4d4cbf529e5c14ba1f4d",
input={
"prompt": "Stephan Elliott, man, (art by Janet Delaney:1.3) , photograph, wearing long baggy pants:1. 5, tiny crop top:1. 5, at burning man festival, Snowing, split diopter, Ultra Real, Dark, Crowcore, hard light, film grain, Kodak portra 800, Depth of field 100mm, overlapping compositions, blended visuals, trending on artstation, award winning, light from front"
}
)
# 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_YWZ**********************************
This is your API token. Keep it to yourself.
Run b0ndt/my-flux-lora 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": "b0ndt/my-flux-lora:3861f78c9c18e92822ae1c660c59091644efc372b87a4d4cbf529e5c14ba1f4d",
"input": {
"prompt": "Stephan Elliott, man, (art by Janet Delaney:1.3) , photograph, wearing long baggy pants:1. 5, tiny crop top:1. 5, at burning man festival, Snowing, split diopter, Ultra Real, Dark, Crowcore, hard light, film grain, Kodak portra 800, Depth of field 100mm, overlapping compositions, blended visuals, trending on artstation, award winning, light from front"
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "tnxbxfvhbxrj40cj1tbabg6c8g",
"model": "b0ndt/my-flux-lora",
"version": "3861f78c9c18e92822ae1c660c59091644efc372b87a4d4cbf529e5c14ba1f4d",
"input": {
"prompt": "Stephan Elliott, man, (art by Janet Delaney:1.3) , photograph, wearing long baggy pants:1. 5, tiny crop top:1. 5, at burning man festival, Snowing, split diopter, Ultra Real, Dark, Crowcore, hard light, film grain, Kodak portra 800, Depth of field 100mm, overlapping compositions, blended visuals, trending on artstation, award winning, light from front"
},
"logs": "",
"output": "https://replicate.delivery/yhqm/4fA83V0RqQX2Kyx3D8F5xnC7flG3L8hUx6slQfz6O4fWu56NB/empty.zip",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2024-09-20T08:39:53.439Z",
"started_at": "2024-09-20T08:40:05.418926Z",
"completed_at": "2024-09-20T08:40:05.611475Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/tnxbxfvhbxrj40cj1tbabg6c8g/cancel",
"get": "https://api.replicate.com/v1/predictions/tnxbxfvhbxrj40cj1tbabg6c8g",
"web": "https://replicate.com/p/tnxbxfvhbxrj40cj1tbabg6c8g"
},
"metrics": {
"predict_time": 0.19254909,
"total_time": 12.172475
}
}