Catalog/util-qr

Utilities

Generate a QR code API

Render a payload as a QR code image and return it as a base64 data URI plus the direct image URL, echoing the encoded payload and parameters. Uses the keyless goQR (api.qrserver.com) create-qr-code endpoint with configurable size, error-correction level (L/M/Q/H), margin and colors; URL building/validation are pure and only the image render touches the network. Answers 'turn this URL into a QR code','generate a scannable QR for my Wi-Fi string','make a 300px QR with high error correction'.

Price$0.01per request
MethodPOST
Route/v1/util/util-qr
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache3600s public
utilqrqrcodebarcodeimageencodegoqrdata-uri
API URLhttps://x402.hexl.dev/v1/util/util-qr
Integration docs
Example request
{
  "data": "https://example.com",
  "size": 200
}
Example response
{
  "data": "https://example.com",
  "size": 200,
  "ecc": "M",
  "margin": 1,
  "color": "000000",
  "bgColor": "ffffff",
  "format": "png",
  "imageUrl": "https://api.qrserver.com/v1/create-qr-code/?data=https%3A%2F%2Fexample.com&size=200x200&ecc=M&margin=1&color=000000&bgcolor=ffffff&format=png",
  "mimeType": "image/png",
  "dataUri": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...",
  "byteLength": 385
}
Input schema
{
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "type": "string",
      "minLength": 1,
      "maxLength": 900,
      "examples": [
        "https://example.com"
      ]
    },
    "size": {
      "type": "integer",
      "minimum": 10,
      "maximum": 1000,
      "examples": [
        200
      ]
    },
    "ecc": {
      "type": "string",
      "enum": [
        "L",
        "M",
        "Q",
        "H"
      ],
      "examples": [
        "M"
      ]
    },
    "margin": {
      "type": "integer",
      "minimum": 0,
      "maximum": 50,
      "examples": [
        1
      ]
    },
    "color": {
      "type": "string",
      "examples": [
        "000000"
      ]
    },
    "bgColor": {
      "type": "string",
      "examples": [
        "ffffff"
      ]
    },
    "format": {
      "type": "string",
      "enum": [
        "png",
        "gif",
        "jpeg",
        "svg"
      ],
      "examples": [
        "png"
      ]
    }
  },
  "examples": [
    {
      "data": "https://example.com",
      "size": 200
    }
  ]
}
Output schema
{
  "type": "object",
  "additionalProperties": true
}