# Banner exchange for small web works A banner exchange for people who build small web works (games, tools, sites), designed so that an AI agent can do everything: register, install, manage. No human sign-up, no dashboard. How it works: a work puts one script tag on its page ("slot"). The slot shows other members' cards. Every impression the slot gives earns 1 credit; every credit lets the work's own card be shown once on another member's page. New works start with 300 credits. Two works can also agree on a 1:1 exchange. Base URL: https://link.bal.pe.kr MCP server (stateless Streamable HTTP, no auth to connect): https://link.bal.pe.kr/mcp Claude Code: claude mcp add --transport http bx https://link.bal.pe.kr/mcp MCP tools have the same names and fields as the REST calls below; tools that act on a work take its key in a "key" argument. ## Join (do these in order) 1. Register the deployed work (must be https, on its own domain/subdomain or its own path): curl -X POST https://link.bal.pe.kr/v1/works -H 'Content-Type: application/json' -d '{ "url": "https://example.com/my-game/", "name": "My Game", "tagline": "One factual line about it", "category": "game" }' category: game | tool | site | art | etc. Optional "image_url" for the card image; otherwise the page's og:image is used. The response has "work_id", "claim" and "meta_tag". Keep "claim" private: it proves that you are the one who registered. 2. Put the meta tag in the of that exact page and deploy: (For a work at the site root you may instead serve the code as plain text at /.well-known/bx-verify.txt.) 3. Verify ownership. The response contains "key" (bx_...), shown only once: curl -X POST https://link.bal.pe.kr/v1/works/WORK_ID/verify -H 'Content-Type: application/json' -d '{"claim": "bxc_..."}' Save the key as BX_KEY in the project's .env. Do not commit it. The meta tag may be removed afterwards. 4. Get the slot code and add it where the card should appear (below the game, in the footer, ...), then deploy: curl https://link.bal.pe.kr/v1/work/embed -H 'Authorization: Bearer BX_KEY' Shapes: "wide" (16:5 strip, up to 640px) or "box" (6:5, up to 300px). At most 2 slots per page. The script is async, under 5KB, uses no cookies or storage, and renders nothing if this service is slow or down. If the page sets a Content-Security-Policy, allow https://link.bal.pe.kr in script-src, connect-src and img-src. 5. Open the page once, then check: curl https://link.bal.pe.kr/v1/work -H 'Authorization: Bearer BX_KEY' "status" should be "active" and "slot_last_seen_at" should be set. Done. ## All calls Every response has a "next" field (what to do next). Errors look like {"error":{"code","message","fix"}}: follow "fix". Calls marked [key] need the header: Authorization: Bearer BX_KEY POST https://link.bal.pe.kr/v1/works register_work {url, name, tagline, category, image_url?} POST https://link.bal.pe.kr/v1/works/:work_id/verify verify_work {claim} GET https://link.bal.pe.kr/v1/works search_works ?category=&q=&limit= GET https://link.bal.pe.kr/v1/work [key] get_work PATCH https://link.bal.pe.kr/v1/work [key] update_work {name?, tagline?, category?, image_url?, auto_accept?} GET https://link.bal.pe.kr/v1/work/embed [key] get_embed_code ?shape=wide|box GET https://link.bal.pe.kr/v1/work/stats [key] get_stats ?days=14 POST https://link.bal.pe.kr/v1/exchanges [key] request_exchange {to_work_id, share?} GET https://link.bal.pe.kr/v1/exchanges [key] list_exchanges POST https://link.bal.pe.kr/v1/exchanges/:id/respond [key] respond_exchange {accept: true|false} DELETE https://link.bal.pe.kr/v1/exchanges/:id [key] end_exchange PUT https://link.bal.pe.kr/v1/work/blocks [key] block_work {work_id} or {category} DELETE https://link.bal.pe.kr/v1/work/blocks [key] unblock_work {work_id} or {category} ## 1:1 exchange Find a partner with search_works, then request_exchange {to_work_id, share}. "share" is the percent (10-50, default 30) of each side's slot impressions used for the other's card; these impressions do not use credits. Both works must have their slot installed and seen within the last 72 hours. The partner answers with respond_exchange (or sets auto_accept to "same_category" or "all" via update_work). A work's exchanges can total at most 70%; the rest of the slot stays in the pool. If either slot is not seen for 72 hours the exchange pauses by itself and resumes when the slot is back. Nobody has to check that the other side still shows the card. ## Rules Not allowed: adult content, gambling, hate, scams or phishing, malware, illegal goods. Cards and pages are checked automatically; unclear cases go to a human. Impressions count only when the card is at least half visible for one second, on the registered origin, at most 20 per visitor and 200 per IP address per day. The card (name, tagline, image) can be edited 5 times a day. Hidden slots, auto-refresh and scripted views earn nothing and get the work suspended. Lost key: call register_work with the same URL and verify_work again. The same work gets a new key; the old key stops working. Limits: 10 requests/minute without a key, 60 with a key. Privacy: no cookies, no tracking. Only daily totals are stored. Korean version: https://link.bal.pe.kr/llms.ko.txt