1 // Copyright 2018 Google LLC
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
7 // http://www.apache.org/licenses/LICENSE-2.0
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
17 package google.cloud.automl.v1beta1;
19 import "google/api/annotations.proto";
20 import "google/cloud/automl/v1beta1/annotation_payload.proto";
21 import "google/cloud/automl/v1beta1/data_items.proto";
23 option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl";
24 option java_multiple_files = true;
25 option java_outer_classname = "PredictionServiceProto";
26 option java_package = "com.google.cloud.automl.v1beta1";
27 option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1";
29 // AutoML Prediction API.
30 service PredictionService {
31 // Perform a prediction.
32 rpc Predict(PredictRequest) returns (PredictResponse) {
33 option (google.api.http) = {
34 post: "/v1beta1/{name=projects/*/locations/*/models/*}:predict"
40 // Request message for
41 // [PredictionService.Predict][google.cloud.automl.v1beta1.PredictionService.Predict].
42 message PredictRequest {
43 // Name of the model requested to serve the prediction.
47 // Payload to perform a prediction on. The payload must match the
48 // problem type that the model was trained to solve.
49 ExamplePayload payload = 2;
51 // Additional domain-specific parameters, any string must be up to 25000
54 // * For Image Classification:
56 // `score_threshold` - (float) A value from 0.0 to 1.0. When the model
57 // makes predictions for an
58 // image, it will only produce results that have at least this confidence
59 // score threshold. The default is 0.5.
60 map<string, string> params = 3;
63 // Response message for
64 // [PredictionService.Predict][google.cloud.automl.v1beta1.PredictionService.Predict].
66 // Currently, this is only
67 // used to return an image recognition prediction result. More prediction
68 // output metadata might be introduced in the future.
69 message PredictResponse {
71 repeated AnnotationPayload payload = 1;
73 // Additional domain-specific prediction response metadata.
74 map<string, string> metadata = 2;