---
title: "POST /v1/{+endpoint}:directPredict"
method: POST
path: "/v1/{+endpoint}:directPredict"
tags: ["projects"]
---

# POST /v1/{+endpoint}:directPredict

`POST /v1/{+endpoint}:directPredict`

Perform an unary online prediction request to a gRPC model server for Vertex first-party products and frameworks.

## Path parameters

- `endpoint` string, required

## Request body

- GoogleCloudAiplatformV1DirectPredictRequest — Request message for PredictionService.DirectPredict.
  - `inputs` GoogleCloudAiplatformV1Tensor[] — The prediction input.
    - `dtype` 'DATA_TYPE_UNSPECIFIED' | 'BOOL' | 'STRING' | 'FLOAT' | 'DOUBLE' | 'INT8' | 'INT16' | 'INT32' | 'INT64' | 'UINT8' | 'UINT16' | 'UINT32' | 'UINT64' — The data type of tensor.
    - `doubleVal` number[] — DOUBLE
    - `structVal` object — A map of string to tensor.
    - `stringVal` string[] — STRING
    - `uintVal` integer[] — UINT8 UINT16 UINT32
    - `bytesVal` string[] — STRING
    - `uint64Val` string[] — UINT64
    - `listVal` GoogleCloudAiplatformV1Tensor[] — A list of tensor values.
    - `shape` string[] — Shape of the tensor.
    - `floatVal` number[] — FLOAT
    - `int64Val` string[] — INT64
    - `tensorVal` string, byte — Serialized raw tensor content.
    - `intVal` integer[] — INT_8 INT_16 INT_32
    - `boolVal` boolean[] — Type specific representations that make it easy to create tensor protos in all languages. Only the representation corresponding to "dtype" can be set. The values hold the flattened representation of the tensor in row major order. BOOL
  - `parameters` GoogleCloudAiplatformV1Tensor — A tensor value type.
    - `dtype` 'DATA_TYPE_UNSPECIFIED' | 'BOOL' | 'STRING' | 'FLOAT' | 'DOUBLE' | 'INT8' | 'INT16' | 'INT32' | 'INT64' | 'UINT8' | 'UINT16' | 'UINT32' | 'UINT64' — The data type of tensor.
    - `doubleVal` number[] — DOUBLE
    - `structVal` object — A map of string to tensor.
    - `stringVal` string[] — STRING
    - `uintVal` integer[] — UINT8 UINT16 UINT32
    - `bytesVal` string[] — STRING
    - `uint64Val` string[] — UINT64
    - `listVal` GoogleCloudAiplatformV1Tensor[] — A list of tensor values.
    - `shape` string[] — Shape of the tensor.
    - `floatVal` number[] — FLOAT
    - `int64Val` string[] — INT64
    - `tensorVal` string, byte — Serialized raw tensor content.
    - `intVal` integer[] — INT_8 INT_16 INT_32
    - `boolVal` boolean[] — Type specific representations that make it easy to create tensor protos in all languages. Only the representation corresponding to "dtype" can be set. The values hold the flattened representation of the tensor in row major order. BOOL

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/aiplatform.md) · [All operations](https://skmtc.net/google/apis/aiplatform/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/aiplatform/versions/b608d71b91f0/schema)
