---
title: "POST /v1/{+parent}/sandboxEnvironmentTemplates"
method: POST
path: "/v1/{+parent}/sandboxEnvironmentTemplates"
tags: ["projects"]
---

# POST /v1/{+parent}/sandboxEnvironmentTemplates

`POST /v1/{+parent}/sandboxEnvironmentTemplates`

Creates a SandboxEnvironmentTemplate in a given reasoning engine.

## Path parameters

- `parent` string, required

## Request body

- GoogleCloudAiplatformV1SandboxEnvironmentTemplate — The specification of a SandboxEnvironmentTemplate. A SandboxEnvironmentTemplate defines a template for creating SandboxEnvironments.
  - `state` 'UNSPECIFIED' | 'PROVISIONING' | 'ACTIVE' | 'DEPROVISIONING' | 'DELETED' | 'FAILED' — Output only. The state of the sandbox environment template.
  - `customContainerEnvironment` GoogleCloudAiplatformV1SandboxEnvironmentTemplateCustomContainerEnvironment — The customized sandbox runtime environment for BYOC.
    - `customContainerSpec` GoogleCloudAiplatformV1SandboxEnvironmentTemplateCustomContainerSpec — Specification for deploying from a custom container image.
      - `imageUri` string — Required. The Artifact Registry Docker image URI (e.g., us-central1-docker.pkg.dev/my-project/my-repo/my-image:tag) of the container image that is to be run on each worker replica.
    - `ports` GoogleCloudAiplatformV1SandboxEnvironmentTemplateNetworkPort[] — Ports to expose from the container.
      - `port` integer — Optional. Port number to expose. This must be a valid port number, between 1 and 65535.
      - `protocol` 'PROTOCOL_UNSPECIFIED' | 'TCP' | 'UDP' — Optional. Protocol for port. Defaults to TCP if not specified.
    - `resources` GoogleCloudAiplatformV1SandboxEnvironmentTemplateResourceRequirements — Message to define resource requests and limits (mirroring Kubernetes) for each sandbox instance created from this template.
      - `requests` object — Optional. The requested amounts of compute resources. Keys are resource names (e.g., "cpu", "memory"). Values are quantities (e.g., "250m", "512Mi").
      - `limits` object — Optional. The maximum amounts of compute resources allowed. Keys are resource names (e.g., "cpu", "memory"). Values are quantities (e.g., "500m", "1Gi").
  - `egressControlConfig` GoogleCloudAiplatformV1SandboxEnvironmentTemplateEgressControlConfig — Configuration for egress control of sandbox instances.
    - `internetAccess` boolean — Optional. Whether to allow internet access.
  - `name` string — Identifier. The resource name of the SandboxEnvironmentTemplate. Format: `projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}/sandboxEnvironmentTemplates/{sandbox_environment_template}`
  - `createTime` string, google-datetime — Output only. The timestamp when this SandboxEnvironmentTemplate was created.
  - `updateTime` string, google-datetime — Output only. The timestamp when this SandboxEnvironmentTemplate was most recently updated.
  - `defaultContainerEnvironment` GoogleCloudAiplatformV1SandboxEnvironmentTemplateDefaultContainerEnvironment — The default sandbox runtime environment for default container workloads.
    - `resources` GoogleCloudAiplatformV1SandboxEnvironmentTemplateResourceRequirements — Message to define resource requests and limits (mirroring Kubernetes) for each sandbox instance created from this template.
      - `requests` object — Optional. The requested amounts of compute resources. Keys are resource names (e.g., "cpu", "memory"). Values are quantities (e.g., "250m", "512Mi").
      - `limits` object — Optional. The maximum amounts of compute resources allowed. Keys are resource names (e.g., "cpu", "memory"). Values are quantities (e.g., "500m", "1Gi").
    - `defaultContainerCategory` 'DEFAULT_CONTAINER_CATEGORY_UNSPECIFIED' | 'DEFAULT_CONTAINER_CATEGORY_COMPUTER_USE' — Required. The category of the default container image.
  - `displayName` string — Required. The display name of the SandboxEnvironmentTemplate.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/aiplatform.md) · [All operations](https://skmtc.net/google/apis/aiplatform/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/aiplatform/versions/b608d71b91f0/schema)
