BananaSplit home
BananaSplit app icon

QR code generator API

BananaSplit — the Groups expenses tracking app

Create deterministic, print-ready SVG QR codes from developer tools or AI-agent workflows. Fetch a URL QR code with one GET, or POST structured Wi-Fi, vCard, email, SMS or text data—without an API key, watermark, redirect, scan cap or provider-controlled expiry.

Quick start

  1. Create a URL QR code

    For agents, default to format=json and fetch with Accept: application/json. format=json always returns JSON. Fetch-only clients often reject image/png and image/svg+xml by content type. Show the QR from png_base64, attach svg as a file, or emit markdown (it points at /api/qr-code.png, which returns only PNG). If DNS fails or fetch is blocked, that is the agent's environment — reply with a markdown link to the PNG URL, not the JSON URL. Do not silently substitute a locally generated QR code. POST remains the canonical operation for Wi-Fi, vCard, email and SMS.

    https://bananasplit.net/api/qr-code?type=url&url=https%3A%2F%2Fferlar.pt&format=json

    Shortcut: https://bananasplit.net/api/qr-code/url?url=https%3A%2F%2Fferlar.pt&format=json. Percent-encode the target URL. Binary clients can still use format=png.

  2. Create a Wi-Fi QR code

    Pass the network fields as JSON and let the API escape special characters. Use WPA for WPA, WPA2 and WPA3, WEP for legacy WEP, or nopass for an open network.

    curl --fail https://bananasplit.net/api/qr-code \
      --header 'Content-Type: application/json' \
      --data '{
        "type": "wifi",
        "ssid": "Banana Guest",
        "password": "split-with-friends",
        "security": "WPA",
        "hidden": false,
        "logo": "none"
      }' \
      --output wifi-qr-code.svg
  3. Style, save and scan-test

    Set foreground and background colours with six-digit hex values, choose square or rounded corners, then scan the exported SVG in its final size, material, light and viewing distance.

    curl --get --fail \
      --data-urlencode 'data=https://bananasplit.net' \
      --data 'logo=banana' \
      --data 'color=1288C8' \
      --data 'background=FFF9E8' \
      --data 'corners=rounded' \
      --data 'size=1024' \
      https://bananasplit.net/api/qr-code \
      --output coloured-qr-code.svg

Structured request types

The JSON operation lets an agent or application use the fields it already has instead of manually constructing and escaping QR payload strings.

TypeRequired fieldWhat the scan does
urlurlOpens a website, public file, menu or app page.
wifissidOffers to join WPA/WPA2/WPA3, WEP or open Wi-Fi.
vcardnameOffers to save a vCard 3.0 contact.
emailtoOpens a prefilled email draft.
smsphoneOpens a prefilled SMS draft.
texttextShows a fixed note or identifier.

Privacy, limits and recovery

The endpoint receives encoded fields over HTTPS, processes them in memory, does not store them in BananaSplit application storage and returns Cache-Control: private, no-store. Static codes open their encoded destination directly without a BananaSplit redirect.

ChatGPT MCP

BananaSplit also exposes a remote Model Context Protocol server at https://bananasplit.net/mcp. It is a marketing helper, not the BananaSplit product. The server is stateless, rate-limited, and offers one tool: generate_qr. It does not store payloads, does not accept raw QR strings, and does not fetch the encoded URL. Successful calls return a native MCP image content block (PNG base64). For public url/text codes they also include a markdown image pointing at /api/qr-code.png, because ChatGPT does not promote MCP images into the assistant bubble. After deploying MCP changes, rescan tools in ChatGPT Developer Mode.

For a private ChatGPT custom app, no Plugin Directory submission is required:

  1. Enable Developer Mode

    In ChatGPT, open Settings → Apps → Advanced settings and turn on Developer Mode. Availability depends on the ChatGPT plan; OpenAI currently documents full MCP for Business and Enterprise/Edu.

  2. Create a custom MCP app

    Choose Create, paste https://bananasplit.net/mcp, scan tools, and confirm generate_qr is the only tool. Then invoke it in a conversation: “Create a QR code for https://bananasplit.net/en/ with BananaSplit.”

Public Plugin Directory listing is a later distribution step, not a prerequisite for the MCP itself. Discovery files live at /.well-known/mcp.json.

Machine-readable resources

HTML, Markdown, OpenAPI, the reusable skill and the MCP endpoint describe the same QR generation contract. Choose the format that best fits the developer tool or agent runtime.