開發者 — 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」。開放網路請傳 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 是一份指南,幫助沒有專用掃描器的人也能讀取它。