Developers · API and MCP
Everything the app does with characters and works is an HTTP API with an API key, and the same operations are exposed as a remote MCP server: claude.ai and ChatGPT connectors sign in with OAuth; Claude Code, Cursor and other clients use the key.
開發者 · API 與 MCP
app 對角色與作品做的每件事都有對應的 HTTP API,用 API 金鑰就能呼叫;同一組操作也做成遠端 MCP 伺服器:claude.ai 與 ChatGPT 的連接器用 OAuth 登入,Claude Code、Cursor 等工具用金鑰。
Base URL https://app.openstela.io. Create a key in the app under Account → API keys; it is shown once. Send it as Authorization: Bearer alk_…. A key has the rights of your account except deleting it — revoke it the moment it leaks.
Endpoints under /api/verify, /api/market and /api/public need no key.
Base URL https://app.openstela.io。金鑰在 app 的「帳號 → API 金鑰」建立,只顯示一次;請求帶 Authorization: Bearer alk_…。金鑰等同帳號權限(不能刪帳號),外洩立刻撤銷。
/api/verify、/api/market、/api/public 底下的端點不需要金鑰。
Upload the file (mp3 / m4a / wav / jpg / png / webp / mp4 / webm) or paste a link. The response carries the work with its authorship record and fingerprints; the nightly batch anchors it. Music needs both rights confirmed; AI-assisted work needs human_contribution. Add bind_slug to bind it to one of your characters in the same call.
curl https://app.openstela.io/api/aworks \ -H "Authorization: Bearer alk_…" \ -F "[email protected]" \ -F "title=Midnight Rain" -F "attribution=M. Vale" \ -F "claimed_created_at=2026-09-08" -F "declaration=own" \ -F "music_composition=true" -F "music_recording=true" \ -F "ai_generated=true" -F "tools=Suno" \ -F "human_contribution=wrote the lyrics; chose key, tempo and structure" \ -F "bind_slug=lumen"
From a link — a snapshot of the page (or the oEmbed record for YouTube) is what gets fingerprinted:
curl https://app.openstela.io/api/aworks/link \
-H "Authorization: Bearer alk_…" -H "Content-Type: application/json" \
-d '{"url":"https://youtu.be/…","declaration":"own","attribution":"M. Vale"}'
Bind later instead:
curl -X POST https://app.openstela.io/api/aworks/54b9cdf3/bind \
-H "Authorization: Bearer alk_…" -H "Content-Type: application/json" \
-d '{"slug":"lumen"}'
上傳檔案(mp3/m4a/wav/jpg/png/webp/mp4/webm)或貼連結。回應帶著作紀錄與指紋;當晚批次上鏈。音樂要確認詞曲與錄音兩項權利;AI 輔助作品要填 human_contribution。加 bind_slug 可以同一次呼叫就綁到你的角色。
curl https://app.openstela.io/api/aworks \ -H "Authorization: Bearer alk_…" \ -F "[email protected]" \ -F "title=Midnight Rain" -F "attribution=M. Vale" \ -F "claimed_created_at=2026-09-08" -F "declaration=own" \ -F "music_composition=true" -F "music_recording=true" \ -F "ai_generated=true" -F "tools=Suno" \ -F "human_contribution=wrote the lyrics; chose key, tempo and structure" \ -F "bind_slug=lumen"
貼連結——被算指紋的是頁面快照(YouTube 走 oEmbed 紀錄):
curl https://app.openstela.io/api/aworks/link \
-H "Authorization: Bearer alk_…" -H "Content-Type: application/json" \
-d '{"url":"https://youtu.be/…","declaration":"own","attribution":"M. Vale"}'
之後再綁:
curl -X POST https://app.openstela.io/api/aworks/54b9cdf3/bind \
-H "Authorization: Bearer alk_…" -H "Content-Type: application/json" \
-d '{"slug":"lumen"}'
Five calls. The ID is public on the market by default as “not for sale”; use PATCH /api/packs/{slug}/listing to mark it private or to put a price on it.
# 1 create · 2 upload 1–4 pictures (drafts the spec) · 3 confirm · 4 finalize · 5 issue the ID
curl -X POST https://app.openstela.io/api/packs -H "Authorization: Bearer alk_…" \
-H "Content-Type: application/json" \
-d '{"slug":"lumen","name":"Lumen","char_type":"non_human","one_line":"a lantern spirit"}'
curl -X POST https://app.openstela.io/api/packs/lumen/import -H "Authorization: Bearer alk_…" \
-F "[email protected]" -F "[email protected]"
curl -X POST https://app.openstela.io/api/packs/lumen/import/confirm -H "Authorization: Bearer alk_…" \
-H "Content-Type: application/json" -d '{}'
curl -X POST https://app.openstela.io/api/packs/lumen/finalize -H "Authorization: Bearer alk_…"
curl -X POST https://app.openstela.io/api/packs/lumen/identity -H "Authorization: Bearer alk_…"
五個呼叫。發證後預設公開在市集、標「未上架」;用 PATCH /api/packs/{slug}/listing 標不公開或加價格。
# 1 create · 2 upload 1–4 pictures (drafts the spec) · 3 confirm · 4 finalize · 5 issue the ID
curl -X POST https://app.openstela.io/api/packs -H "Authorization: Bearer alk_…" \
-H "Content-Type: application/json" \
-d '{"slug":"lumen","name":"Lumen","char_type":"non_human","one_line":"a lantern spirit"}'
curl -X POST https://app.openstela.io/api/packs/lumen/import -H "Authorization: Bearer alk_…" \
-F "[email protected]" -F "[email protected]"
curl -X POST https://app.openstela.io/api/packs/lumen/import/confirm -H "Authorization: Bearer alk_…" \
-H "Content-Type: application/json" -d '{}'
curl -X POST https://app.openstela.io/api/packs/lumen/finalize -H "Authorization: Bearer alk_…"
curl -X POST https://app.openstela.io/api/packs/lumen/identity -H "Authorization: Bearer alk_…"
Any fingerprint — a spec version, an authorship record, a binding, an evidence record, a contract — can be checked without a key. The answer separates registered, anchored and verified on chain; only the last one needs no trust in us.
curl https://app.openstela.io/api/verify/<sha256>
The Proof Pack is a zip with a PDF for people and record.json for machines, including the Merkle proof for every anchored leaf:
curl -OJ https://app.openstela.io/api/aworks/54b9cdf3/proof-pack.zip \ -H "Authorization: Bearer alk_…"
The market lists public characters and works; anything without a price is “not for sale, contact the holder”:
curl https://app.openstela.io/api/market/list
任何指紋——規格版本、著作紀錄、綁定、佐證、契約——都能免金鑰查驗。回應把「已登記」「已上鏈」「鏈上核對通過」分開,只有最後一層不需要相信我們。
curl https://app.openstela.io/api/verify/<sha256>
存證包是一個 zip:PDF 給人看、record.json 給機器算,內含每片已上鏈葉子的 Merkle 證明:
curl -OJ https://app.openstela.io/api/aworks/54b9cdf3/proof-pack.zip \ -H "Authorization: Bearer alk_…"
市集列出公開的角色與作品;沒標價的就是「未上架,有興趣請聯繫」:
curl https://app.openstela.io/api/market/list
Nothing to install. Point any MCP client at https://app.openstela.io/mcp with the same key in an Authorization header. Twelve tools: list characters and works, get a work with its record and proofs, register a work (URL or base64 file), bind, public switch, get a character, public character, public work, verify, search the market, and read a creator account (YouTube channel / Civitai user page) to register its works one by one.
claude mcp add --transport http openstela https://app.openstela.io/mcp \ --header "Authorization: Bearer alk_…"
Cursor / Windsurf / other clients:
{"mcpServers": {"openstela": {"url": "https://app.openstela.io/mcp",
"headers": {"Authorization": "Bearer alk_…"}}}}
claude.ai and ChatGPT connectors: no key needed. Add a custom connector with the URL https://app.openstela.io/mcp; you are sent to OpenStela to sign in and approve, and the access shows up under Account → API keys where you can revoke it. (OAuth 2.1 with PKCE and dynamic client registration; discovery at /.well-known/oauth-authorization-server.)
Deliberately absent: delete, deal signing, payment, issuing IDs. Tools that a model calls on its own must not spend money or do anything irreversible; those actions stay in the app, behind a person's click.
不用安裝。任何 MCP 客戶端指向 https://app.openstela.io/mcp,同一把金鑰放在 Authorization 標頭。12 個工具:列角色與作品、看一件作品連紀錄與證明、登記作品(連結或 base64 檔案)、綁定、公開開關、看自己的角色、看公開角色、看公開作品、查驗、搜市集、讀取創作者帳號(YouTube 頻道/Civitai 使用者頁)再逐件登記。
claude mcp add --transport http openstela https://app.openstela.io/mcp \ --header "Authorization: Bearer alk_…"
Cursor/Windsurf/其他客戶端:
{"mcpServers": {"openstela": {"url": "https://app.openstela.io/mcp",
"headers": {"Authorization": "Bearer alk_…"}}}}
claude.ai 與 ChatGPT 的連接器:不用金鑰。新增自訂連接器、貼上 https://app.openstela.io/mcp,會被帶到 OpenStela 登入並按「允許」;這個存取會出現在「帳號 → API 金鑰」,隨時可撤。(OAuth 2.1,PKCE+動態客戶端註冊;探索端點 /.well-known/oauth-authorization-server。)
刻意沒有:刪除、交易簽署、付款、發證。模型主動呼叫的工具不能花錢、不能做不可逆的事;那些留在 app 裡,由人按。
{"detail": …} with the usual status codes; 423 means the character is locked by a pending deal.{"detail": …} 配一般狀態碼;423 表示角色正被進行中的交易鎖定。