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

# POST /v1/{+parent}/nasJobs

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

Creates a NasJob

## Path parameters

- `parent` string, required

## Request body

- GoogleCloudAiplatformV1NasJob — Represents a Neural Architecture Search (NAS) job.
  - `createTime` string, google-datetime — Output only. Time when the NasJob was created.
  - `state` 'JOB_STATE_UNSPECIFIED' | 'JOB_STATE_QUEUED' | 'JOB_STATE_PENDING' | 'JOB_STATE_RUNNING' | 'JOB_STATE_SUCCEEDED' | 'JOB_STATE_FAILED' | 'JOB_STATE_CANCELLING' | 'JOB_STATE_CANCELLED' | 'JOB_STATE_PAUSED' | 'JOB_STATE_EXPIRED' | 'JOB_STATE_UPDATING' | 'JOB_STATE_PARTIALLY_SUCCEEDED' — Output only. The detailed state of the job.
  - `nasJobOutput` GoogleCloudAiplatformV1NasJobOutput — Represents a uCAIP NasJob output.
    - `multiTrialJobOutput` GoogleCloudAiplatformV1NasJobOutputMultiTrialJobOutput — The output of a multi-trial Neural Architecture Search (NAS) jobs.
      - `searchTrials` GoogleCloudAiplatformV1NasTrial[] — Output only. List of NasTrials that were started as part of search stage.
        - `state` 'STATE_UNSPECIFIED' | 'REQUESTED' | 'ACTIVE' | 'STOPPING' | 'SUCCEEDED' | 'INFEASIBLE' — Output only. The detailed state of the NasTrial.
        - `endTime` string, google-datetime — Output only. Time when the NasTrial's status changed to `SUCCEEDED` or `INFEASIBLE`.
        - `id` string — Output only. The identifier of the NasTrial assigned by the service.
        - `startTime` string, google-datetime — Output only. Time when the NasTrial was started.
        - `finalMeasurement` GoogleCloudAiplatformV1Measurement — A message representing a Measurement of a Trial. A Measurement contains the Metrics got by executing a Trial using suggested hyperparameter values.
          - `elapsedDuration` string, google-duration — Output only. Time that the Trial has been running at the point of this Measurement.
          - `stepCount` string, int64 — Output only. The number of steps the machine learning model has been trained for. Must be non-negative.
          - `metrics` GoogleCloudAiplatformV1MeasurementMetric[] — Output only. A list of metrics got by evaluating the objective functions using suggested Parameter values.
            - `metricId` string — Output only. The ID of the Metric. The Metric should be defined in StudySpec's Metrics.
            - `value` number, double — Output only. The value for this metric.
      - `trainTrials` GoogleCloudAiplatformV1NasTrial[] — Output only. List of NasTrials that were started as part of train stage.
        - `state` 'STATE_UNSPECIFIED' | 'REQUESTED' | 'ACTIVE' | 'STOPPING' | 'SUCCEEDED' | 'INFEASIBLE' — Output only. The detailed state of the NasTrial.
        - `endTime` string, google-datetime — Output only. Time when the NasTrial's status changed to `SUCCEEDED` or `INFEASIBLE`.
        - `id` string — Output only. The identifier of the NasTrial assigned by the service.
        - `startTime` string, google-datetime — Output only. Time when the NasTrial was started.
        - `finalMeasurement` GoogleCloudAiplatformV1Measurement — A message representing a Measurement of a Trial. A Measurement contains the Metrics got by executing a Trial using suggested hyperparameter values.
          - `elapsedDuration` string, google-duration — Output only. Time that the Trial has been running at the point of this Measurement.
          - `stepCount` string, int64 — Output only. The number of steps the machine learning model has been trained for. Must be non-negative.
          - `metrics` GoogleCloudAiplatformV1MeasurementMetric[] — Output only. A list of metrics got by evaluating the objective functions using suggested Parameter values.
            - `metricId` string — Output only. The ID of the Metric. The Metric should be defined in StudySpec's Metrics.
            - `value` number, double — Output only. The value for this metric.
  - `updateTime` string, google-datetime — Output only. Time when the NasJob was most recently updated.
  - `labels` object — The labels with user-defined metadata to organize NasJobs. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information and examples of labels.
  - `displayName` string — Required. The display name of the NasJob. The name can be up to 128 characters long and can consist of any UTF-8 characters.
  - `satisfiesPzi` boolean — Output only. Reserved for future use.
  - `error` GoogleRpcStatus — The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).
    - `code` integer — The status code, which should be an enum value of google.rpc.Code.
    - `message` string — A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
    - `details` object[] — A list of messages that carry the error details. There is a common set of message types for APIs to use.
  - `name` string — Output only. Resource name of the NasJob.
  - `startTime` string, google-datetime — Output only. Time when the NasJob for the first time entered the `JOB_STATE_RUNNING` state.
  - `encryptionSpec` GoogleCloudAiplatformV1EncryptionSpec — Represents a customer-managed encryption key specification that can be applied to a Vertex AI resource.
    - `kmsKeyName` string — Required. Resource name of the Cloud KMS key used to protect the resource. The Cloud KMS key must be in the same region as the resource. It must have the format `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
  - `enableRestrictedImageTraining` boolean — Optional. Enable a separation of Custom model training and restricted image training for tenant project.
  - `endTime` string, google-datetime — Output only. Time when the NasJob entered any of the following states: `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
  - `nasJobSpec` GoogleCloudAiplatformV1NasJobSpec — Represents the spec of a NasJob.
    - `resumeNasJobId` string — The ID of the existing NasJob in the same Project and Location which will be used to resume search. search_space_spec and nas_algorithm_spec are obtained from previous NasJob hence should not provide them again for this NasJob.
    - `searchSpaceSpec` string — It defines the search space for Neural Architecture Search (NAS).
    - `multiTrialAlgorithmSpec` GoogleCloudAiplatformV1NasJobSpecMultiTrialAlgorithmSpec — The spec of multi-trial Neural Architecture Search (NAS).
      - `searchTrialSpec` GoogleCloudAiplatformV1NasJobSpecMultiTrialAlgorithmSpecSearchTrialSpec — Represent spec for search trials.
        - `maxParallelTrialCount` integer — Required. The maximum number of trials to run in parallel.
        - `searchTrialJobSpec` GoogleCloudAiplatformV1CustomJobSpec — Represents the spec of a CustomJob.
          - `persistentResourceId` string — Optional. The ID of the PersistentResource in the same Project and Location which to run If this is specified, the job will be run on existing machines held by the PersistentResource instead of on-demand short-live machines. The network and CMEK configs on the job should be consistent with those on the PersistentResource, otherwise, the job will be rejected.
          - `experimentRun` string — Optional. The Experiment Run associated with this job. Format: `projects/{project}/locations/{location}/metadataStores/{metadataStores}/contexts/{experiment-name}-{experiment-run-name}`
          - `scheduling` GoogleCloudAiplatformV1Scheduling — All parameters related to queuing and scheduling of custom jobs.
            - `restartJobOnWorkerRestart` boolean — Optional. Restarts the entire CustomJob if a worker gets restarted. This feature can be used by distributed training jobs that are not resilient to workers leaving and joining a job.
            - `strategy` 'STRATEGY_UNSPECIFIED' | 'ON_DEMAND' | 'LOW_COST' | 'STANDARD' | 'SPOT' | 'FLEX_START' — Optional. This determines which type of scheduling strategy to use.
            - `timeout` string, google-duration — Optional. The maximum job running time. The default is 7 days.
            - `maxWaitDuration` string, google-duration — Optional. This is the maximum duration that a job will wait for the requested resources to be provisioned if the scheduling strategy is set to [Strategy.DWS_FLEX_START]. If set to 0, the job will wait indefinitely. The default is 24 hours.
            - `disableRetries` boolean — Optional. Indicates if the job should retry for internal errors after the job starts running. If true, overrides `Scheduling.restart_job_on_worker_restart` to false.
          - `reservedIpRanges` string[] — Optional. A list of names for the reserved ip ranges under the VPC network that can be used for this job. If set, we will deploy the job within the provided ip ranges. Otherwise, the job will be deployed to any ip ranges under the provided VPC network. Example: ['vertex-ai-ip-range'].
          - `enableDashboardAccess` boolean — Optional. Whether you want Vertex AI to enable access to the customized dashboard in training chief container. If set to `true`, you can access the dashboard at the URIs given by CustomJob.web_access_uris or Trial.web_access_uris (within HyperparameterTuningJob.trials).
          - `models` string[] — Optional. The name of the Model resources for which to generate a mapping to artifact URIs. Applicable only to some of the Google-provided custom jobs. Format: `projects/{project}/locations/{location}/models/{model}` In order to retrieve a specific version of the model, also provide the version ID or version alias. Example: `projects/{project}/locations/{location}/models/{model}@2` or `projects/{project}/locations/{location}/models/{model}@golden` If no version ID or alias is specified, the "default" version will be returned. The "default" version alias is created for the first version of the model, and can be moved to other versions later on. There will be exactly one default version.
          - `protectedArtifactLocationId` string — The ID of the location to store protected artifacts. e.g. us-central1. Populate only when the location is different than CustomJob location. List of supported locations: https://cloud.google.com/vertex-ai/docs/general/locations
          - `tensorboard` string — Optional. The name of a Vertex AI Tensorboard resource to which this CustomJob will upload Tensorboard logs. Format: `projects/{project}/locations/{location}/tensorboards/{tensorboard}`
          - `workerPoolSpecs` GoogleCloudAiplatformV1WorkerPoolSpec[] — Required. The spec of the worker pools including machine type and Docker image. All worker pools except the first one are optional and can be skipped by providing an empty value.
            - `containerSpec` GoogleCloudAiplatformV1ContainerSpec — The spec of a Container.
              - …
            - `nfsMounts` GoogleCloudAiplatformV1NfsMount[] — Optional. List of NFS mount spec.
              - …
            - `pythonPackageSpec` GoogleCloudAiplatformV1PythonPackageSpec — The spec of a Python packaged code.
              - …
            - `diskSpec` GoogleCloudAiplatformV1DiskSpec — Represents the spec of disk options.
              - …
            - `machineSpec` GoogleCloudAiplatformV1MachineSpec — Specification of a single machine.
              - …
            - `replicaCount` string, int64 — Optional. The number of worker replicas to use for this worker pool.
            - `lustreMounts` GoogleCloudAiplatformV1LustreMount[] — Optional. List of Lustre mounts.
              - …
          - `serviceAccount` string — Specifies the service account for workload run-as account. Users submitting jobs must have act-as permission on this run-as account. If unspecified, the [Vertex AI Custom Code Service Agent](https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) for the CustomJob's project is used.
          - `network` string — Optional. The full name of the Compute Engine [network](/compute/docs/networks-and-firewalls#networks) to which the Job should be peered. For example, `projects/12345/global/networks/myVPC`. [Format](/compute/docs/reference/rest/v1/networks/insert) is of the form `projects/{project}/global/networks/{network}`. Where {project} is a project number, as in `12345`, and {network} is a network name. To specify this field, you must have already [configured VPC Network Peering for Vertex AI](https://cloud.google.com/vertex-ai/docs/general/vpc-peering). If this field is left unspecified, the job is not peered with any network.
          - `experiment` string — Optional. The Experiment associated with this job. Format: `projects/{project}/locations/{location}/metadataStores/{metadataStores}/contexts/{experiment-name}`
          - `baseOutputDirectory` GoogleCloudAiplatformV1GcsDestination — The Google Cloud Storage location where the output is to be written to.
            - `outputUriPrefix` string — Required. Google Cloud Storage URI to output directory. If the uri doesn't end with '/', a '/' will be automatically appended. The directory is created if it doesn't exist.
          - `enableWebAccess` boolean — Optional. Whether you want Vertex AI to enable [interactive shell access](https://cloud.google.com/vertex-ai/docs/training/monitor-debug-interactive-shell) to training containers. If set to `true`, you can access interactive shells at the URIs given by CustomJob.web_access_uris or Trial.web_access_uris (within HyperparameterTuningJob.trials).
          - `pscInterfaceConfig` GoogleCloudAiplatformV1PscInterfaceConfig — Configuration for PSC-I.
            - `networkAttachment` string — Optional. The name of the Compute Engine [network attachment](https://cloud.google.com/vpc/docs/about-network-attachments) to attach to the resource within the region and user project. To specify this field, you must have already [created a network attachment] (https://cloud.google.com/vpc/docs/create-manage-network-attachments#create-network-attachments). This field is only used for resources using PSC-I.
            - `dnsPeeringConfigs` GoogleCloudAiplatformV1DnsPeeringConfig[] — Optional. DNS peering configurations. When specified, Vertex AI will attempt to configure DNS peering zones in the tenant project VPC to resolve the specified domains using the target network's Cloud DNS. The user must grant the dns.peer role to the Vertex AI Service Agent on the target project.
              - …
        - `maxTrialCount` integer — Required. The maximum number of Neural Architecture Search (NAS) trials to run.
        - `maxFailedTrialCount` integer — The number of failed trials that need to be seen before failing the NasJob. If set to 0, Vertex AI decides how many trials must fail before the whole job fails.
      - `metric` GoogleCloudAiplatformV1NasJobSpecMultiTrialAlgorithmSpecMetricSpec — Represents a metric to optimize.
        - `metricId` string — Required. The ID of the metric. Must not contain whitespaces.
        - `goal` 'GOAL_TYPE_UNSPECIFIED' | 'MAXIMIZE' | 'MINIMIZE' — Required. The optimization goal of the metric.
      - `multiTrialAlgorithm` 'MULTI_TRIAL_ALGORITHM_UNSPECIFIED' | 'REINFORCEMENT_LEARNING' | 'GRID_SEARCH' — The multi-trial Neural Architecture Search (NAS) algorithm type. Defaults to `REINFORCEMENT_LEARNING`.
      - `trainTrialSpec` GoogleCloudAiplatformV1NasJobSpecMultiTrialAlgorithmSpecTrainTrialSpec — Represent spec for train trials.
        - `trainTrialJobSpec` GoogleCloudAiplatformV1CustomJobSpec — Represents the spec of a CustomJob.
          - `persistentResourceId` string — Optional. The ID of the PersistentResource in the same Project and Location which to run If this is specified, the job will be run on existing machines held by the PersistentResource instead of on-demand short-live machines. The network and CMEK configs on the job should be consistent with those on the PersistentResource, otherwise, the job will be rejected.
          - `experimentRun` string — Optional. The Experiment Run associated with this job. Format: `projects/{project}/locations/{location}/metadataStores/{metadataStores}/contexts/{experiment-name}-{experiment-run-name}`
          - `scheduling` GoogleCloudAiplatformV1Scheduling — All parameters related to queuing and scheduling of custom jobs.
            - `restartJobOnWorkerRestart` boolean — Optional. Restarts the entire CustomJob if a worker gets restarted. This feature can be used by distributed training jobs that are not resilient to workers leaving and joining a job.
            - `strategy` 'STRATEGY_UNSPECIFIED' | 'ON_DEMAND' | 'LOW_COST' | 'STANDARD' | 'SPOT' | 'FLEX_START' — Optional. This determines which type of scheduling strategy to use.
            - `timeout` string, google-duration — Optional. The maximum job running time. The default is 7 days.
            - `maxWaitDuration` string, google-duration — Optional. This is the maximum duration that a job will wait for the requested resources to be provisioned if the scheduling strategy is set to [Strategy.DWS_FLEX_START]. If set to 0, the job will wait indefinitely. The default is 24 hours.
            - `disableRetries` boolean — Optional. Indicates if the job should retry for internal errors after the job starts running. If true, overrides `Scheduling.restart_job_on_worker_restart` to false.
          - `reservedIpRanges` string[] — Optional. A list of names for the reserved ip ranges under the VPC network that can be used for this job. If set, we will deploy the job within the provided ip ranges. Otherwise, the job will be deployed to any ip ranges under the provided VPC network. Example: ['vertex-ai-ip-range'].
          - `enableDashboardAccess` boolean — Optional. Whether you want Vertex AI to enable access to the customized dashboard in training chief container. If set to `true`, you can access the dashboard at the URIs given by CustomJob.web_access_uris or Trial.web_access_uris (within HyperparameterTuningJob.trials).
          - `models` string[] — Optional. The name of the Model resources for which to generate a mapping to artifact URIs. Applicable only to some of the Google-provided custom jobs. Format: `projects/{project}/locations/{location}/models/{model}` In order to retrieve a specific version of the model, also provide the version ID or version alias. Example: `projects/{project}/locations/{location}/models/{model}@2` or `projects/{project}/locations/{location}/models/{model}@golden` If no version ID or alias is specified, the "default" version will be returned. The "default" version alias is created for the first version of the model, and can be moved to other versions later on. There will be exactly one default version.
          - `protectedArtifactLocationId` string — The ID of the location to store protected artifacts. e.g. us-central1. Populate only when the location is different than CustomJob location. List of supported locations: https://cloud.google.com/vertex-ai/docs/general/locations
          - `tensorboard` string — Optional. The name of a Vertex AI Tensorboard resource to which this CustomJob will upload Tensorboard logs. Format: `projects/{project}/locations/{location}/tensorboards/{tensorboard}`
          - `workerPoolSpecs` GoogleCloudAiplatformV1WorkerPoolSpec[] — Required. The spec of the worker pools including machine type and Docker image. All worker pools except the first one are optional and can be skipped by providing an empty value.
            - `containerSpec` GoogleCloudAiplatformV1ContainerSpec — The spec of a Container.
              - …
            - `nfsMounts` GoogleCloudAiplatformV1NfsMount[] — Optional. List of NFS mount spec.
              - …
            - `pythonPackageSpec` GoogleCloudAiplatformV1PythonPackageSpec — The spec of a Python packaged code.
              - …
            - `diskSpec` GoogleCloudAiplatformV1DiskSpec — Represents the spec of disk options.
              - …
            - `machineSpec` GoogleCloudAiplatformV1MachineSpec — Specification of a single machine.
              - …
            - `replicaCount` string, int64 — Optional. The number of worker replicas to use for this worker pool.
            - `lustreMounts` GoogleCloudAiplatformV1LustreMount[] — Optional. List of Lustre mounts.
              - …
          - `serviceAccount` string — Specifies the service account for workload run-as account. Users submitting jobs must have act-as permission on this run-as account. If unspecified, the [Vertex AI Custom Code Service Agent](https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) for the CustomJob's project is used.
          - `network` string — Optional. The full name of the Compute Engine [network](/compute/docs/networks-and-firewalls#networks) to which the Job should be peered. For example, `projects/12345/global/networks/myVPC`. [Format](/compute/docs/reference/rest/v1/networks/insert) is of the form `projects/{project}/global/networks/{network}`. Where {project} is a project number, as in `12345`, and {network} is a network name. To specify this field, you must have already [configured VPC Network Peering for Vertex AI](https://cloud.google.com/vertex-ai/docs/general/vpc-peering). If this field is left unspecified, the job is not peered with any network.
          - `experiment` string — Optional. The Experiment associated with this job. Format: `projects/{project}/locations/{location}/metadataStores/{metadataStores}/contexts/{experiment-name}`
          - `baseOutputDirectory` GoogleCloudAiplatformV1GcsDestination — The Google Cloud Storage location where the output is to be written to.
            - `outputUriPrefix` string — Required. Google Cloud Storage URI to output directory. If the uri doesn't end with '/', a '/' will be automatically appended. The directory is created if it doesn't exist.
          - `enableWebAccess` boolean — Optional. Whether you want Vertex AI to enable [interactive shell access](https://cloud.google.com/vertex-ai/docs/training/monitor-debug-interactive-shell) to training containers. If set to `true`, you can access interactive shells at the URIs given by CustomJob.web_access_uris or Trial.web_access_uris (within HyperparameterTuningJob.trials).
          - `pscInterfaceConfig` GoogleCloudAiplatformV1PscInterfaceConfig — Configuration for PSC-I.
            - `networkAttachment` string — Optional. The name of the Compute Engine [network attachment](https://cloud.google.com/vpc/docs/about-network-attachments) to attach to the resource within the region and user project. To specify this field, you must have already [created a network attachment] (https://cloud.google.com/vpc/docs/create-manage-network-attachments#create-network-attachments). This field is only used for resources using PSC-I.
            - `dnsPeeringConfigs` GoogleCloudAiplatformV1DnsPeeringConfig[] — Optional. DNS peering configurations. When specified, Vertex AI will attempt to configure DNS peering zones in the tenant project VPC to resolve the specified domains using the target network's Cloud DNS. The user must grant the dns.peer role to the Vertex AI Service Agent on the target project.
              - …
        - `maxParallelTrialCount` integer — Required. The maximum number of trials to run in parallel.
        - `frequency` integer — Required. Frequency of search trials to start train stage. Top N [TrainTrialSpec.max_parallel_trial_count] search trials will be trained for every M [TrainTrialSpec.frequency] trials searched.
  - `satisfiesPzs` boolean — Output only. Reserved for future use.

## 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)
