typetext
{
"guidance_scale": 1,
"height": 1024,
"negative_prompt": "<ac_neg1>, <ac_neg2>, <beyond_sdxl>, <unaesthetic>",
"num_inference_steps": 6,
"num_outputs": 1,
"prompt": "Aloy from Horizon Zero Dawn in the snowy norse mountains, fighting a robotic raptor from Horizon Zero Dawn, hyper realistic, ultra realistic, HDR, raytracing, octane render, UE5, autodesk 3D render, extreme detail, detailed face, detailed eyes, detailed robotic raptor, detailed hands, detailed arms, detailed spear that Aloy is holding",
"width": 1024
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_URL**********************************
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 smoretalk/flamel-lightning using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"smoretalk/flamel-lightning:b891d9dca007eb4ef1b46a79408be1bea29733b672c145ee880ff9512d3b5bf4",
{
input: {
guidance_scale: 1,
height: 1024,
negative_prompt: "<ac_neg1>, <ac_neg2>, <beyond_sdxl>, <unaesthetic>",
num_inference_steps: 6,
num_outputs: 1,
prompt: "Aloy from Horizon Zero Dawn in the snowy norse mountains, fighting a robotic raptor from Horizon Zero Dawn, hyper realistic, ultra realistic, HDR, raytracing, octane render, UE5, autodesk 3D render, extreme detail, detailed face, detailed eyes, detailed robotic raptor, detailed hands, detailed arms, detailed spear that Aloy is holding",
width: 1024
}
}
);
// 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_URL**********************************
This is your API token. Keep it to yourself.
import replicate
Run smoretalk/flamel-lightning using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"smoretalk/flamel-lightning:b891d9dca007eb4ef1b46a79408be1bea29733b672c145ee880ff9512d3b5bf4",
input={
"guidance_scale": 1,
"height": 1024,
"negative_prompt": "<ac_neg1>, <ac_neg2>, <beyond_sdxl>, <unaesthetic>",
"num_inference_steps": 6,
"num_outputs": 1,
"prompt": "Aloy from Horizon Zero Dawn in the snowy norse mountains, fighting a robotic raptor from Horizon Zero Dawn, hyper realistic, ultra realistic, HDR, raytracing, octane render, UE5, autodesk 3D render, extreme detail, detailed face, detailed eyes, detailed robotic raptor, detailed hands, detailed arms, detailed spear that Aloy is holding",
"width": 1024
}
)
# 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_URL**********************************
This is your API token. Keep it to yourself.
Run smoretalk/flamel-lightning 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": "smoretalk/flamel-lightning:b891d9dca007eb4ef1b46a79408be1bea29733b672c145ee880ff9512d3b5bf4",
"input": {
"guidance_scale": 1,
"height": 1024,
"negative_prompt": "<ac_neg1>, <ac_neg2>, <beyond_sdxl>, <unaesthetic>",
"num_inference_steps": 6,
"num_outputs": 1,
"prompt": "Aloy from Horizon Zero Dawn in the snowy norse mountains, fighting a robotic raptor from Horizon Zero Dawn, hyper realistic, ultra realistic, HDR, raytracing, octane render, UE5, autodesk 3D render, extreme detail, detailed face, detailed eyes, detailed robotic raptor, detailed hands, detailed arms, detailed spear that Aloy is holding",
"width": 1024
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "kikpydjbydfxzifam7zx6ov6nu",
"model": "smoretalk/flamel-lightning",
"version": "b891d9dca007eb4ef1b46a79408be1bea29733b672c145ee880ff9512d3b5bf4",
"input": {
"guidance_scale": 1,
"height": 1024,
"negative_prompt": "<ac_neg1>, <ac_neg2>, <beyond_sdxl>, <unaesthetic>",
"num_inference_steps": 6,
"num_outputs": 1,
"prompt": "Aloy from Horizon Zero Dawn in the snowy norse mountains, fighting a robotic raptor from Horizon Zero Dawn, hyper realistic, ultra realistic, HDR, raytracing, octane render, UE5, autodesk 3D render, extreme detail, detailed face, detailed eyes, detailed robotic raptor, detailed hands, detailed arms, detailed spear that Aloy is holding",
"width": 1024
},
"logs": "Using seed: 633036085\n 0%| | 0/6 [00:00<?, ?it/s]\n 17%|█▋ | 1/6 [00:00<00:01, 4.42it/s]\n 33%|███▎ | 2/6 [00:00<00:00, 4.49it/s]\n 50%|█████ | 3/6 [00:00<00:00, 4.50it/s]\n 67%|██████▋ | 4/6 [00:00<00:00, 4.35it/s]\n 83%|████████▎ | 5/6 [00:01<00:00, 4.41it/s]\n100%|██████████| 6/6 [00:01<00:00, 4.43it/s]\n100%|██████████| 6/6 [00:01<00:00, 4.43it/s]\nInference took: 1.8358385562896729",
"output": [
"https://replicate.delivery/pbxt/LKyi0A49SkLHEVNOAtNwuQCZX19gUjmd57Uie2N2EUr3ecdSA/out-0.png"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2024-03-06T07:38:20.651972Z",
"started_at": "2024-03-06T07:38:20.668052Z",
"completed_at": "2024-03-06T07:38:23.908667Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/kikpydjbydfxzifam7zx6ov6nu/cancel",
"get": "https://api.replicate.com/v1/predictions/kikpydjbydfxzifam7zx6ov6nu"
},
"metrics": {
"predict_time": 3.240615,
"total_time": 3.256695
}
}