typetext
{
"batch_size": 1,
"controlnet_conditioning_scale": 1.3,
"guidance_scale": 9.5,
"negative_prompt": "ugly, disfigured, low quality, blurry, nsfw",
"num_inference_steps": 40,
"prompt": "3D fairy-tale town, quaint village, charming, picturesque, idyllic, cobblestone streets, storybook, fable, folklore, enchanting",
"qr_code_content": "https://qr2ai.com",
"seed": 7649977186,
"strength": 0.9
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_Ls2**********************************
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 qr2ai/3d_qr_code_ai_art_generator using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"qr2ai/3d_qr_code_ai_art_generator:31c347e84342832ce7647daee2c084a0e0cd0669f5de15c7280f6cefd9146ea5",
{
input: {
batch_size: 1,
controlnet_conditioning_scale: 1.3,
guidance_scale: 9.5,
negative_prompt: "ugly, disfigured, low quality, blurry, nsfw",
num_inference_steps: 40,
prompt: "3D fairy-tale town, quaint village, charming, picturesque, idyllic, cobblestone streets, storybook, fable, folklore, enchanting",
qr_code_content: "https://qr2ai.com",
seed: 7649977186,
strength: 0.9
}
}
);
// 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_Ls2**********************************
This is your API token. Keep it to yourself.
import replicate
Run qr2ai/3d_qr_code_ai_art_generator using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"qr2ai/3d_qr_code_ai_art_generator:31c347e84342832ce7647daee2c084a0e0cd0669f5de15c7280f6cefd9146ea5",
input={
"batch_size": 1,
"controlnet_conditioning_scale": 1.3,
"guidance_scale": 9.5,
"negative_prompt": "ugly, disfigured, low quality, blurry, nsfw",
"num_inference_steps": 40,
"prompt": "3D fairy-tale town, quaint village, charming, picturesque, idyllic, cobblestone streets, storybook, fable, folklore, enchanting",
"qr_code_content": "https://qr2ai.com",
"seed": 7649977186,
"strength": 0.9
}
)
# 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_Ls2**********************************
This is your API token. Keep it to yourself.
Run qr2ai/3d_qr_code_ai_art_generator 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": "qr2ai/3d_qr_code_ai_art_generator:31c347e84342832ce7647daee2c084a0e0cd0669f5de15c7280f6cefd9146ea5",
"input": {
"batch_size": 1,
"controlnet_conditioning_scale": 1.3,
"guidance_scale": 9.5,
"negative_prompt": "ugly, disfigured, low quality, blurry, nsfw",
"num_inference_steps": 40,
"prompt": "3D fairy-tale town, quaint village, charming, picturesque, idyllic, cobblestone streets, storybook, fable, folklore, enchanting",
"qr_code_content": "https://qr2ai.com",
"seed": 7649977186,
"strength": 0.9
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "ck56tdjb23qkhqxbmdlcajkegm",
"model": "qr2ai/3d_qr_code_ai_art_generator",
"version": "31c347e84342832ce7647daee2c084a0e0cd0669f5de15c7280f6cefd9146ea5",
"input": {
"batch_size": 1,
"controlnet_conditioning_scale": 1.3,
"guidance_scale": 9.5,
"negative_prompt": "ugly, disfigured, low quality, blurry, nsfw",
"num_inference_steps": 40,
"prompt": "3D fairy-tale town, quaint village, charming, picturesque, idyllic, cobblestone streets, storybook, fable, folklore, enchanting",
"qr_code_content": "https://qr2ai.com",
"seed": 7649977186,
"strength": 0.9
},
"logs": "Generating QR Code from content\n 0%| | 0/36 [00:00<?, ?it/s]\n 3%|▎ | 1/36 [00:01<00:36, 1.03s/it]\n 6%|▌ | 2/36 [00:01<00:24, 1.38it/s]\n 8%|▊ | 3/36 [00:02<00:20, 1.58it/s]\n 11%|█ | 4/36 [00:02<00:18, 1.71it/s]\n 14%|█▍ | 5/36 [00:03<00:17, 1.78it/s]\n 17%|█▋ | 6/36 [00:03<00:16, 1.83it/s]\n 19%|█▉ | 7/36 [00:04<00:15, 1.86it/s]\n 22%|██▏ | 8/36 [00:04<00:14, 1.89it/s]\n 25%|██▌ | 9/36 [00:05<00:14, 1.89it/s]\n 28%|██▊ | 10/36 [00:05<00:13, 1.91it/s]\n 31%|███ | 11/36 [00:06<00:13, 1.91it/s]\n 33%|███▎ | 12/36 [00:06<00:12, 1.91it/s]\n 36%|███▌ | 13/36 [00:07<00:12, 1.91it/s]\n 39%|███▉ | 14/36 [00:07<00:11, 1.92it/s]\n 42%|████▏ | 15/36 [00:08<00:10, 1.92it/s]\n 44%|████▍ | 16/36 [00:08<00:10, 1.92it/s]\n 47%|████▋ | 17/36 [00:09<00:09, 1.91it/s]\n 50%|█████ | 18/36 [00:09<00:09, 1.91it/s]\n 53%|█████▎ | 19/36 [00:10<00:08, 1.91it/s]\n 56%|█████▌ | 20/36 [00:10<00:08, 1.92it/s]\n 58%|█████▊ | 21/36 [00:11<00:07, 1.91it/s]\n 61%|██████ | 22/36 [00:11<00:07, 1.91it/s]\n 64%|██████▍ | 23/36 [00:12<00:06, 1.91it/s]\n 67%|██████▋ | 24/36 [00:13<00:06, 1.91it/s]\n 69%|██████▉ | 25/36 [00:13<00:05, 1.91it/s]\n 72%|███████▏ | 26/36 [00:14<00:05, 1.90it/s]\n 75%|███████▌ | 27/36 [00:14<00:04, 1.90it/s]\n 78%|███████▊ | 28/36 [00:15<00:04, 1.90it/s]\n 81%|████████ | 29/36 [00:15<00:03, 1.90it/s]\n 83%|████████▎ | 30/36 [00:16<00:03, 1.90it/s]\n 86%|████████▌ | 31/36 [00:16<00:02, 1.90it/s]\n 89%|████████▉ | 32/36 [00:17<00:02, 1.89it/s]\n 92%|█████████▏| 33/36 [00:17<00:01, 1.89it/s]\n 94%|█████████▍| 34/36 [00:18<00:01, 1.90it/s]\n 97%|█████████▋| 35/36 [00:18<00:00, 1.89it/s]\n100%|██████████| 36/36 [00:19<00:00, 1.89it/s]\n100%|██████████| 36/36 [00:19<00:00, 1.86it/s]",
"output": [
"https://replicate.delivery/pbxt/SDHaIeSEIRSfr0Z26H84wtZurC2QufbY303pyrTkcf2qz4pGB/output-0.png"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2023-10-03T15:20:05.453919Z",
"started_at": "2023-10-03T15:20:05.431793Z",
"completed_at": "2023-10-03T15:20:26.851069Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/ck56tdjb23qkhqxbmdlcajkegm/cancel",
"get": "https://api.replicate.com/v1/predictions/ck56tdjb23qkhqxbmdlcajkegm"
},
"metrics": {
"predict_time": 21.419276,
"total_time": 21.39715
}
}