계정 연결
이미 EQVPS 계정이 있고 스크립트나 에이전트가 그 계정을 쓰게 하고 싶다면: 토큰을 받아 설정에 넣고, 첫 샌드박스를 실행하고, 잔액을 채워 두세요.
전체 흐름
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. 잔액 충전
샌드박스와 서버는 하나의 선불 잔액으로 결제됩니다. 대시보드(잔액: 암호화폐, 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
댓글
아직 댓글이 없습니다. 첫 번째가 되세요.