Hoody API
Section titled “Hoody API”The Hoody API is your control plane. It’s how you create, configure, and orchestrate your infinite computers.
After reading The Vision, you understand Hoody’s philosophy. Now you need to understand how to actually use it. The Hoody API is where everything begins.
API Endpoints Summary
Section titled “API Endpoints Summary”Official Technical Reference:
This Foundation page explains HOW the Hoody API works. For complete endpoint documentation, parameters, and responses:
Core Management:
- Authentication - Login, tokens, user sessions
- Auth Tokens - Long-lived automation credentials
- Users - Profile management
- Projects - Project CRUD operations
- Containers - Container lifecycle management
Networking & Security:
- Realms - API-level isolation
- Container Network - Proxy/VPN routing
- Container Firewall - Ingress/egress rules
Proxy & Routing:
- Proxy Aliases - Custom domain configuration
- Proxy Permissions - Access control
Data & State:
- Container Snapshots - State management
- Container Copy & Sync - Duplication
- Storage Shares - Shared directories
- Container Images - OS images
Two APIs, Two Purposes
Section titled “Two APIs, Two Purposes”Critical distinction: Hoody has TWO separate HTTP systems:
Hoody API (Platform Management)
https://api.hoody.icuWhat it controls:
- ✅ User authentication
- ✅ Project creation
- ✅ Container spawning
- ✅ Network configuration
- ✅ Firewall rules
- ✅ Proxy aliases
- ✅ Snapshots
- ✅ Billing
Mental model: “The dashboard API”
Container Services (Hoody Kit)
https://{project}-{container}-terminal-1.node-us.containers.hoody.icuhttps://{project}-{container}-display-1.node-us.containers.hoody.icuhttps://{project}-{container}-files.node-us.containers.hoody.icuWhat they provide:
- ✅ Terminal execution
- ✅ Desktop access
- ✅ File operations
- ✅ Database queries
- ✅ Browser automation
- ✅ Script execution
- ✅ +12 more services
Mental model: “The actual computers”
The workflow:
- Use Hoody API to spawn a container
- Container gets URLs for all its services automatically
- Use those URLs to work with the container
The Hoody API creates the infrastructure. The container URLs ARE the infrastructure.
What the Hoody API Does
Section titled “What the Hoody API Does”Think of it as the factory that builds your infinite computers:
1. Authentication & Users
Section titled “1. Authentication & Users”Manage your account and create access credentials:
# Login as a userhoody auth login --username your_username --password your_password
# Create long-lived API token for automationhoody auth create --alias "my-automation-token" --expires-at "2027-04-12T00:00:00Z"
# Get current user profilehoody auth profile currentimport { HoodyClient } from '@hoody-ai/hoody-sdk';
const client = new HoodyClient({ baseURL: 'https://api.hoody.icu', token: process.env.HOODY_TOKEN });
// Get current user profileconst me = await client.api.authentication.getCurrentUser();console.log(me.data);
// Create long-lived API tokenconst token = await client.api.authTokens.create({ alias: 'my-automation-token', expires_at: '2027-04-12T00:00:00Z'});# Login as a usercurl -X POST "https://api.hoody.icu/api/v1/users/auth/login" \ -H "Content-Type: application/json" \ -d '{"username": "your_username", "password": "your_password"}'
# Create long-lived API token for automationcurl -X POST "https://api.hoody.icu/api/v1/auth/tokens" \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{"alias": "my-automation-token", "expires_at": "2027-04-12T00:00:00Z"}'
# Get current user profilecurl "https://api.hoody.icu/api/v1/users/auth/me" \ -H "Authorization: Bearer $TOKEN"See: Authentication → | API Reference →
2. Projects (Organization)
Section titled “2. Projects (Organization)”Create folders to organize your containers:
# Create a projecthoody projects create --alias "my-project"
# List your projectshoody projects list// Create a projectconst project = await client.api.projects.create({ alias: 'my-project' });
// List your projectsconst projects = await client.api.projects.list();# Create a projectcurl -X POST "https://api.hoody.icu/api/v1/projects/" \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{"alias": "my-project"}'
# List your projectscurl "https://api.hoody.icu/api/v1/projects" \ -H "Authorization: Bearer $TOKEN"See: Projects & Containers → | API Reference →
3. Containers (Spawn Computers)
Section titled “3. Containers (Spawn Computers)”Create isolated computers with full capabilities:
# Spawn a container in a projecthoody containers create --project $PROJECT_ID --server-id $SERVER_ID --name "dev-env"
# Container URLs are automatically constructed:# https://{project_id}-{container_id}-terminal-1.{server_name}.containers.hoody.icu# https://{project_id}-{container_id}-display-1.{server_name}.containers.hoody.icu# ... plus files, exec, workspaces, sqlite, cron, pipe, notifications, browser, code, daemon, tunnel, ssh, proxy, and dynamic http/https ports// Spawn a container in a projectconst container = await client.api.containers.create( projectId, { name: 'dev-env', server_id: serverId, hoody_kit: true, dev_kit: true });
// Container URLs are automatically availableconsole.log(container.data);# Spawn a container in a projectcurl -X POST "https://api.hoody.icu/api/v1/projects/$PROJECT_ID/containers" \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{"name": "dev-env", "server_id": "'$SERVER_ID'", "hoody_kit": true, "dev_kit": true}'
# Response includes container_id and server details# Container URLs are automatically constructed:# https://{project_id}-{container_id}-terminal-1.{server_name}.containers.hoody.icu# https://{project_id}-{container_id}-display-1.{server_name}.containers.hoody.icu# ... plus files, exec, workspaces, sqlite, cron, pipe, notifications, browser, code, daemon, tunnel, ssh, proxy, and dynamic http/https portsWithin 30 seconds: Container is running with all HTTP services live.
See: Container Lifecycle → | API Reference →
4. Networking & Security
Section titled “4. Networking & Security”Configure how containers connect and communicate:
# Configure firewall rulesPOST https://api.hoody.icu/api/v1/containers/{id}/firewall/ingress
# Route traffic through proxies/VPNsPATCH https://api.hoody.icu/api/v1/containers/{id}/network
# Add an outbound firewall rulePOST https://api.hoody.icu/api/v1/containers/{id}/firewall/egressSee: Networking → | Firewall →
5. Proxy Configuration
Section titled “5. Proxy Configuration”Make containers accessible with clean URLs:
# Create custom alias: my-app.$serverName.containers.hoody.icuPOST https://api.hoody.icu/api/v1/proxy/aliases
# Configure permissionsPATCH https://api.hoody.icu/api/v1/containers/{id}/proxy/permissionsSee: Hoody Proxy → | Aliases →
6. Storage & Snapshots
Section titled “6. Storage & Snapshots”Manage persistent data and state:
# Snapshot a container (capture complete state)POST https://api.hoody.icu/api/v1/containers/{id}/snapshots
# Share directories between containersPOST https://api.hoody.icu/api/v1/containers/{id}/storage/sharesSee: Snapshots → | Storage Shares →
7. Infrastructure Management
Section titled “7. Infrastructure Management”Control servers and resources:
# List your active server rentalsGET https://api.hoody.icu/api/v1/rentals
# Manage container imagesGET https://api.hoody.icu/api/v1/images/publicThe HTTP-First Design
Section titled “The HTTP-First Design”The Hoody API is pure REST. This matters because:
AI Understands It Immediately
Section titled “AI Understands It Immediately”LLMs were trained on HTTP. They know how to:
- Construct JSON payloads
- Make authenticated requests
- Parse responses
- Handle errors
No SDK needed. AI can orchestrate your entire infrastructure through HTTP:
// AI generates this WITHOUT special trainingconst workflow = [ { description: "Create project for client", call: "POST https://api.hoody.icu/api/v1/projects/", body: { alias: "client-acme", color: "#3498db" } }, { description: "Spawn 3 containers: frontend, backend, database", call: "POST https://api.hoody.icu/api/v1/projects/{project_id}/containers", repeat: 3, body: { server_id: "...", hoody_kit: true, dev_kit: true } }, { description: "Configure firewall for database", call: "POST https://api.hoody.icu/api/v1/containers/{db_id}/firewall/ingress", body: { action: "allow", protocol: "tcp", destination_port: "5432", source: "{backend_ip}" } }];
// AI executes via HTTP, no custom SDKfor (const step of workflow) { const response = await fetch(step.call, { method: 'POST', headers: { 'Authorization': `Bearer ${process.env.HOODY_TOKEN}`, 'Content-Type': 'application/json' }, body: JSON.stringify(step.body) });}Any Language Works
Section titled “Any Language Works”Every programming language has HTTP libraries:
# List all projectshoody projects listimport { HoodyClient } from '@hoody-ai/hoody-sdk';
const client = new HoodyClient({ baseURL: 'https://api.hoody.icu', token: process.env.HOODY_TOKEN });const projects = await client.api.projects.list();console.log(projects.data);curl "https://api.hoody.icu/api/v1/projects" \ -H "Authorization: Bearer $HOODY_TOKEN"No SDK required. HTTP is the SDK. Works from JavaScript, Python, Go, Ruby, or any language with an HTTP client.
The Complete Workflow
Section titled “The Complete Workflow”Here’s how everything connects:
1. AUTHENTICATE POST /api/v1/users/auth/login → Receive JWT tokens
2. CREATE AUTH TOKEN (for automation) POST /api/v1/auth/tokens → Get hdy_... token with IP whitelist, expiration → Use this in scripts/AI instead of user credentials
3. CREATE PROJECT POST /api/v1/projects/ → Get project_id
4. SPAWN CONTAINER POST /api/v1/projects/{project_id}/containers → Get container_id, server_name → Container URLs automatically available: • https://{project_id}-{container_id}-terminal-1.{server_name}.containers.hoody.icu • https://{project_id}-{container_id}-display-1.{server_name}.containers.hoody.icu • https://{project_id}-{container_id}-exec-1.{server_name}.containers.hoody.icu • ... plus files, workspaces, sqlite, cron, pipe, notifications, browser, code, daemon, tunnel, ssh, proxy, and dynamic http/https ports
5. CONFIGURE (optional) PATCH /api/v1/containers/{id}/network → Route through VPN POST /api/v1/containers/{id}/firewall/ingress → Add inbound firewall rule POST /api/v1/containers/{id}/firewall/egress → Add outbound firewall rule POST /api/v1/proxy/aliases → Create custom domain
6. USE CONTAINER SERVICES # Now use the container URLs directly POST https://{project}-{container}-terminal-1.{server}.containers.hoody.icu/execute GET https://{project}-{container}-files.{server}.containers.hoody.icu/home/Hoody API builds it. Container URLs use it.
API Organization
Section titled “API Organization”The Hoody API is organized into logical groups:
Core Management
Section titled “Core Management”- Authentication - Login, tokens, sessions
- API Tokens - Long-lived automation credentials
- Users - Profile management
- Projects - Project CRUD operations
- Containers - Container lifecycle
Networking & Access
Section titled “Networking & Access”- Realms - API-level isolation (scope operations to specific realms via
{realmId}.api.hoody.icu) - Container Network - Proxy/VPN routing
- Container Firewall - Ingress/egress rules
- IPv4 - Dedicated IP addresses
Proxy & Routing
Section titled “Proxy & Routing”- Proxy Aliases - Custom domains (my-app.$serverName.containers.hoody.icu)
- Proxy Permissions (Project) - Project-level access control
- Proxy Permissions (Container) - Container-level overrides
Data & State
Section titled “Data & State”- Container Snapshots - Time travel for containers
- Container Copy & Sync - Duplicate and sync containers
- Storage Shares - Share directories between containers
- Container Images - OS images and marketplace
Infrastructure
Section titled “Infrastructure”- Notifications - Platform announcements
- Wallet - Billing and credits
Standard Patterns
Section titled “Standard Patterns”Authentication
Section titled “Authentication”Every request requires authentication:
# Login (stores credentials locally)hoody auth login --username your_username --password your_password
# All subsequent commands use the stored tokenhoody projects listhoody containers listimport { HoodyClient } from '@hoody-ai/hoody-sdk';
// Option 1: Auth Token (recommended for automation)const client = new HoodyClient({ baseURL: 'https://api.hoody.icu', token: process.env.HOODY_TOKEN // hdy_... token});
// All API calls are authenticated automaticallyconst projects = await client.api.projects.list();# Option 1: User JWT (from login)curl "https://api.hoody.icu/api/v1/projects" \ -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
# Option 2: Auth Token (recommended for automation)curl "https://api.hoody.icu/api/v1/projects" \ -H "Authorization: Bearer hdy_abc123def456..."For automation/AI: Use Auth Tokens (long-lived, IP-restricted, revocable). For user sessions: Use JWT from login (short-lived, refresh-able).
Error Handling
Section titled “Error Handling”Standard error response:
{ "statusCode": 400, "error": "Bad Request", "message": "Detailed explanation of what went wrong"}Common status codes:
400- Bad Request (validation errors)401- Unauthorized (missing/invalid token)403- Forbidden (insufficient permissions)404- Not Found (resource doesn’t exist)409- Conflict (duplicate name, invalid state)500- Internal Server Error
Pagination
Section titled “Pagination”List endpoints support pagination:
GET /api/v1/projects?page=1&limit=20&sort_by=created_at&sort_order=descResponse includes pagination metadata:
{ "data": { "projects": [...], "pagination": { "total": 150, "page": 1, "limit": 20, "totalPages": 8 } }}Filtering & Sorting
Section titled “Filtering & Sorting”Many endpoints support filtering:
# Filter containers by realmGET /api/v1/containers?realm_id=507f1f77bcf86cd799439011
# Filter by statusGET /api/v1/containers?status=running
# Sort by creation dateGET /api/v1/projects?sort_by=created_at&sort_order=descWhy HTTP for Platform Management?
Section titled “Why HTTP for Platform Management?”Traditional platforms use:
- CLI tools (installed binaries, version conflicts)
- Custom SDKs (language-specific, maintenance burden)
- Complex protocols (proprietary, hard to debug)
Hoody uses pure HTTP:
- ✅ Works from any language, any device
- ✅ AI agents understand it natively
- ✅ Curl-able, script-able, browser-based
- ✅ Observable, debuggable, auditable
- ✅ Compose-able with any HTTP service
Example: AI orchestrates infrastructure without SDK:
// AI generates infrastructure workflowasync function deployClientProject(clientName) { const token = process.env.HOODY_TOKEN; const headers = { 'Authorization': `Bearer ${token}`, 'Content-Type': 'application/json' };
// 1. Create project const project = await fetch('https://api.hoody.icu/api/v1/projects/', { method: 'POST', headers, body: JSON.stringify({ alias: `client-${clientName}`, color: '#3498db', max_containers: 50 }) }).then(r => r.json());
// 2. Spawn 3 containers (frontend, backend, database) const containers = await Promise.all([ 'frontend', 'backend', 'database' ].map(name => fetch(`https://api.hoody.icu/api/v1/projects/${project.data.id}/containers`, { method: 'POST', headers, body: JSON.stringify({ name, server_id: 'your-server-id', hoody_kit: true, dev_kit: true }) }).then(r => r.json()) ));
// 3. Create production alias await fetch('https://api.hoody.icu/api/v1/proxy/aliases', { method: 'POST', headers, body: JSON.stringify({ container_id: containers[0].data.id, alias: `${clientName}-app`, program: 'http', index: 1 }) });
// 4. Configure firewall for database await fetch(`https://api.hoody.icu/api/v1/containers/${containers[2].data.id}/firewall/ingress`, { method: 'POST', headers, body: JSON.stringify({ action: 'allow', protocol: 'tcp', destination_port: '5432', source: `${containers[1].data.ipv4}/32`, description: 'Allow backend to database' }) });
return { projectId: project.data.id, containers: containers.map(c => ({ name: c.data.name, terminalUrl: `https://${project.data.id}-${c.data.id}-terminal-1.${c.data.server_name}.containers.hoody.icu`, displayUrl: `https://${project.data.id}-${c.data.id}-display-1.${c.data.server_name}.containers.hoody.icu` })) };}AI needs zero training. It just uses HTTP.
API Base URL
Section titled “API Base URL”Global API:
https://api.hoody.icuRealm-Scoped API (for multi-tenant isolation):
https://{realmId}.api.hoody.icuWhen you use a realm-scoped URL:
- The subdomain realm must be a 24-char hex ID
- Read operations are scoped to resources in that realm
- Create/update operations preserve or merge that realm where supported
- Container creation also requires the target project to already belong to that realm
- API tokens can be restricted to specific realms
- Realm-restricted tokens can bootstrap via
GET /api/v1/auth/tokens/meon base host - Perfect for multi-tenant SaaS architectures
See: Realms → for realm-based API isolation.
Response Format
Section titled “Response Format”All responses follow this structure:
{ "statusCode": 200, "message": "Human-readable success message", "data": { // The actual response data }}Errors include details:
{ "statusCode": 400, "error": "Bad Request", "message": "Container name must be unique within project", "data": { "field": "name", "conflict": "staging-api" }}Getting Started
Section titled “Getting Started”Your first API calls:
Gives you: JWT access token
Gives you: hdy_... token for scripts/AI
Gives you: Project ID
Gives you: Container with 18 live HTTP service URLs
That’s it. In 4 API calls, you have a running computer with terminal, display, files, database, and 14 more HTTP services.
Useful Questions
Section titled “Useful Questions”What’s the difference between Hoody API and container service URLs?
Section titled “What’s the difference between Hoody API and container service URLs?”The Hoody API (api.hoody.icu) manages your infrastructure—creating containers, configuring networks, managing billing. Container service URLs ({project}-{container}-terminal-1.{server}.containers.hoody.icu) are the actual computers you use—execute commands, access files, run applications.
Think of it like AWS: the AWS Console (Hoody API) vs. your EC2 instance (container URLs).
Can I use the Hoody API without the Hoody Kit?
Section titled “Can I use the Hoody API without the Hoody Kit?”Yes! When creating containers, set hoody_kit: false to get a plain Linux container without the 18 HTTP services. You’ll still use the Hoody API to manage it, but the container won’t have terminal/files/display HTTP endpoints—just SSH and any services you install yourself.
Do I need different auth tokens for different projects?
Section titled “Do I need different auth tokens for different projects?”Not required, but recommended for blast-radius control. One token can cover multiple projects, while per-app/per-realm tokens are easier to audit and revoke.
How quickly can I spawn a container via the API?
Section titled “How quickly can I spawn a container via the API?”Typically 20-30 seconds from API call to running container with all services live. Prespawn Templates can reduce this to under 5 seconds by maintaining pre-created container pools.
Can AI agents directly use the Hoody API?
Section titled “Can AI agents directly use the Hoody API?”Absolutely. LLMs understand HTTP natively—they were trained on web data. An AI agent needs only a Hoody auth token (environment variable) and can immediately orchestrate your entire infrastructure through standard HTTP requests. No SDK required.
What happens if I delete a project via the API?
Section titled “What happens if I delete a project via the API?”All containers in that project are immediately terminated and deleted. This is permanent and cannot be undone. Always snapshot important containers before deleting projects. The CLI and MCP surfaces gate this with an interactive confirmation prompt; if you’re calling the HTTP API directly, the call proceeds with no extra confirm parameter, so handle the prompt in your own tooling.
Can I automate infrastructure with GitHub Actions?
Section titled “Can I automate infrastructure with GitHub Actions?”Yes! Store your Hoody auth token as a GitHub Secret (HOODY_TOKEN), then use curl or any HTTP library in your workflows to manage containers. Common pattern: Deploy on push by creating/updating containers via the API.
Is there a rate limit on the Hoody API?
Section titled “Is there a rate limit on the Hoody API?”Current rate limits are generous and designed for automation. You can spawn dozens of containers per minute. If you hit rate limits, the API returns 429 Too Many Requests with retry timing. For enterprise-scale automation, contact support for increased limits.
Can I scope operations to specific realms?
Section titled “Can I scope operations to specific realms?”Yes. Use realm-scoped API URLs: https://{realmId}.api.hoody.icu instead of https://api.hoody.icu.
Key rules:
{realmId}must be a 24-hex realm ID.- Realm-restricted tokens (
realm_idsnon-empty orallow_no_realm: false) must use realm-scoped URLs for resource operations. GET /api/v1/auth/tokens/meis the bootstrap endpoint for discovering allowed realms.
What’s the maximum number of containers I can create?
Section titled “What’s the maximum number of containers I can create?”There’s no hard platform limit. Practical limits: server resources (CPU/RAM) and organization (managing hundreds of containers becomes complex). Use projects to organize, and consider prespawn templates for container pooling at scale.
Troubleshooting
Section titled “Troubleshooting”401 Unauthorized
Section titled “401 Unauthorized”Problem: All API requests return 401 Unauthorized
Solutions:
-
Check token is included:
Terminal window # Ensure Authorization header is presentcurl -v "https://api.hoody.icu/api/v1/projects" \-H "Authorization: Bearer $HOODY_TOKEN"# Look for: > Authorization: Bearer hdy_... -
Verify token format:
Terminal window # JWT tokens start with: eyJ...# Auth tokens start with: hdy_...echo $HOODY_TOKEN -
Check token expiration:
- Re-authenticate:
403 Forbidden (Auth Token IP Whitelist)
Section titled “403 Forbidden (Auth Token IP Whitelist)”Problem: Auth Token returns 403 Forbidden
Cause: Your current IP is not in the token’s IP whitelist
Check your IP:
Compare ip_whitelist with your current IP (run curl https://ifconfig.me in terminal).
Solutions:
- Update whitelist to include your IP:
- Create new token without IP restrictions:
404 Not Found
Section titled “404 Not Found”Problem: Resource not found errors
Common causes:
-
Wrong ID format:
Terminal window # IDs must be 24-character hex# ❌ Wrong: abc123# ✅ Correct: 507f1f77bcf86cd799439011 -
Resource doesn’t exist:
Terminal window # Verify resource existsGET /api/v1/projects # List all projectsGET /api/v1/containers # List all containers -
Wrong endpoint path:
/api/v1/project/507f1f77bcf86cd799439011 # ✅ Correct: /api/v1/projects/507f1f77bcf86cd799439011
Network/Connection Errors
Section titled “Network/Connection Errors”Problem: Can’t reach api.hoody.icu
Solutions:
-
Check internet connection:
Terminal window ping api.hoody.icu -
Verify DNS resolution:
Terminal window dig api.hoody.icu# Should return IP address -
Test with curl verbose:
Terminal window curl -v "https://api.hoody.icu/api/v1/projects" \-H "Authorization: Bearer $HOODY_TOKEN"# Look for TLS handshake and connection details -
Check firewall/proxy:
- Corporate firewall might block HTTPS
- VPN might interfere with connections
- Try from different network
Rate Limiting
Section titled “Rate Limiting”Problem: 429 Too Many Requests
Solution: Hoody API currently has generous rate limits. If you hit this:
-
Add delays between requests:
for (const item of items) {await fetch(apiUrl, options);await new Promise(r => setTimeout(r, 100)); // 100ms delay} -
Batch operations where possible:
Terminal window # Instead of 10 separate container creates# Create them with delay or use prespawn pools
Getting Help
Section titled “Getting Help”If issues persist:
- Review error message - Hoody returns detailed error messages in JSON
- Contact support with:
- Request method and endpoint
- Request headers (mask auth token)
- Error response
- Timestamp of failure
Next Steps
Section titled “Next Steps”Understand the foundation:
- Authentication → - How to authenticate (JWTs vs Auth Tokens)
- Projects & Containers → - How Hoody organizes your infinite computers
- Hoody Proxy → - How every container feature becomes a URL
See complete endpoint documentation:
- 📚 API Reference → - Every endpoint, every parameter, every response
The Hoody API is your control plane.
Use it to spawn infinite computers.
Then use their URLs to actually work.
This is the foundation. Everything else builds on HTTP.