{
  "format": "delx/intent-card/v1",
  "id": "qr-code-api",
  "intent": "generate a QR code from text or a URL",
  "title": "QR code API for agents",
  "description": "PNG/SVG QR for tickets and onboarding at $0.001—self-contained data URI + receipt; destination never fetched.",
  "keywords": [
    "QR code API",
    "QR generator API",
    "PNG QR code",
    "SVG QR code",
    "x402 QR code"
  ],
  "updated_at": "2026-08-06",
  "canonical_url": "https://commerce.delx.ai/intents/qr-code-api",
  "machine_url": "https://commerce.delx.ai/intents/qr-code-api.json",
  "recommendation": {
    "tool_name": "generate_qr_code",
    "service_name": "QR Codes for Agents",
    "method": "POST",
    "resource": "https://api.delx.ai/api/v1/x402/qr-code",
    "price_usdc": "0.001",
    "payment_protocols": [
      "x402",
      "mpp"
    ],
    "input_schema": {
      "type": "object",
      "properties": {
        "data": {
          "type": "string",
          "minLength": 1,
          "maxLength": 2048,
          "description": "Text or URL to encode; it is not fetched or validated."
        },
        "text": {
          "type": "string",
          "minLength": 1,
          "maxLength": 2048,
          "description": "Alias for data."
        },
        "format": {
          "type": "string",
          "enum": [
            "png",
            "svg"
          ],
          "default": "png"
        },
        "error_correction": {
          "type": "string",
          "enum": [
            "L",
            "M",
            "Q",
            "H"
          ],
          "default": "M"
        },
        "box_size": {
          "type": "integer",
          "minimum": 1,
          "maximum": 8,
          "default": 4
        },
        "border": {
          "type": "integer",
          "minimum": 0,
          "maximum": 16,
          "default": 4
        }
      },
      "required": [
        "data"
      ],
      "additionalProperties": false
    },
    "example_input": {
      "data": "https://delx.ai",
      "format": "png",
      "error_correction": "M"
    },
    "example_output": {
      "schema": "delx/qr-code/v1",
      "scope": "qr_code",
      "qr_id": "qr_8b4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f",
      "format": "png",
      "media_type": "image/png",
      "data_uri": "data:image/png;base64,\u003cbounded-png>",
      "bytes": 438,
      "sha256": "8b4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f901234567890abcdef1234567890ab",
      "input_sha256": "a6e8f7c3d9b2a1e0f6c5d4b3a29180706050403020100ffeeddccbbaa99887766",
      "version": 2,
      "modules": 33,
      "error_correction": "M",
      "provider": "first-party",
      "model": "qrcode-python",
      "upstream_cost_usd": 0,
      "sale_price_usdc": 0.001,
      "gross_margin_usd": 0.001,
      "attribution": "QR rendered locally by Delx; the encoded destination is supplied by the caller and is not fetched or validated."
    },
    "agentcash": {
      "buy": "npx agentcash@latest fetch https://api.delx.ai/api/v1/x402/qr-code -m POST -H 'x-delx-source: intent-card-qr-code-api' --max-amount 0.001 -b '{\"data\":\"https://delx.ai\",\"format\":\"png\",\"error_correction\":\"M\"}'",
      "max_amount_usdc": "0.001"
    }
  },
  "attribution": {
    "header": "x-delx-source",
    "value": "intent-card-qr-code-api"
  },
  "evidence": {
    "paid_openapi": "https://api.delx.ai/openapi.x402.json",
    "governed_portfolio": "https://api.delx.ai/x402-portfolio.json",
    "live_contract": "https://api.delx.ai/api/v1/x402/qr-code"
  }
}
