# Recommendations AI v1beta1 API - Class PredictionService.PredictionServiceBase (2.0.0-beta07)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [2.0.0-beta07 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.PredictionService.PredictionServiceBase)
- [2.0.0-beta06](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/2.0.0-beta06/Google.Cloud.RecommendationEngine.V1Beta1.PredictionService.PredictionServiceBase)
- [1.0.0-beta03](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/1.0.0-beta03/Google.Cloud.RecommendationEngine.V1Beta1.PredictionService.PredictionServiceBase)

    [BindServiceMethod(typeof(PredictionService), "BindService")]
    public abstract class PredictionService.PredictionServiceBase

Reference documentation and code samples for the Recommendations AI v1beta1 API class PredictionService.PredictionServiceBase.

Base class for server-side implementations of PredictionService

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> PredictionService.PredictionServiceBase

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.RecommendationEngine.V1Beta1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1)

## Assembly

Google.Cloud.RecommendationEngine.V1Beta1.dll

## Methods

### Predict(PredictRequest, ServerCallContext)

    public virtual Task<PredictResponse> Predict(PredictRequest request, ServerCallContext context)

Makes a recommendation prediction. If using API Key based authentication,
the API Key must be registered using the
\[PredictionApiKeyRegistry\]\[google.cloud.recommendationengine.v1beta1.PredictionApiKeyRegistry\]
service. [Learn more](https://docs.cloud.google.com/recommendations-ai/docs/setting-up#register-key).

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.PredictRequest` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.PredictResponse` | The response to send back to the client (wrapped by a task). |