# QR Code Generator > QR Code Generator transforms plain QR codes into visually appealing, image-based designs while keeping them fully scannable ## Overview - **Model ID**: `qr-code-generator` - **Category**: image - **Provider**: modelslab - **Status**: active - **Screenshot**: `https://assets.modelslab.com/generations/b95e06be-3041-4b81-a2fd-751eb734532a.webp` ## API Information This model can be used via our HTTP API. See the API documentation and usage examples below. ### Endpoint - **URL**: `https://modelslab.com/api/v5/controlnet` - **Method**: POST ### Parameters - **`prompt`** (required): Enter Prompt for generating QR image - Type: textarea - Example: Enter prompt here - **`init_image`** (required): Upload your QR image here - Type: file (image/jpeg,image/png,image/webp) - Example: Please Upload your QR image - **`model_id`** (required): select the model_id - Type: select (options: realistic-vision-v51, sdxl) - **`width`** (optional): width of the image that need to be generated - Type: number (range: 512-1024) - **`height`** (optional): height of the generated output - Type: number (range: 512-1024) - **`controlnet_conditioning_scale`** (optional): 0.1 (Creative) takes min refrance from init image and 1.0 takes max refrance from init image - Type: number (range: 0.1-1) - **`auto_hint`** (optional): - Type: toggle - **`negative_prompt`** (optional): - Type: textarea - **`guidance_scale`** (optional): - Type: number (range: 1-10) ## Usage Examples ### cURL ```bash curl --request POST \ --url https://modelslab.com/api/v5/controlnet \ --header "Content-Type: application/json" \ --data '{ "key": "YOUR_API_KEY", "model_id": "qr-code-generator", "prompt": "A giant whale flying in the sky", "init_image": "https://assets.modelslab.com/generations/2d219313-b15f-4e19-8abe-a770dd03425a", "width": "1024", "height": "1024", "controlnet_conditioning_scale": "0.7", "auto_hint": false, "negative_prompt": "((body)), ((human)),((female)),((woman)),((person)),((girl)),(normal quality), (deformed iris, deformed pupils, semi-realistic, cgi, 3d, render, sketch, cartoon, drawing, anime), text, cropped, out of frame, (low quality), (worst quality), paintings, sketches,lowres, text, cropped, worst quality, low quality, normal quality, signature, watermark, username, blurry,skech,logo,blurry, drawing, sketch, poor quality, ugly, low resolution, saturated, high contrast, oversharpened,low quality, bad anatomy, worst quality,((deformed)), ((deformed objects)), (disfigured), cropped, jpeg artifacts, error, mutation,noise, duplication, bad proportions, UnrealisticDream", "guidance_scale": "7.5" }' ``` ### Python ```python import requests response = requests.post( "https://modelslab.com/api/v5/controlnet", headers={ "Content-Type": "application/json" }, json={ "key": "YOUR_API_KEY", "model_id": "qr-code-generator", "prompt": "A giant whale flying in the sky", "init_image": "https://assets.modelslab.com/generations/2d219313-b15f-4e19-8abe-a770dd03425a", "width": "1024", "height": "1024", "controlnet_conditioning_scale": "0.7", "auto_hint": False, "negative_prompt": "((body)), ((human)),((female)),((woman)),((person)),((girl)),(normal quality), (deformed iris, deformed pupils, semi-realistic, cgi, 3d, render, sketch, cartoon, drawing, anime), text, cropped, out of frame, (low quality), (worst quality), paintings, sketches,lowres, text, cropped, worst quality, low quality, normal quality, signature, watermark, username, blurry,skech,logo,blurry, drawing, sketch, poor quality, ugly, low resolution, saturated, high contrast, oversharpened,low quality, bad anatomy, worst quality,((deformed)), ((deformed objects)), (disfigured), cropped, jpeg artifacts, error, mutation,noise, duplication, bad proportions, UnrealisticDream", "guidance_scale": "7.5" } ) print(response.json()) ``` ### JavaScript ```javascript fetch("https://modelslab.com/api/v5/controlnet", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ "key": "YOUR_API_KEY", "model_id": "qr-code-generator", "prompt": "A giant whale flying in the sky", "init_image": "https://assets.modelslab.com/generations/2d219313-b15f-4e19-8abe-a770dd03425a", "width": "1024", "height": "1024", "controlnet_conditioning_scale": "0.7", "auto_hint": false, "negative_prompt": "((body)), ((human)),((female)),((woman)),((person)),((girl)),(normal quality), (deformed iris, deformed pupils, semi-realistic, cgi, 3d, render, sketch, cartoon, drawing, anime), text, cropped, out of frame, (low quality), (worst quality), paintings, sketches,lowres, text, cropped, worst quality, low quality, normal quality, signature, watermark, username, blurry,skech,logo,blurry, drawing, sketch, poor quality, ugly, low resolution, saturated, high contrast, oversharpened,low quality, bad anatomy, worst quality,((deformed)), ((deformed objects)), (disfigured), cropped, jpeg artifacts, error, mutation,noise, duplication, bad proportions, UnrealisticDream", "guidance_scale": "7.5" }) }) .then(response => response.json()) .then(data => console.log(data)); ``` ## Links - [Model Playground](https://modelslab.com/models/qr-code-generator/qr-code-generator) - [API Documentation](https://docs.modelslab.com) - [ModelsLab Platform](https://modelslab.com)