defaultAn astronaut riding a rainbow unicorn
typetext
{
"apply_watermark": false,
"guidance_scale": 6.5,
"height": 1024,
"negative_prompt": "",
"num_inference_steps": 32,
"num_outputs": 1,
"prompt": "joe biden eating a cheeseburger at mcdonalds",
"scheduler": "DPMSolverMultistep",
"width": 1024
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_G8Y**********************************
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 charlesmccarthy/terminus-xl-gamma-v2 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"charlesmccarthy/terminus-xl-gamma-v2:991d0656366cbaec46d5457fe8994b1a09cca74f3f7590370d1a3669ad891189",
{
input: {
apply_watermark: false,
guidance_scale: 6.5,
height: 1024,
negative_prompt: "",
num_inference_steps: 32,
num_outputs: 1,
prompt: "joe biden eating a cheeseburger at mcdonalds",
scheduler: "DPMSolverMultistep",
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_G8Y**********************************
This is your API token. Keep it to yourself.
import replicate
Run charlesmccarthy/terminus-xl-gamma-v2 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"charlesmccarthy/terminus-xl-gamma-v2:991d0656366cbaec46d5457fe8994b1a09cca74f3f7590370d1a3669ad891189",
input={
"apply_watermark": False,
"guidance_scale": 6.5,
"height": 1024,
"negative_prompt": "",
"num_inference_steps": 32,
"num_outputs": 1,
"prompt": "joe biden eating a cheeseburger at mcdonalds",
"scheduler": "DPMSolverMultistep",
"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_G8Y**********************************
This is your API token. Keep it to yourself.
Run charlesmccarthy/terminus-xl-gamma-v2 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": "charlesmccarthy/terminus-xl-gamma-v2:991d0656366cbaec46d5457fe8994b1a09cca74f3f7590370d1a3669ad891189",
"input": {
"apply_watermark": false,
"guidance_scale": 6.5,
"height": 1024,
"negative_prompt": "",
"num_inference_steps": 32,
"num_outputs": 1,
"prompt": "joe biden eating a cheeseburger at mcdonalds",
"scheduler": "DPMSolverMultistep",
"width": 1024
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "uw5lrwtbwdi527is4mpwjgly4q",
"model": "charlesmccarthy/terminus-xl-gamma-v2",
"version": "991d0656366cbaec46d5457fe8994b1a09cca74f3f7590370d1a3669ad891189",
"input": {
"apply_watermark": false,
"guidance_scale": 6.5,
"height": 1024,
"negative_prompt": "",
"num_inference_steps": 32,
"num_outputs": 1,
"prompt": "joe biden eating a cheeseburger at mcdonalds",
"scheduler": "DPMSolverMultistep",
"width": 1024
},
"logs": "Using seed: 10943700\n 0%| | 0/32 [00:00<?, ?it/s]\n 3%|▎ | 1/32 [00:00<00:06, 5.02it/s]\n 9%|▉ | 3/32 [00:00<00:04, 6.21it/s]\n 12%|█▎ | 4/32 [00:00<00:04, 5.75it/s]\n 16%|█▌ | 5/32 [00:00<00:04, 5.49it/s]\n 19%|█▉ | 6/32 [00:01<00:04, 5.32it/s]\n 22%|██▏ | 7/32 [00:01<00:04, 5.21it/s]\n 25%|██▌ | 8/32 [00:01<00:04, 5.15it/s]\n 28%|██▊ | 9/32 [00:01<00:04, 5.11it/s]\n 31%|███▏ | 10/32 [00:01<00:04, 5.08it/s]\n 34%|███▍ | 11/32 [00:02<00:04, 5.06it/s]\n 38%|███▊ | 12/32 [00:02<00:03, 5.04it/s]\n 41%|████ | 13/32 [00:02<00:03, 5.03it/s]\n 44%|████▍ | 14/32 [00:02<00:03, 5.02it/s]\n 47%|████▋ | 15/32 [00:02<00:03, 5.02it/s]\n 50%|█████ | 16/32 [00:03<00:03, 5.01it/s]\n 53%|█████▎ | 17/32 [00:03<00:02, 5.01it/s]\n 56%|█████▋ | 18/32 [00:03<00:02, 5.01it/s]\n 59%|█████▉ | 19/32 [00:03<00:02, 5.00it/s]\n 62%|██████▎ | 20/32 [00:03<00:02, 5.00it/s]\n 66%|██████▌ | 21/32 [00:04<00:02, 5.00it/s]\n 69%|██████▉ | 22/32 [00:04<00:01, 5.00it/s]\n 72%|███████▏ | 23/32 [00:04<00:01, 4.99it/s]\n 75%|███████▌ | 24/32 [00:04<00:01, 4.99it/s]\n 78%|███████▊ | 25/32 [00:04<00:01, 5.00it/s]\n 81%|████████▏ | 26/32 [00:05<00:01, 4.99it/s]\n 84%|████████▍ | 27/32 [00:05<00:01, 4.99it/s]\n 88%|████████▊ | 28/32 [00:05<00:00, 4.99it/s]\n 91%|█████████ | 29/32 [00:05<00:00, 4.99it/s]\n 94%|█████████▍| 30/32 [00:05<00:00, 4.99it/s]\n 97%|█████████▋| 31/32 [00:06<00:00, 4.99it/s]\n100%|██████████| 32/32 [00:06<00:00, 4.99it/s]\n100%|██████████| 32/32 [00:06<00:00, 5.08it/s]",
"output": [
"https://replicate.delivery/pbxt/WqQWvzc3p1pqNJfhVc0Tz5xwTVulnxEoTylie1yKCZWHTBGSA/out-0.png"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2023-12-26T05:21:04.247192Z",
"started_at": "2023-12-26T05:21:04.283438Z",
"completed_at": "2023-12-26T05:21:12.504487Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/uw5lrwtbwdi527is4mpwjgly4q/cancel",
"get": "https://api.replicate.com/v1/predictions/uw5lrwtbwdi527is4mpwjgly4q"
},
"metrics": {
"predict_time": 8.221049,
"total_time": 8.257295
}
}