−25%

Windows 年払い、10月31日まで。 プランを見る

EQVPS
始める

アカウントの接続

すでに EQVPS アカウントがあり、スクリプトやエージェントに使わせたい場合:トークンを取得し、設定に入れ、最初のサンドボックスを起動し、残高を切らさないようにします。

全体のつながり

あなたのアカウントeqvps.comAPI トークンBearer …エージェント / スクリプトMCP · REST · SDKEQVPS APIapi.eqvps.comサンドボックスPython · Node · bash残高USD$ / s
トークンはあなたが誰かを示します。すべてのリクエストはあなたのアカウントで実行され、サンドボックスの利用時間は残高から差し引かれます。

1. トークンを取得する

いちばん簡単なのは、ダッシュボードの 設定 → API トークン でトークンを作成(エージェント名を付け、有効期限を選択)してコピーする方法です。表示されるのは一度だけです。

コマンドラインから:メールアドレスとパスワードでログインすると新しいトークンが得られます。メールのコードで登録してパスワードを設定していない場合は、ダッシュボードのトークンを使って一度だけ設定してください。POST /auth/register で新規アカウントを作ることもでき、すぐにトークンが返ります。

# log in with email + password → token
curl -s https://api.eqvps.com/api/v1/eqvps/auth/login \
  -H "Content-Type: application/json" \
  -d '{"email":"you@example.com","password":"your-password"}'
# → {"token":"eyJ0…","token_type":"Bearer","token_expires_at":"2027-10-03T…","user":{…}}

# signed up with an email code and have no password? set one once
# (authorise with a token from Settings → API tokens)
curl -s https://api.eqvps.com/api/v1/eqvps/auth/set-password \
  -H "Authorization: Bearer $EQVPS_API_KEY" -H "Content-Type: application/json" \
  -d '{"password":"new-pass-123","password_confirmation":"new-pass-123"}'

# no account yet: register straight from the API (password is optional)
curl -s https://api.eqvps.com/api/v1/eqvps/auth/register \
  -H "Content-Type: application/json" -d '{"email":"you@example.com"}'

# extend a token before it expires
curl -s -X POST https://api.eqvps.com/api/v1/eqvps/auth/token/refresh \
  -H "Authorization: Bearer $EQVPS_API_KEY"

トークンの有効期間は 1 年です(レスポンスの token_expires_at を参照)。POST /auth/token/refresh で延長でき、使わなくなったものは設定で失効させてください。

2. 設定に入れる

トークンはコードに書かず、EQVPS_API_KEY として export します。MCP クライアントには Authorization ヘッダーで渡します。

# shell / CI secret — keep it out of the code
export EQVPS_API_KEY="eyJ0…"

# SDKs read the same variable (0.2.0+: give your code its secrets as env, not in the source)
pip install -U eqvps         # Python
npm i @eqvps/sdk@latest      # TypeScript / JavaScript

# Claude Code
claude mcp add --transport http eqvps https://mcp.eqvps.com/mcp \
  --header "Authorization: Bearer $EQVPS_API_KEY"

# Cursor, Claude Desktop, other MCP clients (mcp.json)
{
  "mcpServers": {
    "eqvps": {
      "type": "streamable-http",
      "url": "https://mcp.eqvps.com/mcp",
      "headers": { "Authorization": "Bearer <YOUR_TOKEN>" }
    }
  }
}

3. 最初のサンドボックスを起動する

作成、コード実行、削除。0 以外の exit_code はコマンドの通常の結果で、HTTP エラーではありません。

API=https://api.eqvps.com/api/v1/eqvps
H="Authorization: Bearer $EQVPS_API_KEY"

SB=$(curl -s -X POST $API/sandboxes -H "$H" -H "Content-Type: application/json" \
  -d '{"tariff":"micro"}' | python3 -c 'import sys,json; print(json.load(sys.stdin)["id"])')

curl -s -X POST $API/sandboxes/$SB/run -H "$H" -H "Content-Type: application/json" \
  -d '{"language":"bash","code":"uname -sr && python3 --version && node --version"}'
# → {"exit_code":0,"stdout":"Linux 6.1…\nPython 3.12…\nv22…\n","stderr":"",…}

curl -s -X DELETE $API/sandboxes/$SB -H "$H"

モード、料金プラン、Python / Node.js の例:サンドボックス →

4. 残高をチャージする

サンドボックスとサーバーは 1 つの前払い残高から支払われます。ダッシュボード(残高:暗号資産、Monero、プロモコード)または支払いリンクを返す POST /balance/topup でチャージできます。残りは GET /balance で確認できます。

curl -s $API/balance -H "$H"
# → {"balance":12.4,"currency":"USD","promo_balance":0,"real_balance":12.4,"promo_scope":"sandboxes"}

curl -s -X POST $API/balance/topup -H "$H" -H "Content-Type: application/json" -d '{"amount":10}'
# → {"invoice_id":…,"checkout_url":"https://…"}   open the link and pay with crypto

よく出会うエラー

  • 401 Unauthenticated — トークンがない、打ち間違い、期限切れ、または失効しています。Authorization: Bearer ヘッダーを確認し、設定で新しいトークンを作るか、もう一度ログインしてください。
  • 402 insufficient_balance — 残高がないため新しいサンドボックスを起動できません。チャージしてからリクエストをやり直してください。稼働中のパーシステントは削除されず一時停止されます。
  • 429 と 503 は、何も実行される前にリクエストが拒否されたという意味です。Retry-After だけ待ってから再送してください。409 sandbox_paused:チャージすればサンドボックスは再開します。
HTTP 401  {"message":"Unauthenticated."}
HTTP 402  {"error":"insufficient_balance","message":"Your balance cannot cover this sandbox. Top up (topup_balance / POST /balance/topup) and retry."}
HTTP 429  {"error":"too_many_concurrent", …}      → wait Retry-After, then retry
HTTP 503  {"error":"capacity","retry_after":30, …} → wait Retry-After, then retry

コメント

まだコメントはありません。最初になりましょう。

コメントを残す

コメントは表示される前にモデレートされます。