面向AI Agent的托管,从第一天起就为Agent而建。
MCP · REST v1 · API
注册、创建密钥,然后测试访问。无需充值。
付款前即可创建 API 密钥。
注册、创建密钥,然后测试访问。无需充值。
cURL
使用注册或登录时获得的访问令牌创建具有指定权限的 API 密钥。密钥仅以明文返回一次。
# bash + curl + jq
# Set NB_EMAIL and NB_PASSWORD in your environment.
set -eu
: "${NB_EMAIL:?Set NB_EMAIL}" "${NB_PASSWORD:?Set NB_PASSWORD}"
API=https://nordbastion.com/v1
TOKEN=$(jq -n '{email:env.NB_EMAIL,password:env.NB_PASSWORD}' |
curl --fail-with-body -sS "$API/auth/register" \
-H 'Content-Type: application/json' --data-binary @- |
jq -er '.tokens.access_token')
KEY=$(curl --fail-with-body -sS "$API/auth/api-keys" \
-H "Authorization: Bearer $TOKEN" \
-H 'Content-Type: application/json' \
-d '{"name":"agent-read","scope":"read"}' |
jq -er '.plaintext')
curl --fail-with-body -sS "$API/account/balance" \
-H "Authorization: Bearer $KEY"
# Store KEY in your secret store. Do not print it.
unset TOKEN KEY
Python
付款前即可创建 API 密钥。
import os
import requests
api = "https://nordbastion.com/v1"
with requests.Session() as client:
signup = client.post(api + "/auth/register", json={
"email": os.environ["NB_EMAIL"],
"password": os.environ["NB_PASSWORD"],
}, timeout=30)
signup.raise_for_status()
token = signup.json()["tokens"]["access_token"]
created = client.post(api + "/auth/api-keys",
headers={"Authorization": f"Bearer {token}"},
json={"name": "agent-read", "scope": "read"},
timeout=30)
created.raise_for_status()
key = created.json()["plaintext"]
# Store key in your secret store; never log it.
balance = client.get(api + "/account/balance",
headers={"Authorization": f"Bearer {key}"},
timeout=30)
balance.raise_for_status()
print(balance.json())
API 密钥访问与付款无关。每个账户最多可有 10 个有效密钥;请撤销不再使用的密钥。
兼容性与版本
托管 MCP 端点在此更新。按版本提供的 stdio 下载包含源代码和 SHA-256 校验和。
托管 MCP
https://nordbastion.com/mcp
- 版本
- 1.1.0
- 协议版本
- 2026-07-28 · 2025-11-25 · 2025-06-18 · 2025-03-26
- 最近验证
- 2026-09-15
在 Authorization 请求头中发送凭据;如果 MCP 客户端无法设置请求头,请使用 access_token 参数。
暂不提供浏览器 OAuth 授权。请使用 Bearer 令牌或显式 access_token 参数。
MCP · register_account → create_api_key
{"name":"register_account","arguments":{
"email":"agent@example.com",
"password":"YOUR_STRONG_PASSWORD"
}}
{"name":"create_api_key","arguments":{
"name":"agent-read",
"scope":"read",
"access_token":"ACCESS_TOKEN_FROM_SIGNUP"
}}
{"name":"get_balance","arguments":{
"access_token":"PLAINTEXT_FROM_CREATE_API_KEY"
}}
在本地生成 SSH 密钥。仅上传公钥,将私钥保留在自己的设备上。
ssh-keygen -t ed25519 -f ~/.ssh/nordbastion_agent
# add_ssh_key: public_key = contents of the .pub file
支付方式
充值前先浏览并测试。只有付费服务需要加密货币充值。
POST /v1/billing/topups · {"amount_usd":50,"crypto":"XMR"} · USD 30–10,000
x402 可通过充值端点处理 Base 网络上的 USDC 签名付款。下单前请等待余额确认到账。
x402: POST /v1/billing/topups · X-Payment-Mode: x402 · {"amount_usd":50}
速率限制
API key: 120 / min · 3,000 / hour · public: 30 / min · HTTP 429 + Retry-After
账户活动会记录在 API 审计日志中。凭据和请求正文不会写入该日志。
获取 API 密钥