An API for serving predictions from machine learning models. This reference documentation describes the AI Platform Prediction-related methods of the AI Platform Training and Prediction API. For details about other parts of the API, see the following:
- REST Resource: v1.projects
- REST Resource: v1.projects.jobs
- REST Resource: v1.projects.locations
- REST Resource: v1.projects.models
- REST Resource: v1.projects.models.versions
- REST Resource: v1.projects.operations
Service: ml.googleapis.com
To call this service, we recommend that you use the Google-provided client libraries. If your application needs to use your own libraries to call this service, use the following information when you make the API requests.
Discovery document
A Discovery Document is a machine-readable specification for describing and consuming REST APIs. It is used to build client libraries, IDE plugins, and other tools that interact with Google APIs. One service may provide multiple discovery documents. This service provides the following discovery document:
Service endpoint
A service endpoint is a base URL that specifies the network address of an API service. One service might have multiple service endpoints. This service has the following service endpoints and all URIs below are relative to these service endpoints:
https://ml.googleapis.com
https://us-central1-ml.googleapis.com
https://us-east1-ml.googleapis.com
https://us-east4-ml.googleapis.com
https://us-west1-ml.googleapis.com
https://northamerica-northeast1-ml.googleapis.com
https://europe-west1-ml.googleapis.com
https://europe-west2-ml.googleapis.com
https://europe-west3-ml.googleapis.com
https://europe-west4-ml.googleapis.com
https://asia-east1-ml.googleapis.com
https://asia-northeast1-ml.googleapis.com
https://asia-southeast1-ml.googleapis.com
https://australia-southeast1-ml.googleapis.com
The following table shows whether methods are supported when using the global
endpoint (ml.googleapis.com
) or regional endpoints.
Learn more
about using regional endpoints.
Method | Supported on ml.googleapis.com ? |
Supported on regional endpoints? |
---|---|---|
v1.projects.explain |
Not supported. | Supported. |
v1.projects.getConfig |
Supported. | Not supported. |
v1.projects.predict |
Supported. | Supported. |
v1.projects.jobs.* |
Supported. | Not supported. |
v1.projects.locations.get |
Supported. However, you can only use this with a region available on the global endpoint. Trying to get details for other regions fails. | Supported. However, you can only use this with the region of the endpoint. Trying to get details for other regions fails. |
v1.projects.locations.list |
Supported. However, this method only returns regions available on the global endpoint. | Not supported. |
v1.projects.models.* |
Supported. | Supported. |
v1.projects.models.versions.* |
Supported. | Supported. |
v1.projects.operations.* |
Supported. | Supported. |
REST Resource: v1.projects
Methods | |
---|---|
explain |
POST /v1/{name=projects/**}:explain Performs explanation on the data in the request. |
getConfig |
GET /v1/{name=projects/*}:getConfig Get the service account information associated with your project. |
predict |
POST /v1/{name=projects/**}:predict Performs online prediction on the data in the request. |
REST Resource: v1.projects.jobs
Methods | |
---|---|
cancel |
POST /v1/{name=projects/*/jobs/*}:cancel Cancels a running job. |
create |
POST /v1/{parent=projects/*}/jobs Creates a training or a batch prediction job. |
get |
GET /v1/{name=projects/*/jobs/*} Describes a job. |
getIamPolicy |
GET /v1/{resource=projects/*/jobs/*}:getIamPolicy Gets the access control policy for a resource. |
list |
GET /v1/{parent=projects/*}/jobs Lists the jobs in the project. |
patch |
PATCH /v1/{name=projects/*/jobs/*} Updates a specific job resource. |
setIamPolicy |
POST /v1/{resource=projects/*/jobs/*}:setIamPolicy Sets the access control policy on the specified resource. |
testIamPermissions |
POST /v1/{resource=projects/*/jobs/*}:testIamPermissions Returns permissions that a caller has on the specified resource. |
REST Resource: v1.projects.locations
Methods | |
---|---|
get |
GET /v1/{name=projects/*/locations/*} Get the complete list of CMLE capabilities in a location, along with their location-specific properties. |
list |
GET /v1/{parent=projects/*}/locations List all locations that provides at least one type of CMLE capability. |
REST Resource: v1.projects.models
Methods | |
---|---|
create |
POST /v1/{parent=projects/*}/models Creates a model which will later contain one or more versions. |
delete |
DELETE /v1/{name=projects/*/models/*} Deletes a model. |
get |
GET /v1/{name=projects/*/models/*} Gets information about a model, including its name, the description (if set), and the default version (if at least one version of the model has been deployed). |
getIamPolicy |
GET /v1/{resource=projects/*/models/*}:getIamPolicy Gets the access control policy for a resource. |
list |
GET /v1/{parent=projects/*}/models Lists the models in a project. |
patch |
PATCH /v1/{name=projects/*/models/*} Updates a specific model resource. |
setIamPolicy |
POST /v1/{resource=projects/*/models/*}:setIamPolicy Sets the access control policy on the specified resource. |
testIamPermissions |
POST /v1/{resource=projects/*/models/*}:testIamPermissions Returns permissions that a caller has on the specified resource. |
REST Resource: v1.projects.models.versions
Methods | |
---|---|
create |
POST /v1/{parent=projects/*/models/*}/versions Creates a new version of a model from a trained TensorFlow model. |
delete |
DELETE /v1/{name=projects/*/models/*/versions/*} Deletes a model version. |
get |
GET /v1/{name=projects/*/models/*/versions/*} Gets information about a model version. |
list |
GET /v1/{parent=projects/*/models/*}/versions Gets basic information about all the versions of a model. |
patch |
PATCH /v1/{name=projects/*/models/*/versions/*} Updates the specified Version resource. |
setDefault |
POST /v1/{name=projects/*/models/*/versions/*}:setDefault Designates a version to be the default for the model. |
REST Resource: v1.projects.operations
Methods | |
---|---|
cancel |
POST /v1/{name=projects/*/operations/*}:cancel Starts asynchronous cancellation on a long-running operation. |
get |
GET /v1/{name=projects/*/operations/*} Gets the latest state of a long-running operation. |
list |
GET /v1/{name=projects/*}/operations Lists operations that match the specified filter in the request. |