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

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

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

## Request

- Base URL: `https://aiplatform.googleapis.com`
- URL: `https://aiplatform.googleapis.com/v1/projects/{projectsId}/locations/{locationsId}/endpoints/{endpointsId}:streamRawPredict`
- 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 a streaming online prediction with an arbitrary HTTP payload.

## Path parameters

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

## Request body

- GoogleCloudAiplatformV1StreamRawPredictRequest: Request message for PredictionService.StreamRawPredict.
  - `httpBody` GoogleApiHttpBody: Message that represents an arbitrary HTTP body. It should only be used for payload formats that can't be represented as JSON, such as raw binary or an HTML page. This message can be used both in streaming and non-streaming API methods in the request as well as the response. It can be used as a top-level request field, which is convenient if one wants to extract parameters from either the URL or HTTP template into the request fields and also want access to the raw HTTP body. Example: message GetResourceRequest { // A unique request id. string request_id = 1; // The raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; } service ResourceService { rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); } Example with streaming methods: service CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); } Use of this type only changes how the request and response bodies are handled, all other features will continue to work unchanged.
    - `contentType` string: The HTTP Content-Type header value specifying the content type of the body.
    - `data` string, byte: The HTTP request/response body as raw binary.
    - `extensions` object[]: Application specific response metadata. Must be set in the first response for streaming APIs.

## Response `200`

Successful response

- GoogleApiHttpBody: Message that represents an arbitrary HTTP body. It should only be used for payload formats that can't be represented as JSON, such as raw binary or an HTML page. This message can be used both in streaming and non-streaming API methods in the request as well as the response. It can be used as a top-level request field, which is convenient if one wants to extract parameters from either the URL or HTTP template into the request fields and also want access to the raw HTTP body. Example: message GetResourceRequest { // A unique request id. string request_id = 1; // The raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; } service ResourceService { rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); } Example with streaming methods: service CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); } Use of this type only changes how the request and response bodies are handled, all other features will continue to work unchanged.
  - `contentType` string: The HTTP Content-Type header value specifying the content type of the body.
  - `data` string, byte: The HTTP request/response body as raw binary.
  - `extensions` object[]: Application specific response metadata. Must be set in the first response for streaming APIs.

## 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:streamRawPredict/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)
