{"openapi":"3.1.0","info":{"title":"NestForge API","summary":"Hourly Linux VPS for AI agents, paid in USDC via x402. No account needed.","description":"**NestForge** sells small Linux VPS (Incus/LXC system containers) by the hour to AI agents and developers.\nThere is no account: a valid [x402](https://x402.org) payment in USDC is the signup, and the returned\n`access_token` is the only credential.\n\n**Flow:** `GET /v1/plans` -> `POST /v1/instances` (402 with an x402 v2 quote) -> sign `accepts[0]` and retry\nwith `PAYMENT-SIGNATURE` -> 201 + `access_token` -> poll `GET /v1/instances/{id}` until `running` -> `ssh`.\n\nAlso available as an MCP server at `https://mcp.nestforge.cloud/mcp`. Docs: https://nestforge.cloud/docs ·\nLLM summary: https://nestforge.cloud/llms.txt\n","termsOfService":"https://nestforge.cloud/terms","contact":{"name":"NestForge","url":"https://nestforge.cloud/","email":"support@nestforge.cloud"},"version":"0.2.0"},"servers":[{"url":"https://nestforge.cloud","description":"Production"},{"url":"https://api.nestforge.cloud","description":"Production (API host)"}],"paths":{"/healthz":{"get":{"tags":["meta"],"summary":"Liveness check","operationId":"healthz_healthz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/plans":{"get":{"tags":["plans"],"summary":"List plans, prices and payment network","description":"Public. Plans with vCPU/RAM/disk and hourly USD price (charged in USDC), available images, the x402 payment network/asset, and current capacity.","operationId":"list_plans_v1_plans_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/instances":{"post":{"tags":["instances"],"summary":"Create (buy) a VPS","description":"Paid with x402. Without payment returns 402 with the exact price for `hours` x plan. Retry with PAYMENT-SIGNATURE to get 201 with `id`, `access_token` (only credential, keep it) and `ssh_port`; poll GET until status=running. Pass an existing `Authorization: Bearer <token>` to group several VPS under one token.","operationId":"create_instance_v1_instances_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-admin-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInstance"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"402":{"description":"x402 Payment Required: body is an x402 v2 PaymentRequired (also base64 in the PAYMENT-REQUIRED header). Sign accepts[0] and retry with PAYMENT-SIGNATURE."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-payment-info":{"protocol":"x402","x402Version":2,"scheme":"exact","asset":"USDC","pricing":"hours x plan.price_usd_per_hour, see GET /v1/plans","headers":{"request":"PAYMENT-SIGNATURE","challenge":"PAYMENT-REQUIRED","receipt":"PAYMENT-RESPONSE"}}},"get":{"tags":["instances"],"summary":"List your active VPS","description":"Requires `Authorization: Bearer <access_token>`.","operationId":"list_instances_v1_instances_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-admin-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/instances/{iid}":{"get":{"tags":["instances"],"summary":"Get a VPS","description":"Status (provisioning|running|stopped|error|deleted|expired), ssh command, IPs and expiry. 404 for unknown ids and for tokens that do not own the VPS.","operationId":"get_instance_v1_instances__iid__get","parameters":[{"name":"iid","in":"path","required":true,"schema":{"type":"string","title":"Iid"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-admin-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["instances"],"summary":"Delete a VPS now","description":"Destroys the VPS and its disk. Unused prepaid time is not refunded. Idempotent.","operationId":"delete_instance_v1_instances__iid__delete","parameters":[{"name":"iid","in":"path","required":true,"schema":{"type":"string","title":"Iid"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-admin-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/instances/{iid}/stop":{"post":{"tags":["power"],"summary":"Stop (power off) a VPS","description":"Power off (billing time keeps running until expiry).","operationId":"stop_instance_v1_instances__iid__stop_post","parameters":[{"name":"iid","in":"path","required":true,"schema":{"type":"string","title":"Iid"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-admin-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/instances/{iid}/start":{"post":{"tags":["power"],"summary":"Start a stopped VPS","operationId":"start_instance_v1_instances__iid__start_post","parameters":[{"name":"iid","in":"path","required":true,"schema":{"type":"string","title":"Iid"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-admin-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/instances/{iid}/reboot":{"post":{"tags":["power"],"summary":"Reboot a VPS","operationId":"reboot_instance_v1_instances__iid__reboot_post","parameters":[{"name":"iid","in":"path","required":true,"schema":{"type":"string","title":"Iid"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-admin-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/instances/{iid}/extend":{"post":{"tags":["instances"],"summary":"Extend a VPS (add paid hours)","description":"Paid with x402. Anyone holding the id may pay. Adds `hours` to the current expiry.","operationId":"extend_instance_v1_instances__iid__extend_post","parameters":[{"name":"iid","in":"path","required":true,"schema":{"type":"string","title":"Iid"}},{"name":"x-admin-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtendInstance"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"402":{"description":"x402 Payment Required: body is an x402 v2 PaymentRequired (also base64 in the PAYMENT-REQUIRED header). Sign accepts[0] and retry with PAYMENT-SIGNATURE."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-payment-info":{"protocol":"x402","x402Version":2,"scheme":"exact","asset":"USDC","pricing":"hours x plan.price_usd_per_hour, see GET /v1/plans","headers":{"request":"PAYMENT-SIGNATURE","challenge":"PAYMENT-REQUIRED","receipt":"PAYMENT-RESPONSE"}}}},"/v1/auth/challenge":{"post":{"tags":["auth"],"summary":"Get a Sign-In with Ethereum message","description":"Web dashboard sign-in step 1. Returns an EIP-4361 message bound to this host, the address and a one-time nonce (valid 5 minutes). Sign it with `personal_sign`.","operationId":"auth_challenge_v1_auth_challenge_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthChallenge"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/verify":{"post":{"tags":["auth"],"summary":"Verify a signed SIWE message and start a session","description":"Web dashboard sign-in step 2. On success sets an httpOnly `nf_session` cookie (7 days).","operationId":"auth_verify_v1_auth_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthVerify"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/token":{"post":{"tags":["auth"],"summary":"Sign in to the dashboard with an access_token","description":"For VPS bought over the API/MCP: exchanges an `access_token` for a web session that can see and control the VPS created with it.","operationId":"auth_token_v1_auth_token_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenLogin"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/me":{"get":{"tags":["auth"],"summary":"Current web session","operationId":"auth_me_v1_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/auth/logout":{"post":{"tags":["auth"],"summary":"End the web session","operationId":"auth_logout_v1_auth_logout_post","parameters":[{"name":"nf_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nf Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/claim":{"post":{"tags":["auth"],"summary":"Link API-bought VPS to your wallet","description":"Signed in with a wallet: moves every active VPS created with `access_token` under your wallet so it shows in the dashboard. The access_token keeps working.","operationId":"auth_claim_v1_auth_claim_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenLogin"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AuthChallenge":{"properties":{"address":{"type":"string","title":"Address","examples":["0x1111111111111111111111111111111111111111"]}},"type":"object","required":["address"],"title":"AuthChallenge"},"AuthVerify":{"properties":{"message":{"type":"string","maxLength":2000,"title":"Message"},"signature":{"type":"string","maxLength":200,"title":"Signature"}},"type":"object","required":["message","signature"],"title":"AuthVerify"},"CreateInstance":{"properties":{"plan":{"type":"string","title":"Plan","examples":["nano"]},"image":{"type":"string","title":"Image","default":"debian-12","examples":["debian-12","ubuntu-24.04"]},"ssh_public_key":{"type":"string","title":"Ssh Public Key"},"hours":{"type":"integer","minimum":1.0,"title":"Hours","default":1}},"type":"object","required":["plan","ssh_public_key"],"title":"CreateInstance"},"ExtendInstance":{"properties":{"hours":{"type":"integer","minimum":1.0,"title":"Hours"}},"type":"object","required":["hours"],"title":"ExtendInstance"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"TokenLogin":{"properties":{"access_token":{"type":"string","maxLength":200,"title":"Access Token"}},"type":"object","required":["access_token"],"title":"TokenLogin"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"tags":[{"name":"plans","description":"Public catalog and prices."},{"name":"instances","description":"Buy, inspect, extend and delete VPS. Paid routes use x402."},{"name":"power","description":"Stop, start and reboot (Bearer access_token)."},{"name":"auth","description":"Web dashboard sign-in: Sign-In with Ethereum or an access_token (httpOnly cookie)."},{"name":"meta","description":"Health."}]}