Overview
A Vertex AI compatible synchronous generation API. The same handler is mounted at /api/v1 and /api/vertex-ai/v1beta, and supports the /models/{provider}/{model}:generateContent alias.
API details
Constraints
- The caller must have an API Key. For more information, see Manage AI API Keys.
Request path
POST {BASE_URL}/api/vertex-ai/v1/publishers/{provider}/models/{model}:generateContent
Request header
Name |
Required |
Example value |
Description |
|---|---|---|---|
| Authorization | Yes | Bearer {token} | Authorization information |
| Content-Type | No | application/json | Request body format |
Request parameters
Path
Name |
Type |
Required |
Example value |
Description |
|---|---|---|---|---|
| provider | string | Yes | - | N/A |
| model | string | Yes | - | N/A |
Query
None
Body
Name |
Type |
Required |
Example value |
Description |
|---|---|---|---|---|
| model | string | - | - | N/A |
| contents | array[object] | - | - | N/A |
| instances | array[object] | - | - | N/A |
| parameters | object | - | - | N/A |
| voice | object | - | - | N/A |
Response
Response parameters
Name |
Type |
Description |
|---|---|---|
| success | boolean | Indicates whether the request was successful |
| code | string | Response code |
| message | string | Response message |
| data | object | Business response data |
data
The returned data structure is unknown.
Request example
curl --request POST '{BASE_URL}/api/vertex-ai/v1/publishers/{provider}/models/{model}:generateContent' \
--header 'Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data '{
"model": "",
"contents": [],
"instances": [],
"parameters": {},
"voice": {}
}'
Response example
{
"success": true,
"code": "200",
"message": "successful",
"data": {}
}
