{"components":{"schemas":{"iamclient.OAuthClient":{"properties":{"client_id":{"type":"string"},"created_at":{"type":"string"},"is_active":{"type":"boolean"},"name":{"type":"string"}},"type":"object"},"iamclient.OAuthClientResponse":{"properties":{"client_id":{"type":"string"},"client_secret":{"type":"string"},"name":{"type":"string"}},"type":"object"},"models.Agent":{"properties":{"config_hash":{"type":"string"},"created_at":{"type":"string"},"endpoint":{"type":"string"},"endpoint_name":{"type":"string"},"id":{"type":"string"},"image":{"type":"string"},"manifest":{"additionalProperties":{},"type":"object"},"metadata":{"additionalProperties":{"type":"string"},"type":"object"},"name":{"type":"string"},"registry_id":{"type":"string"},"skills":{"items":{"type":"string"},"type":"array"},"state":{"type":"string"},"tier":{"type":"string"},"token":{"type":"string"},"updated_at":{"type":"string"}},"type":"object"},"models.AgentVM":{"properties":{"allocated_at":{"type":"string"},"created_at":{"type":"string"},"expires_at":{"type":"string"},"id":{"type":"string"},"metadata":{"additionalProperties":{"type":"string"},"type":"object"},"released_at":{"type":"string"},"skills":{"items":{"type":"string"},"type":"array"},"state":{"type":"string"},"tier":{"type":"string"},"token":{"type":"string"},"ttl_seconds":{"type":"integer"}},"type":"object"},"models.AllocateRequest":{"properties":{"env":{"additionalProperties":{"type":"string"},"type":"object"},"metadata":{"additionalProperties":{"type":"string"},"type":"object"},"org_id":{"type":"string"},"secure_runtime":{"type":"string"},"skills":{"items":{"type":"string"},"type":"array"},"tier":{"type":"string"},"ttl_seconds":{"type":"integer"}},"required":["tier"],"type":"object"},"models.AllocateResponse":{"properties":{"endpoint":{"type":"string"},"expires_at":{"type":"string"},"skills_loaded":{"items":{"type":"string"},"type":"array"},"state":{"type":"string"},"tier":{"type":"string"},"token":{"type":"string"},"vm_id":{"type":"string"},"ws_url":{"type":"string"}},"type":"object"},"models.CreateSkillRequest":{"properties":{"content":{"type":"string"},"description":{"type":"string"},"name":{"type":"string"},"resources":{"additionalProperties":{"type":"string"},"description":"Resources are files written into /workspace/skills/<name>/.\nInclude \"requirements.txt\" to install Python dependencies at VM boot.","type":"object"}},"required":["content","name"],"type":"object"},"models.ErrorResponse":{"properties":{"code":{"type":"integer"},"error_code":{"type":"string"},"message":{"type":"string"}},"type":"object"},"models.ReleaseRequest":{"properties":{"recycle":{"type":"boolean"}},"type":"object"},"models.RenewRequest":{"properties":{"ttl_seconds":{"type":"integer"}},"required":["ttl_seconds"],"type":"object"},"models.Skill":{"properties":{"content":{"type":"string"},"content_hash":{"type":"string"},"created_at":{"type":"string"},"description":{"type":"string"},"name":{"type":"string"},"resources":{"additionalProperties":{"type":"string"},"type":"object"},"updated_at":{"type":"string"}},"type":"object"},"models.UsageRecord":{"properties":{"duration_seconds":{"type":"integer"},"ended_at":{"type":"string"},"reason":{"type":"string"},"started_at":{"type":"string"},"tier":{"type":"string"},"vm_id":{"type":"string"}},"type":"object"},"models.UsageSummary":{"properties":{"by_tier":{"additionalProperties":{"type":"integer"},"type":"object"},"period_end":{"type":"string"},"period_start":{"type":"string"},"total_seconds":{"type":"integer"},"vm_count":{"type":"integer"}},"type":"object"}},"securitySchemes":{"BearerAuth":{"description":"STS access token. Obtain via POST https://sts.hexelstudio.com/token with X-API-Key header.","in":"header","name":"Authorization","type":"apiKey"}}},"info":{"contact":{},"description":"On-demand Agent VM platform — pre-warmed execution environments for AI agents with skills registry, code interpreter, and real-time SSE streaming.","title":"Hexel Compute API","version":"1.0.0"},"openapi":"3.0.1","paths":{"/compute/v1/access/clients":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/iamclient.OAuthClient"},"type":"array"}}},"description":"OK"}},"security":[{"BearerAuth":[]}],"summary":"List access clients","tags":["access"]},"post":{"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Client name","required":true,"x-originalParamName":"request"},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/iamclient.OAuthClientResponse"}}},"description":"Created"}},"security":[{"BearerAuth":[]}],"summary":"Create access client","tags":["access"]}},"/compute/v1/access/clients/{client_id}":{"delete":{"parameters":[{"description":"Client ID","in":"path","name":"client_id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content"}},"security":[{"BearerAuth":[]}],"summary":"Revoke access client","tags":["access"]}},"/compute/v1/agents/{agent_id}/deploy":{"post":{"description":"Creates a new deployment from a registered agent. Returns a deployment_id to use for all subsequent operations.","parameters":[{"description":"Registry Agent ID","in":"path","name":"agent_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Deploy options","x-originalParamName":"request"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.Agent"}}},"description":"OK"}},"security":[{"BearerAuth":[]}],"summary":"Deploy an agent from the registry","tags":["agents"]}},"/compute/v1/deployments":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/models.Agent"},"type":"array"}}},"description":"OK"}},"security":[{"BearerAuth":[]}],"summary":"List all deployments","tags":["deployments"]}},"/compute/v1/deployments/{deployment_id}":{"get":{"parameters":[{"description":"Deployment ID","in":"path","name":"deployment_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.Agent"}}},"description":"OK"}},"security":[{"BearerAuth":[]}],"summary":"Get deployment by ID","tags":["deployments"]},"delete":{"parameters":[{"description":"Deployment ID","in":"path","name":"deployment_id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content"}},"security":[{"BearerAuth":[]}],"summary":"Delete a deployment","tags":["deployments"]}},"/compute/v1/deployments/{deployment_id}/redeploy":{"post":{"parameters":[{"description":"Deployment ID","in":"path","name":"deployment_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.Agent"}}},"description":"OK"}},"security":[{"BearerAuth":[]}],"summary":"Redeploy (stop + start)","tags":["deployments"]}},"/compute/v1/deployments/{deployment_id}/stop":{"post":{"parameters":[{"description":"Deployment ID","in":"path","name":"deployment_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.Agent"}}},"description":"OK"}},"security":[{"BearerAuth":[]}],"summary":"Stop a deployment","tags":["deployments"]}},"/compute/v1/skills":{"get":{"description":"Returns all registered skill definitions","operationId":"listSkills","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/models.Skill"},"type":"array"}}},"description":"OK"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"BearerAuth":[]}],"summary":"List all skills","tags":["skills"]},"post":{"description":"Registers a new skill definition with content hashing","operationId":"createSkill","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.CreateSkillRequest"}}},"description":"Skill definition","required":true,"x-originalParamName":"request"},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.Skill"}}},"description":"Created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"BearerAuth":[]}],"summary":"Create a new skill","tags":["skills"]}},"/compute/v1/skills/{name}":{"get":{"description":"Returns a single skill definition by name","operationId":"getSkill","parameters":[{"description":"Skill name","in":"path","name":"name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.Skill"}}},"description":"OK"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}},"description":"Not Found"}},"security":[{"BearerAuth":[]}],"summary":"Get skill by name","tags":["skills"]},"put":{"description":"Updates an existing skill definition and recomputes content hash","operationId":"updateSkill","parameters":[{"description":"Skill name","in":"path","name":"name","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.CreateSkillRequest"}}},"description":"Updated skill definition","required":true,"x-originalParamName":"request"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.Skill"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"BearerAuth":[]}],"summary":"Update a skill","tags":["skills"]},"delete":{"description":"Removes a skill definition by name","operationId":"deleteSkill","parameters":[{"description":"Skill name","in":"path","name":"name","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"BearerAuth":[]}],"summary":"Delete a skill","tags":["skills"]}},"/compute/v1/usage":{"get":{"description":"Returns VM usage records for the caller's org, optionally filtered by date range and tier","operationId":"listUsage","parameters":[{"description":"Workspace ID","in":"header","name":"X-Workspace-Id","required":true,"schema":{"type":"string"}},{"description":"Environment ID","in":"header","name":"X-Environment-Id","required":true,"schema":{"type":"string"}},{"description":"Start date (YYYY-MM-DD), default 30 days ago","in":"query","name":"from","schema":{"type":"string"}},{"description":"End date (YYYY-MM-DD), default today","in":"query","name":"to","schema":{"type":"string"}},{"description":"Filter by tier","in":"query","name":"tier","schema":{"type":"string"}},{"description":"Max records (default 100)","in":"query","name":"limit","schema":{"type":"integer"}},{"description":"Offset for pagination","in":"query","name":"offset","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/models.UsageRecord"},"type":"array"}}},"description":"OK"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"BearerAuth":[]}],"summary":"List VM usage records","tags":["usage"]}},"/compute/v1/usage/summary":{"get":{"description":"Returns aggregated VM-seconds consumed by tier for the current calendar month","operationId":"getUsageSummary","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.UsageSummary"}}},"description":"OK"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"BearerAuth":[]}],"summary":"Get usage summary for current billing period","tags":["usage"]}},"/compute/v1/vms":{"get":{"description":"Returns VMs scoped to the caller's org","operationId":"listVMs","parameters":[{"description":"Filter by state","in":"query","name":"state","schema":{"type":"string"}},{"description":"Filter by tier","in":"query","name":"tier","schema":{"type":"string"}},{"description":"Limit results","in":"query","name":"limit","schema":{"type":"integer"}},{"description":"Offset results","in":"query","name":"offset","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/models.AgentVM"},"type":"array"}}},"description":"OK"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"BearerAuth":[]}],"summary":"List Agent VMs","tags":["vms"]}},"/compute/v1/vms/allocate":{"post":{"description":"Allocates a VM from the pool or creates a new one for the requesting org","operationId":"allocateVM","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.AllocateRequest"}}},"description":"Allocation parameters","required":true,"x-originalParamName":"request"},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.AllocateResponse"}}},"description":"Created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}},"description":"Bad Request"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}},"description":"No VMs available, retry shortly"}},"security":[{"BearerAuth":[]}],"summary":"Allocate a new Agent VM","tags":["vms"]}},"/compute/v1/vms/{id}":{"get":{"operationId":"getVM","parameters":[{"description":"VM ID (UUID)","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.AgentVM"}}},"description":"OK"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}},"description":"Not Found"}},"security":[{"BearerAuth":[]}],"summary":"Get Agent VM by ID","tags":["vms"]},"delete":{"operationId":"deleteVM","parameters":[{"description":"VM ID (UUID)","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}},"description":"Not Found"}},"security":[{"BearerAuth":[]}],"summary":"Delete Agent VM","tags":["vms"]}},"/compute/v1/vms/{id}/endpoint":{"get":{"operationId":"getVMEndpoint","parameters":[{"description":"VM ID (UUID)","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object"}}},"description":"OK"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}},"description":"Not Found"}},"security":[{"BearerAuth":[]}],"summary":"Get Agent VM endpoint","tags":["vms"]}},"/compute/v1/vms/{id}/execute":{"post":{"description":"Runs code or shell commands in an allocated sandbox VM","parameters":[{"description":"VM ID","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}},"summary":"Execute code in VM","tags":["vms"]}},"/compute/v1/vms/{id}/r/{path}":{"get":{"description":"Forwards any request to the runtime inside the VM. Token is injected automatically.","parameters":[{"description":"VM ID (UUID)","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"path e.g. v1/agents/execute","in":"path","name":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}},"description":"Not Found"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}},"description":"Bad Gateway"}},"security":[{"BearerAuth":[]}],"summary":"Forward request to VM","tags":["vms"]},"post":{"description":"Forwards any request to the runtime inside the VM. Token is injected automatically.","parameters":[{"description":"VM ID (UUID)","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"path e.g. v1/agents/execute","in":"path","name":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}},"description":"Not Found"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}},"description":"Bad Gateway"}},"security":[{"BearerAuth":[]}],"summary":"Forward request to VM","tags":["vms"]},"delete":{"description":"Forwards any request to the runtime inside the VM. Token is injected automatically.","parameters":[{"description":"VM ID (UUID)","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"path e.g. v1/agents/execute","in":"path","name":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}},"description":"Not Found"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}},"description":"Bad Gateway"}},"security":[{"BearerAuth":[]}],"summary":"Forward request to VM","tags":["vms"]}},"/compute/v1/vms/{id}/release":{"post":{"operationId":"releaseVM","parameters":[{"description":"VM ID (UUID)","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ReleaseRequest"}}},"description":"Release options","required":true,"x-originalParamName":"request"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.AgentVM"}}},"description":"OK"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}},"description":"Not Found"}},"security":[{"BearerAuth":[]}],"summary":"Release Agent VM","tags":["vms"]}},"/compute/v1/vms/{id}/renew":{"post":{"operationId":"renewVM","parameters":[{"description":"VM ID (UUID)","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.RenewRequest"}}},"description":"Renew parameters","required":true,"x-originalParamName":"request"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.AgentVM"}}},"description":"OK"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}},"description":"Not Found"}},"security":[{"BearerAuth":[]}],"summary":"Renew Agent VM TTL","tags":["vms"]}}},"servers":[{"url":"https://compute.hexelstudio.com"}]}