# qrcode-v8 > Generates high-quality, scannable QR codes with enhanced visual customization using Stable Diffusion and ControlNet, optimized for creative and functional QR art. ## Overview - **Model ID**: `qrcode-v8` - **Category**: stable diffusion - **Provider**: modelslab - **Status**: model_ready - **Screenshot**: `https://assets.modelslab.com/generations/1deda430-a97b-487b-b7da-4640f2f65662` ## 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 - **`init_image`** (required): - Type: file - Example: Please upload image - **`prompt`** (required): - Type: textarea - Example: Enter Prompt - **`controlnet_model`** (required): controlnet model and conttrolnet type must be same - Type: select (options: lineart, canny, depth, scribble, mlsd, openpose, softedge, qrcode) - **`controlnet_type`** (required): controlnet model and conttrolnet type must be same - Type: select (options: lineart, canny, depth, scribble, mlsd, openpose, softedge, qrcode) - **`model_id`** (required): Some controlNet models are not supported by FLUX - Type: select (options: sdxl, sd15, fluxdev) - **`controlnet_conditioning_scale`** (required): 0.1 (Creative) takes min refrance from init image and 1.0 takes max refrance from init image - Type: number (range: 0.1-1) - **`negative_prompt`** (optional): - Type: textarea - Example: Enter Negative prompt that you do not want to see in image - **`samples`** (optional): - Type: number (range: 1-4) - **`guidance_scale`** (optional): - Type: number (range: 1-10) - **`num_inference_steps`** (optional): - Type: number (range: 21-31) ## 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": "qrcode-v8", "init_image": "https://assets.modelslab.com/generations/a8572240-3040-4fd8-b9f4-aeaaf4fe287d", "prompt": "a girl, wearing red bikini, looking at camera, ocean in background", "controlnet_model": "lineart", "controlnet_type": "lineart", "controlnet_conditioning_scale": "0.5", "negative_prompt": "(worst quality:2), (low quality:2), (normal quality:2), (jpeg artifacts), (blurry), (duplicate), (morbid), (mutilated), (out of frame), (extra limbs), (bad anatomy), (disfigured), (deformed), (cross-eye), (glitch), (oversaturated), (overexposed), (underexposed), (bad proportions), (bad hands), (bad feet), (cloned face), (long neck), (missing arms), (missing legs), (extra fingers), (fused fingers), (poorly drawn hands), (poorly drawn face), (mutation), (deformed eyes), watermark, text, logo, signature, grainy, tiling, censored, nsfw, ugly, blurry eyes, noisy image, bad lighting, unnatural skin, asymmetry", "samples": "1", "guidance_scale": "7.5", "num_inference_steps": "31" }' ``` ### 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": "qrcode-v8", "init_image": "https://assets.modelslab.com/generations/a8572240-3040-4fd8-b9f4-aeaaf4fe287d", "prompt": "a girl, wearing red bikini, looking at camera, ocean in background", "controlnet_model": "lineart", "controlnet_type": "lineart", "controlnet_conditioning_scale": "0.5", "negative_prompt": "(worst quality:2), (low quality:2), (normal quality:2), (jpeg artifacts), (blurry), (duplicate), (morbid), (mutilated), (out of frame), (extra limbs), (bad anatomy), (disfigured), (deformed), (cross-eye), (glitch), (oversaturated), (overexposed), (underexposed), (bad proportions), (bad hands), (bad feet), (cloned face), (long neck), (missing arms), (missing legs), (extra fingers), (fused fingers), (poorly drawn hands), (poorly drawn face), (mutation), (deformed eyes), watermark, text, logo, signature, grainy, tiling, censored, nsfw, ugly, blurry eyes, noisy image, bad lighting, unnatural skin, asymmetry", "samples": "1", "guidance_scale": "7.5", "num_inference_steps": "31" } ) 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": "qrcode-v8", "init_image": "https://assets.modelslab.com/generations/a8572240-3040-4fd8-b9f4-aeaaf4fe287d", "prompt": "a girl, wearing red bikini, looking at camera, ocean in background", "controlnet_model": "lineart", "controlnet_type": "lineart", "controlnet_conditioning_scale": "0.5", "negative_prompt": "(worst quality:2), (low quality:2), (normal quality:2), (jpeg artifacts), (blurry), (duplicate), (morbid), (mutilated), (out of frame), (extra limbs), (bad anatomy), (disfigured), (deformed), (cross-eye), (glitch), (oversaturated), (overexposed), (underexposed), (bad proportions), (bad hands), (bad feet), (cloned face), (long neck), (missing arms), (missing legs), (extra fingers), (fused fingers), (poorly drawn hands), (poorly drawn face), (mutation), (deformed eyes), watermark, text, logo, signature, grainy, tiling, censored, nsfw, ugly, blurry eyes, noisy image, bad lighting, unnatural skin, asymmetry", "samples": "1", "guidance_scale": "7.5", "num_inference_steps": "31" }) }) .then(response => response.json()) .then(data => console.log(data)); ``` ## Links - [Model Playground](https://modelslab.com/models/controlnet/qrcode-v8) - [API Documentation](https://docs.modelslab.com) - [ModelsLab Platform](https://modelslab.com)