Nhà phát triển — API · MCP · CLI

Tạo một WIA Code chỉ trong một dòng lệnh. Không cần khóa trong giới hạn miễn phí.

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 luôn được bao gồm. Không có tùy chọn để tắt nó — điều này cũng đúng với API, MCP và CLI. "Khi lượt sử dụng tích lũy đạt 100 triệu lần, booster sẽ tách ra và logo riêng của bạn sẽ thay vào vị trí đó" là một cam kết sản phẩm, vì vậy chúng tôi không tạo ngoại lệ cho bất kỳ đường nào. Các tham số mã hóa (grid, bpc, bridge) cũng được cố định trên máy chủ.

CLI — một dòng, không cần cài đặt

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

Chạy ngay trên Node 18 trở lên, không cần cài đặt. Nó không có phụ thuộc, nên việc tải về chỉ mất vài giây.

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

Loại — Wi-Fi, danh thiếp, sự kiện

Ba loại dùng ngay. Bạn không phải tự ghép chuỗi — chỉ cần gửi các trường và máy chủ dựng nội dung Wi-Fi / vCard / iCalendar chuẩn, giống hệt từng byte với thứ mà trình tạo trên trang này sinh ra.

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

Các trường

typebắt buộctùy chọn
wifissid, passwordsecurity (WPA·WEP·nopass), hidden
cardnameorg, tel, email
eventtitle, startend, location, desc

Thời gian theo định dạng "2026-09-01 19:00". Với mạng Wi-Fi mở, gửi security=nopass và bỏ mật khẩu. Trường thiếu hoặc sai định dạng trả về HTTP 400 kèm tên trường — không tạo ảnh, nên yêu cầu sai không bao giờ chiếm chỗ dựng ảnh.

Tạo nhiều cùng lúc

Mỗi dòng là một mã. Khi chạm giới hạn mỗi phút, nó chờ rồi tiếp tục thay vì dừng giữa chừng, và báo các dòng lỗi kèm số dòng thật trong tệp.

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

Phản hồi có kiểu image/png. Thêm ?format=json để nhận base64 và metadata dưới dạng JSON.

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

Gọi từ trình duyệt

Bạn có thể gọi trực tiếp từ một web app ở bất kỳ origin nào. Đây là API công khai không dùng cookie, nên CORS được mở.

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

Tham số

tênbắt buộcmô tả
textVăn bản hoặc URL cần mã hóa. Các URL dài nên được rút gọn trước.
typewifi · card · event. Gửi thay cho text — máy chủ ghép chuỗi chuẩn từ các trường. Xem mục Loại ở trên.
shapeHình silhouette (mặc định heart). Xem bảng bên dưới.
cellPxSố pixel mỗi ô (3–20, mặc định 8). Giá trị lớn hơn nghĩa là ảnh lớn hơn.
labelMột nhãn được lưu trong metadata. Nó không được vẽ lên ảnh.

Các silhouette và dung lượng

Mỗi silhouette chứa được một lượng khác nhau (byte UTF-8). Dùng square cho nội dung dài; bất kỳ hình nào cũng dùng được cho liên kết ngắn.

shapebytesshapebytes
square1450rose586
round1093clover521
hex861star386
heart854boomerang386

MCP — để AI tạo ra nó

Kết nối nó với một AI client như Claude và nó sẽ tạo mã ngay trong cuộc trò chuyện. Endpoint là https://mcp.wiacode.com/mcp và không cần khóa.

Thiết lập Claude Desktop

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

Nếu client của bạn hỗ trợ trực tiếp Streamable HTTP, chỉ cần cung cấp URL cho nó.

Công cụ

công cụchức năng
get_wia_code_infoGiải thích WIA Code là gì, nó khác gì so với mã QR, và dung lượng của từng silhouette. Gọi cái này trước sẽ giảm bớt lỗi.
generate_wia_codeBiến văn bản thành ảnh mã. Nếu vượt quá dung lượng, nó sẽ cho biết những silhouette nào sẽ vừa.
generate_wia_code_wifiThông tin Wi-Fi — quét là kết nối mà không cần gõ mật khẩu.
generate_wia_code_cardDanh bạ dưới dạng vCard chuẩn — quét xong điện thoại đề nghị lưu vào danh bạ.
generate_wia_code_eventSự kiện dưới dạng iCalendar chuẩn — quét là thêm vào lịch.

Giới hạn miễn phí

Nếu bạn cần thêm — để phát hành hàng loạt, hợp tác hoặc sử dụng thương mại, hãy gửi email cho chúng tôi. Chúng tôi sẽ cấp cho bạn một khóa để nâng giới hạn. 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.

Thêm

Mở trình tạo →

WIA Code là sản phẩm của SmileStory Co., Ltd. QR booster là một hướng dẫn giúp những người không có máy quét chuyên dụng cũng có thể đọc được nó.