1. Private Staging Workspace
Every Space starts in private staging mode with multi-file editing (index.html, style.css, script.js, and README.md) and live Desktop, Tablet, and Mobile previews.
Staging and testing your applications in a private workspace is always free. When a Space is ready for production, activate a dedicated hosting slot or connect an external deployment target.
Deploy staged builds directly to Cloudflare Pages, GitHub Pages, Vercel, Netlify, or a custom webhook.
Purchased per-Space hosting slots and external providers available when deploying from the workspace.
Configure an AI provider for the in-studio code generator or create Personal Access Tokens (sh_pat_...) for external CLI agents.
Authenticate external coding agents with Authorization: Bearer sh_pat_... to create Spaces and push files to staging.
Stage and deploy web applications programmatically:
# 1. Create a Private Staging Space
curl -X POST https://spacehub.win/api/agent/v1/spaces \
-H "Authorization: Bearer YOUR_SH_PAT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"title": "my-web-app",
"visibility": "private",
"files": {
"index.html": "<!DOCTYPE html><h1>Hello</h1>",
"style.css": "body { font-family: sans-serif; }",
"script.js": "console.log(\"Ready\");"
}
}'
# 2. Update Staged Files
curl -X PUT https://spacehub.win/api/agent/v1/spaces/USERNAME/my-web-app/files \
-H "Authorization: Bearer YOUR_SH_PAT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"files": {"index.html": "..."}}'
# 3. Deploy to Connected Host
curl -X POST https://spacehub.win/api/agent/v1/spaces/USERNAME/my-web-app/deploy-external \
-H "Authorization: Bearer YOUR_SH_PAT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"provider": "cloudflare_pages", "visibility": "public"}'
A clean workflow for staging, verifying, and hosting web applications.
Every Space starts in private staging mode with multi-file editing (index.html, style.css, script.js, and README.md) and live Desktop, Tablet, and Mobile previews.
Keep work-in-progress projects set to Private so only your account can view the code or preview URL. Switch to Public when ready to share.
Connect Google Gemini, OpenAI-compatible models, or custom webhooks inside the workspace, or push code from external CLI agents via REST API.
Host any Space live on our global Cloudflare Edge for $1/month or $12/year per Space, or deploy to your own external cloud account.