defaultSelf-portrait oil painting, a beautiful cyborg with golden hair, 8k
typetext
{
"guidance_scale": 0,
"height": 512,
"num_images": 1,
"num_inference_steps": 4,
"prompt": "fantacy game ,Illustrate a blue horse against a psychedelic multicolored background ,dramatric lighting, its blue hue a stark contrast to the swirling, vivid colors of the backdrop , The overall effect should be one of movement and energy, capturing the free-spirited essence .",
"width": 512
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_9yF**********************************
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 espressotechie/lcm-dreamshaper8 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"espressotechie/lcm-dreamshaper8:fc367d0b29168ee2ad6eb234251e44eaab51b2ca592195b248ac82265c303158",
{
input: {
guidance_scale: 0,
height: 512,
num_images: 1,
num_inference_steps: 4,
prompt: "fantacy game ,Illustrate a blue horse against a psychedelic multicolored background ,dramatric lighting, its blue hue a stark contrast to the swirling, vivid colors of the backdrop , The overall effect should be one of movement and energy, capturing the free-spirited essence .",
width: 512
}
}
);
// 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_9yF**********************************
This is your API token. Keep it to yourself.
import replicate
Run espressotechie/lcm-dreamshaper8 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"espressotechie/lcm-dreamshaper8:fc367d0b29168ee2ad6eb234251e44eaab51b2ca592195b248ac82265c303158",
input={
"guidance_scale": 0,
"height": 512,
"num_images": 1,
"num_inference_steps": 4,
"prompt": "fantacy game ,Illustrate a blue horse against a psychedelic multicolored background ,dramatric lighting, its blue hue a stark contrast to the swirling, vivid colors of the backdrop , The overall effect should be one of movement and energy, capturing the free-spirited essence .",
"width": 512
}
)
# 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_9yF**********************************
This is your API token. Keep it to yourself.
Run espressotechie/lcm-dreamshaper8 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": "espressotechie/lcm-dreamshaper8:fc367d0b29168ee2ad6eb234251e44eaab51b2ca592195b248ac82265c303158",
"input": {
"guidance_scale": 0,
"height": 512,
"num_images": 1,
"num_inference_steps": 4,
"prompt": "fantacy game ,Illustrate a blue horse against a psychedelic multicolored background ,dramatric lighting, its blue hue a stark contrast to the swirling, vivid colors of the backdrop , The overall effect should be one of movement and energy, capturing the free-spirited essence .",
"width": 512
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "gto2xztb6g3574jv4fu3la6wzi",
"model": "espressotechie/lcm-dreamshaper8",
"version": "fc367d0b29168ee2ad6eb234251e44eaab51b2ca592195b248ac82265c303158",
"input": {
"guidance_scale": 0,
"height": 512,
"num_images": 1,
"num_inference_steps": 4,
"prompt": "fantacy game ,Illustrate a blue horse against a psychedelic multicolored background ,dramatric lighting, its blue hue a stark contrast to the swirling, vivid colors of the backdrop , The overall effect should be one of movement and energy, capturing the free-spirited essence .",
"width": 512
},
"logs": "Using seed: 455\n 0%| | 0/4 [00:00<?, ?it/s]\n 25%|██▌ | 1/4 [00:00<00:00, 4.90it/s]\n 75%|███████▌ | 3/4 [00:00<00:00, 10.21it/s]\n100%|██████████| 4/4 [00:00<00:00, 10.35it/s]",
"output": [
"https://replicate.delivery/pbxt/egftk5dXAwt7BUnhjWG6UtcTqtyZedGqKYvpfe4TF5N5KweeIA/out-0.jpg"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2023-11-25T08:20:36.830566Z",
"started_at": "2023-11-25T08:20:38.799188Z",
"completed_at": "2023-11-25T08:20:39.84866Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/gto2xztb6g3574jv4fu3la6wzi/cancel",
"get": "https://api.replicate.com/v1/predictions/gto2xztb6g3574jv4fu3la6wzi"
},
"metrics": {
"predict_time": 1.049472,
"total_time": 3.018094
}
}