typetext
{
"aspect_ratio": "1:1",
"extra_lora_scale": 1,
"go_fast": false,
"guidance_scale": 3.5,
"image": "https://replicate.delivery/pbxt/MjG5tBfn8ZkV6vgBMwQ8YH8gSlDGh0IOng2eURSSkzg4lPcu/Screenshot%202025-02-28%20at%201.12.06%E2%80%AFPM.png",
"lora_scale": 0.95,
"megapixels": "1",
"model": "dev",
"num_inference_steps": 32,
"num_outputs": 1,
"output_format": "jpg",
"output_quality": 100,
"prompt": "recreate this image in the style of ghibli",
"prompt_strength": 0.65
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_BpA**********************************
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 colinmcdonnell22/ghiblify using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"colinmcdonnell22/ghiblify:b4014c6ade5c1ac4c0d90ee5ea26ee9cf56ad28ee8a705737a0be6cdfdc3ac2a",
{
input: {
aspect_ratio: "1:1",
extra_lora_scale: 1,
go_fast: false,
guidance_scale: 3.5,
image: "https://replicate.delivery/pbxt/MjG5tBfn8ZkV6vgBMwQ8YH8gSlDGh0IOng2eURSSkzg4lPcu/Screenshot%202025-02-28%20at%201.12.06%E2%80%AFPM.png",
lora_scale: 0.95,
megapixels: "1",
model: "dev",
num_inference_steps: 32,
num_outputs: 1,
output_format: "jpg",
output_quality: 100,
prompt: "recreate this image in the style of ghibli",
prompt_strength: 0.65
}
}
);
// 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_BpA**********************************
This is your API token. Keep it to yourself.
import replicate
Run colinmcdonnell22/ghiblify using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"colinmcdonnell22/ghiblify:b4014c6ade5c1ac4c0d90ee5ea26ee9cf56ad28ee8a705737a0be6cdfdc3ac2a",
input={
"aspect_ratio": "1:1",
"extra_lora_scale": 1,
"go_fast": False,
"guidance_scale": 3.5,
"image": "https://replicate.delivery/pbxt/MjG5tBfn8ZkV6vgBMwQ8YH8gSlDGh0IOng2eURSSkzg4lPcu/Screenshot%202025-02-28%20at%201.12.06%E2%80%AFPM.png",
"lora_scale": 0.95,
"megapixels": "1",
"model": "dev",
"num_inference_steps": 32,
"num_outputs": 1,
"output_format": "jpg",
"output_quality": 100,
"prompt": "recreate this image in the style of ghibli",
"prompt_strength": 0.65
}
)
# 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_BpA**********************************
This is your API token. Keep it to yourself.
Run colinmcdonnell22/ghiblify 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": "colinmcdonnell22/ghiblify:b4014c6ade5c1ac4c0d90ee5ea26ee9cf56ad28ee8a705737a0be6cdfdc3ac2a",
"input": {
"aspect_ratio": "1:1",
"extra_lora_scale": 1,
"go_fast": false,
"guidance_scale": 3.5,
"image": "https://replicate.delivery/pbxt/MjG5tBfn8ZkV6vgBMwQ8YH8gSlDGh0IOng2eURSSkzg4lPcu/Screenshot%202025-02-28%20at%201.12.06%E2%80%AFPM.png",
"lora_scale": 0.95,
"megapixels": "1",
"model": "dev",
"num_inference_steps": 32,
"num_outputs": 1,
"output_format": "jpg",
"output_quality": 100,
"prompt": "recreate this image in the style of ghibli",
"prompt_strength": 0.65
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "4v5tgn5xwdrmc0cntj9rgnxadc",
"model": "colinmcdonnell22/ghiblify",
"version": "b4014c6ade5c1ac4c0d90ee5ea26ee9cf56ad28ee8a705737a0be6cdfdc3ac2a",
"input": {
"aspect_ratio": "1:1",
"extra_lora_scale": 1,
"go_fast": false,
"guidance_scale": 3.5,
"image": "https://replicate.delivery/pbxt/MjG5tBfn8ZkV6vgBMwQ8YH8gSlDGh0IOng2eURSSkzg4lPcu/Screenshot%202025-02-28%20at%201.12.06%E2%80%AFPM.png",
"lora_scale": 0.95,
"megapixels": "1",
"model": "dev",
"num_inference_steps": 32,
"num_outputs": 1,
"output_format": "jpg",
"output_quality": 100,
"prompt": "recreate this image in the style of ghibli",
"prompt_strength": 0.65
},
"logs": "free=26433366798336\nDownloading weights\n2025-03-26T22:30:07Z | INFO | [ Initiating ] chunk_size=150M dest=/tmp/tmp_2gs7mjq/weights url=https://replicate.delivery/xezq/6isGxewRmSUwMqNfnYHOkcxj3k1IPUMRo8yNklWk5LbCEjcUA/trained_model.tar\n2025-03-26T22:30:09Z | INFO | [ Complete ] dest=/tmp/tmp_2gs7mjq/weights size=\"172 MB\" total_elapsed=2.195s url=https://replicate.delivery/xezq/6isGxewRmSUwMqNfnYHOkcxj3k1IPUMRo8yNklWk5LbCEjcUA/trained_model.tar\nDownloaded weights in 2.22s\nLoaded LoRAs in 2.80s\nUsing seed: 62803\nPrompt: recreate this image in the style of ghibli\nInput image size: 1900x1063\n[!] Resizing input image from 1900x1063 to 1440x816\n[!] img2img mode\n 0%| | 0/21 [00:00<?, ?it/s]\n 5%|▍ | 1/21 [00:00<00:04, 4.01it/s]\n 10%|▉ | 2/21 [00:00<00:05, 3.66it/s]\n 14%|█▍ | 3/21 [00:00<00:05, 3.55it/s]\n 19%|█▉ | 4/21 [00:01<00:04, 3.50it/s]\n 24%|██▍ | 5/21 [00:01<00:04, 3.48it/s]\n 29%|██▊ | 6/21 [00:01<00:04, 3.46it/s]\n 33%|███▎ | 7/21 [00:01<00:04, 3.45it/s]\n 38%|███▊ | 8/21 [00:02<00:03, 3.45it/s]\n 43%|████▎ | 9/21 [00:02<00:03, 3.44it/s]\n 48%|████▊ | 10/21 [00:02<00:03, 3.44it/s]\n 52%|█████▏ | 11/21 [00:03<00:02, 3.44it/s]\n 57%|█████▋ | 12/21 [00:03<00:02, 3.44it/s]\n 62%|██████▏ | 13/21 [00:03<00:02, 3.44it/s]\n 67%|██████▋ | 14/21 [00:04<00:02, 3.44it/s]\n 71%|███████▏ | 15/21 [00:04<00:01, 3.44it/s]\n 76%|███████▌ | 16/21 [00:04<00:01, 3.42it/s]\n 81%|████████ | 17/21 [00:04<00:01, 3.42it/s]\n 86%|████████▌ | 18/21 [00:05<00:00, 3.40it/s]\n 90%|█████████ | 19/21 [00:05<00:00, 3.44it/s]\n 95%|█████████▌| 20/21 [00:05<00:00, 3.44it/s]\n100%|██████████| 21/21 [00:06<00:00, 3.44it/s]\n100%|██████████| 21/21 [00:06<00:00, 3.46it/s]\nTotal safe images: 1 out of 1",
"output": [
"https://replicate.delivery/xezq/ifg9pqEOMfrKlkHmhf6cWzwkn8ObCVwdZZFk1ipTDsRxPG5oA/out-0.jpg"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-03-26T22:30:07.075Z",
"started_at": "2025-03-26T22:30:07.099052Z",
"completed_at": "2025-03-26T22:30:16.650679Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/4v5tgn5xwdrmc0cntj9rgnxadc/cancel",
"get": "https://api.replicate.com/v1/predictions/4v5tgn5xwdrmc0cntj9rgnxadc",
"stream": "https://stream.replicate.com/v1/files/bcwr-izp3jjzgwziophfxo6xrr4hsdrsbmprbo7mkl7azizwkwvzsrj7q",
"web": "https://replicate.com/p/4v5tgn5xwdrmc0cntj9rgnxadc"
},
"metrics": {
"predict_time": 9.551627303,
"total_time": 9.575679
}
}
