開發者 — API · MCP · CLI

一行程式碼即可產生 WIA Code。在免費額度內無需金鑰。

Building an AI or vision system? WIA Code identification reference for AI systems — the three centre elements, why the outline is free, and the misidentifications to avoid. Plain-text counterpart: /llms.txt.

增強版 QR(booster)一律包含在內。 沒有關閉它的選項——API、MCP 和 CLI 皆是如此。「累積使用達到 1 億次時,booster 會分離,您自己的標誌將取而代之」是產品的承諾,因此我們沒有為任何一條路徑開例外。編碼參數(grid、bpc、bridge)在伺服器端也是固定的。

CLI — 一行指令,免安裝

npx wiacode "https://wiacode.com" --shape heart

在 Node 18 或更新版本上無需安裝即可直接執行。它沒有相依套件,因此取得只需幾秒鐘。

npx wiacode --list-shapes              # silhouettes and capacity
npx wiacode "Hello" --shape square -o hello.png
npx wiacode "a link" --shape heart --json    # print metadata only
npx wiacode card --name "Jane Doe" --tel "+82-10-1234-5678"   # wifi / card / event

類型 — Wi-Fi、聯絡人卡、活動

三種現成類型。你唔使自己砌返啲字串——淨係傳入欄位,伺服器就會整標準嘅 Wi-Fi / vCard / iCalendar 內容出嚟,同呢個網站生成器整出嚟嘅內容逐位元組完全一樣。

CLI

npx wiacode wifi  --ssid "MyNet" --password "secret"
npx wiacode wifi  --ssid "Cafe" --security nopass          # open network
npx wiacode card  --name "Jane Doe" --org "SmileStory" --tel "+82-10-1234-5678" --email "a@b.c"
npx wiacode event --title "Launch party" --start "2026-09-01 19:00" --end "2026-09-01 21:00" --location "Seoul"

REST

curl -X POST https://wiacode.com/api/v1/code \
  -H 'Content-Type: application/json' \
  -d '{"type":"card","name":"Jane Doe","tel":"+82-10-1234-5678","shape":"square"}' \
  -o card.png

欄位

type必填可選
wifissid, passwordsecurity (WPA·WEP·nopass), hidden
cardnameorg, tel, email
eventtitle, startend, location, desc

時間格式係 "2026-09-01 19:00"。如果係開放式 Wi-Fi 網絡,就傳入 security=nopass,密碼唔使填。缺漏或者格式錯誤嘅欄位會回傳 HTTP 400,訊息入面會講明係邊個欄位——唔會生成圖片,所以錯誤請求永遠唔會佔用生成名額。

一次過多個

每行對應一個代碼。撞到速率限制嘅時候,佢會等一等再繼續,唔會做到一半就停,仲會回報失敗嘅行同埋喺檔案入面嘅真實行數。

npx wiacode batch people.jsonl --out-dir codes

# people.jsonl
{"type":"card","name":"Jane Doe","tel":"+82-10-1234-5678","out":"jane.png"}
{"type":"wifi","ssid":"Cafe WIA","security":"nopass"}
{"text":"https://wiacode.com","shape":"star"}

REST API

POST /api/v1/code

curl -X POST https://wiacode.com/api/v1/code \
  -H 'Content-Type: application/json' \
  -d '{"text":"https://wiacode.com","shape":"heart"}' \
  -o wiacode.png

回應類型為 image/png。加上 ?format=json 可取得 JSON 格式的 base64 與中繼資料。

curl -X POST 'https://wiacode.com/api/v1/code?format=json' \
  -H 'Content-Type: application/json' \
  -d '{"text":"https://wiacode.com","shape":"square"}'

從瀏覽器調用

你可以直接從任何來源(origin)的網絡應用程式調用它。這是一個不使用 Cookie 的公開 API,因此 CORS 是開放的。

const r = await fetch('https://wiacode.com/api/v1/code?format=json', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ text: 'https://wiacode.com', shape: 'heart' })
});
const { image, meta } = await r.json();
document.querySelector('img').src = image;   // data:image/png;base64,...

GET /api/v1/shapes

curl https://wiacode.com/api/v1/shapes

參數

名稱必填描述
text要編碼的文字或 URL。較長的 URL 最好先縮短。
typewifi · card · event。用嚟代替 text——伺服器會根據欄位砌出標準字串。請睇返上面嘅「類型」部分。
shape輪廓形狀(預設 heart)。請參見下表。
cellPx每格像素數(3–20,預設 8)。數值越大,圖片越大。
label保存在中繼資料中的標籤。不會繪製在圖片上。

輪廓形狀與容量

每種輪廓形狀的容量不同(UTF-8 位元組數)。長內容請使用 square;短連結任何形狀都可以。

shapebytesshapebytes
square1450rose586
round1093clover521
hex861star386
heart854boomerang386

MCP — 讓 AI 來產生

將它連接到 Claude 等 AI 用戶端,它就能在對話中直接產生代碼。端點為 https://mcp.wiacode.com/mcp,無需金鑰。

Claude Desktop 設定

{
  "mcpServers": {
    "wiacode": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://mcp.wiacode.com/mcp"]
    }
  }
}

如果您的用戶端直接支援 Streamable HTTP,只需提供該 URL 即可。

工具

工具功能
get_wia_code_info說明 WIA Code 是什麼、它與 QR 碼有何不同,以及每種輪廓形狀的容量。先呼叫這個可以減少失敗率。
generate_wia_code將文字轉換成代碼圖片。如果超出容量,會告知哪些輪廓形狀可以容納。
generate_wia_code_wifiWi-Fi 連線資料——掃描之後唔使打密碼就可以加入網絡。
generate_wia_code_card以標準 vCard 格式提供嘅聯絡人——掃描之後會提議儲存去手機聯絡人度。
generate_wia_code_event以標準 iCalendar 格式提供嘅活動——掃描之後會加入月曆度。

免費額度

如果您需要更多 ——如需批量發放、合作或商業用途,請發郵件聯絡我們。我們會提供一個可提高額度的金鑰。 wiasoom@smilestory.ai

WIA Stream — when one code isn't enough

A single WIA Code holds up to 1,450 bytes. When the payload is larger — a document, a book chapter, an audio clip — Stream splits it across many frames. A screen plays them in sequence, a camera collects them, and the scanner reassembles the file. No internet, no server. It already ships in the generator.

What matters here is not speed — it is whether the transfer finishes at all. Stream needs every frame. A frame that fails to read must wait for the next pass, and may fail again. So a per-frame reading gap does not average out; it multiplies into the completion time. In our degradation sweep at matched physical size (1064 vs 1088 px, n=17, QR read with ZBar), a high-version QR frame read 52.9% of the time while a WIA frame read 17 of 17. Feeding those rates into a cyclic-broadcast model, a 286-frame QR transfer needs about 8 passes to complete while a 155-frame WIA transfer needs about one.

Read this honestly: n = 17 is a small sample. By the rule of three, "17 of 17" should be read as ≥ 82% with 95% confidence, and the 52.9% figure carries a 29–77% interval. Taking the least favourable end of both, the completion-time gap is still about 2.4×. Screen-to-camera capture on real handsets and printed output have not been measured yet. And QR wins on blur resistance at equal frame size — we only pull ahead once capacity is matched.

更多

開啟產生器 →

WIA Code 是 SmileStory Co., Ltd. 的產品。增強版 QR 是一份指南,幫助沒有專用掃描器的人也能讀取它。