Create an environment
Requires the environments:create permission.
Boots a build instance (microVM by default, or a VM) from a base image. The base is auto-picked (newest CLEAN image of the right kind) unless pinned via base_image_id, or forked from another sealed environment via source_environment_id. Install software (manual via console, or an auto provisioner), then POST :id/seal to capture a versioned image. The environment also carries the agent surface its RUNS inherit: type (agent backend), connector, default agent config/model, and default run instance size. Resource-constrained: vm-xsmall only.
An access token from this zone's POST /oauth/token, or a session token from POST /api/v1/auth/login. Send it as Authorization: Bearer <token>.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/v1/environments" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "subnet_id": "69f11071-4ccc-4bb5-932b-00eac1b68892", "vpc_id": "26872b87-3ca9-4a41-b328-948d9c25c405" }'{ "agent": { "mcp_servers": [ { "name": "string", "transport": "string", "url": "string" } ], "model": "string", "skills": [ "string" ], "system_prompt": "string", "tools": [ "string" ] }, "base_image": "string", "base_image_id": "b6adea76-47c7-48d7-95b8-1541877fe9d0", "boot_disk_size_gib": 0, "connector_id": "9389ba6f-3696-4571-84d4-34d588c4b109", "created_at": "2019-08-24T14:15:22Z", "engine": "string", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "instance_id": "06587974-2dbe-4e10-8bf9-38cce0f5a366", "instance_type": "string", "last_error": "string", "name": "string", "phase": "string", "run_instance_type": "string", "seal": { "image_id": "string", "image_ref": "string", "last_error": "string", "stage": "string", "updated_at": "2019-08-24T14:15:22Z", "version": 0 }, "sealed_image_id": "ff551657-d4de-43d2-b95c-dae4e631fd58", "sealed_image_ref": "string", "state": "string", "status": "string", "subnet_id": "69f11071-4ccc-4bb5-932b-00eac1b68892", "tags": { "property1": "string", "property2": "string" }, "target": "string", "tenant_id": "34f5c98e-f430-457b-a812-92637d0c6fd0", "type": "string", "updated_at": "2019-08-24T14:15:22Z", "version": 0, "vpc_id": "26872b87-3ca9-4a41-b328-948d9c25c405"}