API genel bakışa dön

qr-code

POST1 kredi

Encodes a payload into a QR code and returns it in the requested format. PNG and SVG are suitable for direct rendering; UTF-8 is useful for terminal UIs and quick previews.

Uç nokta

POST https://x114.org/api/v1/qr-code

İstek gövdesi

POST gövdesinde JSON olarak gönderin.

NameTypeRequiredDescription
textstringrequiredThe payload to encode. Up to 4 KB of UTF-8 (less at higher error correction).
format"png" | "svg" | "utf8"optionalOutput format. "png" returns a base64 data URL; "svg" returns SVG markup; "utf8" returns block characters for terminals. Defaults to "png".
errorCorrectionLevel"L" | "M" | "Q" | "H"optionalQR error correction level. Defaults to "M".
widthnumberoptionalPixel size for PNG (64-2048) or logical width for SVG/UTF-8. Defaults to 256.

Yanıt gövdesi

Başarı durumunda JSON döner (HTTP 200).

NameTypeRequiredDescription
okbooleanrequiredTrue on success.
formatstringrequiredThe format returned ("png" | "svg" | "utf8").
errorCorrectionLevelstringrequiredThe error correction level that was used.
widthnumberrequiredThe width that was used (after clamping to the allowed range).
mimeTypestringrequiredMIME type of the output: "image/png" for png, "image/svg+xml" for svg, "text/plain" for utf8.
outputstringrequiredThe encoded QR — base64 data URL when format is "png", SVG markup when "svg", block-character text when "utf8".

Örnek

curl -X POST https://x114.org/api/v1/qr-code \
  -H "Authorization: Bearer sk_..." \
  -H "Content-Type: application/json" \
  -d '{"text":"https://x114.org","format":"svg","width":256}'
Bunu tarayıcıda deneyin

Ücretsiz araç, herhangi bir kod yazmadan aynı sonucu verir.

Aracı aç