Persistent hosting
Deploy a Docker image as a persistent service with a live HTTPS URL — for the apps and APIs your agents build that need to stay up (unlike ephemeral preview URLs, which live and die with a sandbox).
Deploy
From the dashboard: Deploy → Deploy a service. Give it a name, a Docker image, and the port it listens on.
Over the REST API:
bash
curl -X POST https://api.ai2in.dev/v1/hosting/services \
-H "Authorization: Bearer ai2in_live_…" \
-H "Content-Type: application/json" \
-d '{"name": "hello", "image": "nginxdemos/hello", "internal_port": 80}'Response:
json
{ "subdomain": "hello", "url": "https://hello.up.ai2in.dev", "status": "live" }Manage
| Action | Endpoint |
|---|---|
| Logs | POST /v1/hosting/services/:id/logs |
| Redeploy | POST /v1/hosting/services/:id/redeploy |
| Stop | POST /v1/hosting/services/:id/stop |
| Delete | DELETE /v1/hosting/services/:id |
How it differs from sandboxes
| Sandbox | Hosted service | |
|---|---|---|
| Lifetime | ephemeral, idle-reaped | persistent, restarts on crash |
| URL | per-port preview | stable <name>.up.ai2in.dev |
| Use | run agent code | ship the result |
Environment variables and a custom start command are supported via env and start_cmd in the deploy body.