{"openapi":"3.1.0","info":{"title":"Pretty QR API","version":"1.0.0","description":"Returns the same PNG (2048 px) or SVG file that Download gives in the Pretty QR editor. Needs a Pro account and an API key from https://pretty-qr.com/api-keys. Quota: 1000 requests an hour and 10000 a calendar month (UTC); every authenticated request counts, errors included. Docs: https://pretty-qr.com/docs/api","contact":{"email":"contact@pretty-qr.com"}},"servers":[{"url":"https://pretty-qr.com"}],"security":[{"apiKey":[]}],"paths":{"/api/v1/qr":{"post":{"operationId":"createQrCode","summary":"Create a QR code","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QrRequest"},"examples":{"plain":{"summary":"Plain code","value":{"content":"https://example.com","design":{"backgroundColor":"#ffffff","foregroundStyle":{"colors":["#000000"]}},"format":"png"}},"banner":{"summary":"Banner frame with a label","value":{"content":"https://example.com/menu","design":{"backgroundColor":"#ffffff","foregroundStyle":{"colors":["#4338ca"]},"moduleShape":"rounded","eyeShape":"rounded","cornerRadius":24,"frame":{"enabled":true,"type":"banner","borderWidth":8,"borderColor":"#4338ca","padding":16,"cornerRadius":16,"text":{"enabled":true,"content":"SCAN ME"}}},"format":"png"}},"heart-logo":{"summary":"Heart with a logo","value":{"content":"https://example.com/love","design":{"backgroundColor":"#111827","foregroundStyle":{"colors":["#ffffff"]},"moduleShape":"square","eyeShape":"rounded","logo":{"src":"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAgMTAwIj48cmVjdCB3aWR0aD0iMTAwIiBoZWlnaHQ9IjEwMCIgcng9IjIyIiBmaWxsPSIjZWY0NDQ0Ii8+PGNpcmNsZSBjeD0iNTAiIGN5PSI1MCIgcj0iMjYiIGZpbGw9IiNmZmZmZmYiLz48cGF0aCBkPSJNMzggNTJsOCA4IDE2LTE4IiBmaWxsPSJub25lIiBzdHJva2U9IiNlZjQ0NDQiIHN0cm9rZS13aWR0aD0iOCIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+PC9zdmc+","size":0.4,"margin":0,"hideBackgroundDots":false},"frame":{"enabled":true,"type":"speech-bubble","borderWidth":12,"borderColor":"#ffffff","padding":8,"cornerRadius":16,"text":{"enabled":true,"content":"SCAN ME"}},"shape":{"type":"heart"}},"format":"png"}},"coffee-cup":{"summary":"Coffee cup","value":{"content":"https://example.com/coffee","design":{"backgroundColor":"#fdf2f8","foregroundStyle":{"colors":["#312e81"]},"moduleShape":"dot","eyeShape":"rounded","frame":{"enabled":true,"type":"coffee-cup","borderWidth":12,"borderColor":"#312e81","padding":8,"cornerRadius":16,"text":{"enabled":true,"content":"Scan for 10% off"},"outerColor":"#db2777"},"shape":{"type":"circle"}},"format":"png"}}}}}},"responses":{"200":{"description":"The QR code file.","content":{"image/png":{"schema":{"type":"string","contentMediaType":"image/png"}},"image/svg+xml":{"schema":{"type":"string"}}}},"400":{"description":"The body is not JSON, a field is unknown or out of range, the logo does not decode, or the content is too long for the chosen silhouette.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No Authorization: Bearer header, or the key is unknown or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The account the key belongs to no longer has Pro.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The body is over 1 MB, or the content is over what a QR code holds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over 1,000 requests in the last hour or 10,000 this calendar month (UTC). Wait for the seconds in Retry-After.","headers":{"Retry-After":{"description":"Seconds until a request is allowed again.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The renderer is busy or restarting. Retry after a few seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"A `pqr_…` key from /api-keys."}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string","description":"What is wrong, in a sentence."}}},"QrRequest":{"type":"object","additionalProperties":false,"required":["content","design","format"],"properties":{"content":{"type":"string","minLength":1,"description":"Text or URL to encode, at most 2331 bytes (fewer with a logo, the shield or a silhouette)."},"format":{"type":"string","enum":["png","svg"]},"design":{"$ref":"#/components/schemas/Design"}}},"Design":{"type":"object","additionalProperties":false,"required":["backgroundColor","foregroundStyle"],"properties":{"backgroundColor":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$","example":"#000000"},"foregroundStyle":{"type":"object","additionalProperties":false,"required":["colors"],"properties":{"colors":{"type":"array","items":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$","example":"#000000"},"minItems":1,"maxItems":5,"description":"Only the first colour is drawn until gradients launch."},"type":{"type":"string","enum":["linear","radial"]},"direction":{"type":"string","enum":["top-bottom","left-right","top-left-bottom-right","top-right-bottom-left"]}}},"moduleShape":{"type":"string","enum":["square","circle","rounded","dot"],"default":"square"},"eyeShape":{"type":"string","enum":["square","circle","rounded"],"default":"square"},"cornerRadius":{"type":"number","minimum":0,"maximum":1000},"shape":{"type":["object","null"],"additionalProperties":false,"required":["type"],"properties":{"type":{"type":"string","enum":["square","circle","heart","shield","house","pin"]}}},"logo":{"type":["object","null"],"additionalProperties":false,"required":["src","size","margin","hideBackgroundDots"],"properties":{"src":{"type":"string","pattern":"^data:image/(png|jpeg|webp|svg\\+xml);base64,","description":"Base64 data URL. SVGs must be self-contained."},"size":{"type":"number","minimum":0.1,"maximum":0.5},"margin":{"type":"number","minimum":0,"maximum":50},"hideBackgroundDots":{"type":"boolean"}}},"frame":{"type":["object","null"],"additionalProperties":false,"required":["enabled","type","borderWidth","borderColor","padding","cornerRadius"],"properties":{"enabled":{"const":true},"type":{"type":"string","enum":["rectangle","speech-bubble","banner","shopping-bag","coffee-cup"]},"borderWidth":{"type":"number","minimum":1,"maximum":20},"borderColor":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$","example":"#000000"},"padding":{"type":"number","minimum":8,"maximum":48},"cornerRadius":{"type":"number","minimum":0,"maximum":50},"text":{"type":"object","additionalProperties":false,"required":["enabled","content"],"properties":{"enabled":{"type":"boolean"},"content":{"type":"string","maxLength":24}}},"outerColor":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$","example":"#000000"}}}}}}},"x-max-body-bytes":1048576}