The AI Platform Training & Prediction API provides REST endpoints to create and manage machine‑learning models, their versions, training and batch‑prediction jobs, and hyperparameter‑tuning studies and trials, and includes operations for online prediction, explanation, version control, and administrative tasks such as IAM policy handling and operation monitoring.
Deletes a model version. Each model can have multiple versions deployed and in use at any given time. Use this method to remove a single version. Note: You cannot delete the version that is set as the default version of the model unless it is the only remaining version.
name(path, required) — Required. The name of the version. You can get the names of all the versions of a model by calling projects.models.versions.list.
GET
/v1/{name}
Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
name(path, required) — The name of the operation resource.
PATCH
/v1/{name}
Updates the specified Version resource. Currently the only update-able fields are `description`, `requestLoggingConfig`, `autoScaling.minNodes`, and `manualScaling.nodes`.
name(path, required) — Required. The name of the model.
updateMask(query) — Required. Specifies the path, relative to `Version`, of the field to update. Must be present and non-empty. For example, to change the description of a version to "foo", the `update_mask` parameter would be specified as `description`, and the `PATCH` request body would specify the new value, as follows: ``` { "description": "foo" } ``` Currently the only supported update mask fields are `description`, `requestLoggingConfig`, `autoScaling.minNodes`, and `manualScaling.nodes`. However, you can only update `manualScaling.nodes` if the version uses a [Compute Engine (N1) machine type](/ml-engine/docs/machine-types-online-prediction).
GET
/v1/{name}/operations
Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
name(path, required) — The name of the operation's parent resource.
filter(query) — The standard list filter.
pageSize(query, limit) — The standard list page size.
pageToken(query) — The standard list page token.
POST
/v1/{name}:addMeasurement
Adds a measurement of the objective metrics to a trial. This measurement is assumed to have been taken before the trial is complete.
name(path, required) — Required. The trial name.
POST
/v1/{name}:cancel
Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
name(path, required) — The name of the operation resource to be cancelled.
POST
/v1/{name}:checkEarlyStoppingState
Checks whether a trial should stop or not. Returns a long-running operation. When the operation is successful, it will contain a CheckTrialEarlyStoppingStateResponse.
name(path, required) — Required. The trial name.
POST
/v1/{name}:complete
Marks a trial as complete.
name(path, required) — Required. The trial name.metat
POST
/v1/{name}:explain
Performs explanation on the data in the request. {% dynamic include "/ai-platform/includes/___explain-request" %}
name(path, required) — Required. The resource name of a model or a version. Authorization: requires the `predict` permission on the specified resource.
GET
/v1/{name}:getConfig
Get the service account information associated with your project. You need this information in order to grant the service account permissions for the Google Cloud Storage location where you put your model training code for training the model with Google Cloud Machine Learning.
name(path, required) — Required. The project name.
POST
/v1/{name}:predict
Performs online prediction on the data in the request. {% dynamic include "/ai-platform/includes/___predict-request" %}
name(path, required) — Required. The resource name of a model or a version. Authorization: requires the `predict` permission on the specified resource.
POST
/v1/{name}:setDefault
Designates a version to be the default for the model. The default version is used for prediction requests made against the model that don't specify a version. The first version to be created for a model is automatically set as the default. You must make any subsequent changes to the default version setting manually using this method.
name(path, required) — Required. The name of the version to make the default for the model. You can get the names of all the versions of a model by calling projects.models.versions.list.
POST
/v1/{name}:stop
Stops a trial.
name(path, required) — Required. The trial name.
GET
/v1/{parent}/jobs
Lists the jobs in the project. If there are no jobs that match the request parameters, the list request returns an empty response body: {}.
parent(path, required) — Required. The name of the project for which to list jobs.
filter(query) — Optional. Specifies the subset of jobs to retrieve. You can filter on the value of one or more attributes of the job object. For example, retrieve jobs with a job identifier that starts with 'census': gcloud ai-platform jobs list --filter='jobId:census*' List all failed jobs with names that start with 'rnn': gcloud ai-platform jobs list --filter='jobId:rnn* AND state:FAILED' For more examples, see the guide to monitoring jobs.
pageSize(query, limit) — Optional. The number of jobs to retrieve per "page" of results. If there are more remaining results than this number, the response message will contain a valid value in the `next_page_token` field. The default value is 20, and the maximum page size is 100.
pageToken(query) — Optional. A page token to request the next page of results. You get the token from the `next_page_token` field of the response from the previous call.
POST
/v1/{parent}/jobs
Creates a training or a batch prediction job.
parent(path, required) — Required. The project name.
GET
/v1/{parent}/locations
List all locations that provides at least one type of CMLE capability.
parent(path, required) — Required. The name of the project for which available locations are to be listed (since some locations might be whitelisted for specific projects).
pageSize(query, limit) — Optional. The number of locations to retrieve per "page" of results. If there are more remaining results than this number, the response message will contain a valid value in the `next_page_token` field. The default value is 20, and the maximum page size is 100.
pageToken(query) — Optional. A page token to request the next page of results. You get the token from the `next_page_token` field of the response from the previous call.
GET
/v1/{parent}/models
Lists the models in a project. Each project can contain multiple models, and each model can have multiple versions. If there are no models that match the request parameters, the list request returns an empty response body: {}.
parent(path, required) — Required. The name of the project whose models are to be listed.
filter(query) — Optional. Specifies the subset of models to retrieve.
pageSize(query, limit) — Optional. The number of models to retrieve per "page" of results. If there are more remaining results than this number, the response message will contain a valid value in the `next_page_token` field. The default value is 20, and the maximum page size is 100.
pageToken(query) — Optional. A page token to request the next page of results. You get the token from the `next_page_token` field of the response from the previous call.
POST
/v1/{parent}/models
Creates a model which will later contain one or more versions. You must add at least one version before you can request predictions from the model. Add versions by calling projects.models.versions.create.
parent(path, required) — Required. The project name.
GET
/v1/{parent}/studies
Lists all the studies in a region for an associated project.
parent(path, required) — Required. The project and location that the study belongs to. Format: projects/{project}/locations/{location}
POST
/v1/{parent}/studies
Creates a study.
parent(path, required) — Required. The project and location that the study belongs to. Format: projects/{project}/locations/{location}
studyId(query) — Required. The ID to use for the study, which will become the final component of the study's resource name.
GET
/v1/{parent}/trials
Lists the trials associated with a study.
parent(path, required) — Required. The name of the study that the trial belongs to.
POST
/v1/{parent}/trials
Adds a user provided trial to a study.
parent(path, required) — Required. The name of the study that the trial belongs to.
POST
/v1/{parent}/trials:listOptimalTrials
Lists the pareto-optimal trials for multi-objective study or the optimal trials for single-objective study. The definition of pareto-optimal can be checked in wiki page. https://en.wikipedia.org/wiki/Pareto_efficiency
parent(path, required) — Required. The name of the study that the pareto-optimal trial belongs to.
POST
/v1/{parent}/trials:suggest
Adds one or more trials to a study, with parameter values suggested by AI Platform Vizier. Returns a long-running operation associated with the generation of trial suggestions. When this long-running operation succeeds, it will contain a SuggestTrialsResponse.
parent(path, required) — Required. The name of the study that the trial belongs to.
GET
/v1/{parent}/versions
Gets basic information about all the versions of a model. If you expect that a model has many versions, or if you need to handle only a limited number of results at a time, you can request that the list be retrieved in batches (called pages). If there are no versions that match the request parameters, the list request returns an empty response body: {}.
parent(path, required) — Required. The name of the model for which to list the version.
filter(query) — Optional. Specifies the subset of versions to retrieve.
pageSize(query, limit) — Optional. The number of versions to retrieve per "page" of results. If there are more remaining results than this number, the response message will contain a valid value in the `next_page_token` field. The default value is 20, and the maximum page size is 100.
pageToken(query) — Optional. A page token to request the next page of results. You get the token from the `next_page_token` field of the response from the previous call.
POST
/v1/{parent}/versions
Creates a new version of a model from a trained TensorFlow model. If the version created in the cloud by this call is the first deployed version of the specified model, it will be made the default version of the model. When you add a version to a model that already has one or more versions, the default version does not automatically change. If you want a new version to be the default, you must call projects.models.versions.setDefault.
parent(path, required) — Required. The name of the model.
GET
/v1/{resource}:getIamPolicy
Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
resource(path, required) — REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.
options.requestedPolicyVersion(query) — Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
POST
/v1/{resource}:setIamPolicy
Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
resource(path, required) — REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.
POST
/v1/{resource}:testIamPermissions
Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
resource(path, required) — REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.