defaultAn astronaut riding a rainbow unicorn
typetext
{
"apply_watermark": false,
"guidance_scale": 7.5,
"height": 1024,
"high_noise_frac": 0.9,
"lora_scale": 0.7,
"negative_prompt": "",
"num_inference_steps": 50,
"num_outputs": 1,
"prompt": "a photo of TOK, wearing stylish classic suit, RAW photo, subject, 8k uhd, dslr, soft lighting, high quality, clearly face, a futuristic visage with cybernetic enhancements seamlessly integrated into human features",
"prompt_strength": 0.8,
"refine": "no_refiner",
"refine_steps": null,
"scheduler": "K_EULER_ANCESTRAL",
"width": 1024
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_Qtj**********************************
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 genkernel/headshot-public using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"genkernel/headshot-public:f889ba013f4785999ac7c260c556e8af4591385fe6e9d269f04098b5f0e7293e",
{
input: {
apply_watermark: false,
guidance_scale: 7.5,
height: 1024,
high_noise_frac: 0.9,
lora_scale: 0.7,
negative_prompt: "",
num_inference_steps: 50,
num_outputs: 1,
prompt: "a photo of TOK, wearing stylish classic suit, RAW photo, subject, 8k uhd, dslr, soft lighting, high quality, clearly face, a futuristic visage with cybernetic enhancements seamlessly integrated into human features",
prompt_strength: 0.8,
refine: "no_refiner",
scheduler: "K_EULER_ANCESTRAL",
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_Qtj**********************************
This is your API token. Keep it to yourself.
import replicate
Run genkernel/headshot-public using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"genkernel/headshot-public:f889ba013f4785999ac7c260c556e8af4591385fe6e9d269f04098b5f0e7293e",
input={
"apply_watermark": False,
"guidance_scale": 7.5,
"height": 1024,
"high_noise_frac": 0.9,
"lora_scale": 0.7,
"negative_prompt": "",
"num_inference_steps": 50,
"num_outputs": 1,
"prompt": "a photo of TOK, wearing stylish classic suit, RAW photo, subject, 8k uhd, dslr, soft lighting, high quality, clearly face, a futuristic visage with cybernetic enhancements seamlessly integrated into human features",
"prompt_strength": 0.8,
"refine": "no_refiner",
"scheduler": "K_EULER_ANCESTRAL",
"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_Qtj**********************************
This is your API token. Keep it to yourself.
Run genkernel/headshot-public 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": "genkernel/headshot-public:f889ba013f4785999ac7c260c556e8af4591385fe6e9d269f04098b5f0e7293e",
"input": {
"apply_watermark": false,
"guidance_scale": 7.5,
"height": 1024,
"high_noise_frac": 0.9,
"lora_scale": 0.7,
"negative_prompt": "",
"num_inference_steps": 50,
"num_outputs": 1,
"prompt": "a photo of TOK, wearing stylish classic suit, RAW photo, subject, 8k uhd, dslr, soft lighting, high quality, clearly face, a futuristic visage with cybernetic enhancements seamlessly integrated into human features",
"prompt_strength": 0.8,
"refine": "no_refiner",
"scheduler": "K_EULER_ANCESTRAL",
"width": 1024
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "u3vwqflbi3ibcbsqdtv2xd2vrm",
"model": "genkernel/headshot-public",
"version": "f889ba013f4785999ac7c260c556e8af4591385fe6e9d269f04098b5f0e7293e",
"input": {
"apply_watermark": false,
"guidance_scale": 7.5,
"height": 1024,
"high_noise_frac": 0.9,
"lora_scale": 0.7,
"negative_prompt": "",
"num_inference_steps": 50,
"num_outputs": 1,
"prompt": "a photo of TOK, wearing stylish classic suit, RAW photo, subject, 8k uhd, dslr, soft lighting, high quality, clearly face, a futuristic visage with cybernetic enhancements seamlessly integrated into human features",
"prompt_strength": 0.8,
"refine": "no_refiner",
"refine_steps": null,
"scheduler": "K_EULER_ANCESTRAL",
"width": 1024
},
"logs": "",
"output": [
"https://pbxt.replicate.delivery/kuF6sMZ8eWxFC61E8uv5QEgURpOhPYxDQwGxHQRWeGfN2rNjA/out-0.png"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2023-09-22T15:03:19.363512Z",
"started_at": "2023-09-22T15:03:19.573643Z",
"completed_at": "2023-09-22T15:03:34.655963Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/u3vwqflbi3ibcbsqdtv2xd2vrm/cancel",
"get": "https://api.replicate.com/v1/predictions/u3vwqflbi3ibcbsqdtv2xd2vrm"
},
"metrics": {
"predict_time": 15.08232,
"total_time": 15.292451
}
}