---
title: "POST /v1/projects/{projectsId}/locations/{locationsId}/endpoints/{endpointsId}:directRawPredict"
method: POST
path: "/v1/projects/{projectsId}/locations/{locationsId}/endpoints/{endpointsId}:directRawPredict"
tags: ["projects"]
---

# POST /v1/projects/{projectsId}/locations/{locationsId}/endpoints/{endpointsId}:directRawPredict

`POST /v1/projects/{projectsId}/locations/{locationsId}/endpoints/{endpointsId}:directRawPredict`

## Request

- Base URL: `https://aiplatform.googleapis.com`
- URL: `https://aiplatform.googleapis.com/v1/projects/{projectsId}/locations/{locationsId}/endpoints/{endpointsId}:directRawPredict`
- Auth: one of:
  - OAuth 2 and OAuth 2
    - Implicit: `https://accounts.google.com/o/oauth2/auth`
    - Scopes: `https://www.googleapis.com/auth/aiplatform`
    - Authorization code: `https://accounts.google.com/o/oauth2/auth`
    - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/aiplatform`
  - OAuth 2 and OAuth 2
    - Implicit: `https://accounts.google.com/o/oauth2/auth`
    - Scopes: `https://www.googleapis.com/auth/cloud-platform`
    - Authorization code: `https://accounts.google.com/o/oauth2/auth`
    - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/cloud-platform`
  - OAuth 2 and OAuth 2
    - Implicit: `https://accounts.google.com/o/oauth2/auth`
    - Scopes: `https://www.googleapis.com/auth/cloud-platform.read-only`
    - Authorization code: `https://accounts.google.com/o/oauth2/auth`
    - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/cloud-platform.read-only`

Perform an unary online prediction request to a gRPC model server for custom containers.

## Path parameters

- `projectsId` string, required
- `locationsId` string, required
- `endpointsId` string, required

## Request body

- GoogleCloudAiplatformV1DirectRawPredictRequest: Request message for PredictionService.DirectRawPredict.
  - `input` string, byte: The prediction input.
  - `methodName` string: Fully qualified name of the API method being invoked to perform predictions. Format: `/namespace.Service/Method/` Example: `/tensorflow.serving.PredictionService/Predict`

## Response `200`

Successful response

- GoogleCloudAiplatformV1DirectRawPredictResponse: Response message for PredictionService.DirectRawPredict.
  - `output` string, byte: The prediction output.

## Changes

- **2026-11-06** `3aca3b348f0c`: 4 info
  - the security scope `https://www.googleapis.com/auth/aiplatform` was added to the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/aiplatform` was added to the endpoint's security scheme `Oauth2c`
  - the security scope `https://www.googleapis.com/auth/cloud-platform.read-only` was removed from the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/cloud-platform.read-only` was removed from the endpoint's security scheme `Oauth2c`
- **2026-10-30** `34fcc627b062`: 4 info
  - the security scope `https://www.googleapis.com/auth/aiplatform` was added to the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/aiplatform` was added to the endpoint's security scheme `Oauth2c`
  - the security scope `https://www.googleapis.com/auth/cloud-platform.read-only` was removed from the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/cloud-platform.read-only` was removed from the endpoint's security scheme `Oauth2c`

[Operation history](https://skmtc.dev/google/apis/aiplatform/changes/v1/projects/:projectsId/locations/:locationsId/endpoints/:endpointsId:directRawPredict/post.md)

---

[API](https://skmtc.dev/google/apis/aiplatform.md) - [All operations](https://skmtc.dev/google/apis/aiplatform/llms.txt) - [OpenAPI document](https://skmtc.dev/google/apis/aiplatform/revisions/3aca3b348f0c?raw)
