Zum Inhalt springen

QrConfig-Referenz

Der Body, den du per POST an /api/qr/generate schickst (und den Vorlagen und der KI-Endpunkt überschreiben). Alles, was du nicht setzt, fällt auf den Standardwert der Engine zurück – außer content gibt es kein Pflichtfeld.

Maßgebliche Quelle: Models/QrModels.cs im .NET-Backend. Die Liste unten deckt jedes öffentliche Feld ab; für einen vollständigen Schema-Dump mit Typen und Nullbarkeit führ pnpm docs:schema im Frontend-Repo aus – das generiert diese Seite aus den C#-Modellen neu.

Inhalt

FeldTypStandardHinweise
contentstringPflichtURL oder Text, der codiert wird. Max. 4296 Zeichen.
eccLevelenumMFehlerkorrektur. L 7% · M 15% · Q 25% · H 30%. Mit Logo auf H erhöhen.

Ausgabe

FeldTypStandardHinweise
fileFormatenumpngpng, jpg, svg, pdf, webp.
responseTypeenumbase64base64 liefert JSON; binary liefert die rohe Datei.
outputWidthint800Pixel. Bis 4096.
outputHeightint—Standard ist outputWidth. Nur überschreiben, wenn du kein Quadrat brauchst.
pixelsPerModuleint10Auflösung pro QR-Modul. Erhöht outputWidth, wenn nicht gesetzt.
qualityint90JPG/WebP-Qualität 1–100.
transparentBackgroundboolfalseNur PNG/SVG/WebP.

Farben

FeldTypStandardHinweise
primaryColorhex#000000Modulfarbe. #RGB, #RRGGBB, #RRGGBBAA.
secondaryColorhex—Wird von Farbverläufen und verbundenen Modulen genutzt.
backgroundColorhex#FFFFFFFarbe der Ruhezone.
foregroundStyleenumsolidsolid, linearGradient, radialGradient, sweepGradient.
gradientTypeenumlinearKurzform, gleichbedeutend mit foregroundStyle.
gradientDirectionenumverticalvertical, horizontal, diagonal, diagonal-reverse.
gradientColorshex[]—2–6 Farbstopps.
gradientStopsfloat[]gleichmäßigPositionen 0–1. Muss zu gradientColors.length passen.
gradientAngleint0Grad; überschreibt gradientDirection, wenn gesetzt.

Module (die Punkte)

FeldTypStandardHinweise
qrShapeenumsquareÄußere Fläche: square, roundedsquare, circle.
qrShapeRadiusint0Eckradius bei qrShape: roundedsquare.
moduleShapeenumsquareEine von 27. Siehe Muster.
moduleScalefloat1.00.5–1.0. Verkleinert jedes Modul für einen luftigeren Look.
moduleRotationfloat0Grad.
moduleStyleenumsolidsolid, outline, striped.
modulePatternenumstandardstandard, checker, alternating.
moduleSizeVariationfloat00–0.3 sorgt für organische Variation pro Modul.
connectedStyleenumnonenone, fluid, sharp, round. Verbindet benachbarte Module.

Positionsmarker (die 3 großen Augen)

FeldTypStandardHinweise
finderOuterShapeenumsquaresquare, roundedsquare, circle, diamond, octagon, target, double.
finderInnerShapeenumsquaresquare, roundedsquare, circle, diamond, star, dot.
finderOuterColorhex—Standard ist primaryColor.
finderInnerColorhex—Standard ist primaryColor.
finderStyleenumstandardstandard, flat, embossed.
FeldTypStandardHinweise
logoUrlurl—Öffentliche URL, serverseitig geladen. PNG/JPG/GIF/BMP/WebP, ≤ 10 MB.
logoBase64string—Alternative als Inline-Data-URI.
logoFilemultipart—Binärer Teil bei multipart/form-data.
logoShapeenumsquaresquare, circle, rounded.
logoSizePercentfloat185–30. Ab ≥ 20 immer eccLevel auf H setzen.
logoBorderWidthint0Rahmenstärke in Pixeln.
logoBorderColorhex#FFFFFF
logoShadowboolfalseSchlagschatten unter dem Logo.
logoBackgroundenumnonenone, solid, match-bg.
cleanBehindLogobooltrueEntfernt die Module unter dem Logo, damit es nicht mit dem QR-Code kollidiert.

Textüberlagerungen

FeldTypHinweise
centerTextobjectBanner quer durch die Mitte: { text, color?, backgroundColor?, height?, fontSize?, bold?, fontFamily? }.
circularTextobjectText im Bogen um den QR-Code: { text, color?, fontSize?, position? }.
ctaTextstringBildunterschrift unter dem QR-Code (z. B. „SCAN ME“).
ctaTextStyleobject{ color?, fontSize?, fontFamily?, bold?, italic? }.

Rahmen

FeldTypHinweise
frameobject{ enabled, shape, color, width, padding, cornerRadius, fillColor? }. Formen: rectangle, speech-bubble, badge, shield, circle.

Hintergrundbild

FeldTypHinweise
backgroundImageUrl / backgroundImageBase64url/stringDezentes Bild, das hinter dem QR-Code gerendert wird.
backgroundImageBlendModeenumnormal, multiply, screen, overlay.
backgroundImageOpacityfloat0–1.
backgroundImageBlurintPixel.
backgroundImageFitenumcover, contain, stretch.

Effekte

FeldTypHinweise
shadowobject{ color, blur, offsetX, offsetY }.
glowobject{ color, blur, intensity }.
embossobject{ depth, lightAngle, lightColor?, shadowColor? }.
noisefloat0–0.3 fügt Filmkorn hinzu.
blurintPixel.
edgeFadefloat0–0.5 blendet den Rand der Fläche aus.
colorFilterenumnone, sepia, bw, cool, warm.

KI-spezifisch (nur bei /api/qr/ai/generate*)

FeldTypHinweise
promptstringBeschreibung in natürlicher Sprache.
stylePresetenumminimal, artistic, corporate, playful, luxury, tech, nature.
creativityfloat0–1. Steuert LLM-Temperatur + Mut beim Design.
strictScannabilityboolBei true korrigiert die Engine ECC/Kontrast automatisch.
llmProviderenumNur Marketplace: openai, anthropic, google, mistral, cohere, groq.
llmApiKeystringNur Marketplace. Einmal weitergeleitet, nie protokolliert.
llmModelstringOptional; Standard ist das günstige Hauptmodell des Anbieters.

Reihenfolge der Validierung

  1. JSON wohlgeformt → sonst INVALID_JSON.
  2. Feldtypen + Grenzen → VALIDATION_ERROR mit details[].
  3. Farbkontrast → LOW_CONTRAST, wenn < 4:1 und strictScannability: true.
  4. Logogröße vs. ECC → LOGO_TOO_LARGE, wenn zu aggressiv.
  5. ISO-18004-Decodierung als Gegenprobe → QR_GENERATION_FAILED, wenn sich das gerenderte Ergebnis nicht wieder lesen lässt.

Die vollständige Matrix der Fehlercodes findest du unter Fehler.

Diese Seite neu generieren

cd frontend
pnpm docs:schema   # reads ../Models/QrModels.cs and rewrites this file

Das Skript ist tools/gen-docs-schema.ts. Jedes Feld, das dem C#-Modell mit einem [Description]-Attribut hinzugefügt wird, erscheint hier automatisch.