−25%

su Windows con pagamento annuale, fino al 31/10. Vai ai piani

EQVPS
Inizia

Collegare il tuo account

Hai già un account EQVPS e vuoi che lo usi uno script o un agente: prendi un token, mettilo nella configurazione, avvia la prima sandbox e tieni il saldo carico.

Come si incastra tutto

Il tuo accounteqvps.comToken APIBearer …Agente o scriptMCP · REST · SDKEQVPS APIapi.eqvps.comSandboxPython · Node · bashSaldoUSD$ / s
Il token dice chi sei. Ogni richiesta gira sul tuo account e il tempo delle sandbox viene scalato dal tuo saldo.

1. Prendi un token

Il modo più semplice: nella dashboard apri Impostazioni → Token API, crea un token (chiamalo come l’agente, scegli una scadenza) e copialo. Viene mostrato una sola volta.

Da riga di comando: accedi con email e password per ottenere un token nuovo. Se ti sei registrato con un codice via email e non hai mai impostato una password, impostala una volta usando un token della dashboard. Puoi anche creare un account nuovo con POST /auth/register, che restituisce subito un token.

# 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"

Un token vale 1 anno (vedi token_expires_at nella risposta). Prolungalo con POST /auth/token/refresh; revoca nelle Impostazioni quelli che non usi più.

2. Mettilo nella configurazione

Tieni il token fuori dal codice: esportalo come EQVPS_API_KEY. I client MCP lo ricevono nell’header 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. Avvia la prima sandbox

Crea, esegui codice, elimina. Un exit_code diverso da zero è un normale risultato del tuo comando, non un errore 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"

Modalità, tariffe ed esempi in Python / Node.js: Sandbox →

4. Ricarica il saldo

Sandbox e server si pagano con un unico saldo prepagato. Ricaricalo nella dashboard (Saldo: crypto, Monero o codice promo) o con POST /balance/topup, che restituisce un link di pagamento. GET /balance mostra quanto resta.

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

Errori che probabilmente vedrai

  • 401 Unauthenticated — il token manca, ha un refuso, è scaduto o revocato. Controlla l’header Authorization: Bearer, crea un nuovo token nelle Impostazioni o accedi di nuovo.
  • 402 insufficient_balance — il saldo è vuoto, quindi nessuna nuova sandbox può partire. Ricarica e ripeti la richiesta. Le sandbox persistenti in esecuzione vengono messe in pausa, non eliminate.
  • 429 e 503 significano che la richiesta è stata respinta prima di eseguire qualcosa: attendi Retry-After e rimandala. 409 sandbox_paused: ricarica e la sandbox riprende.
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

Commenti

Ancora nessun commento. Sii il primo.

Lascia un commento

I commenti sono moderati prima di comparire.