Using the below example I was unable to access the priority tier for the Agent Platform API. This is illustrated by the response field ‘traffic_type’ = ‘ON_DEMAND’.
Tried the minimum viable use case on the website:
curl -X POST
-H “Authorization: Bearer $(gcloud auth print-access-token)”
-H “Content-Type: application/json; charset=utf-8”
-H “X-Vertex-AI-LLM-Request-Type: shared”
-H “X-Vertex-AI-LLM-Shared-Request-Type: priority”
“https://aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/global/publishers/google/models/gemini-2.5-flash:generateContent” -d
$‘{
“contents”: {
“role”: “user”,
“parts”: { “text”: “PROMPT_TEXT” }
}
}’
The call returned the following:
“candidates”: [
{
“content”: {
“role”: “model”,
“parts”: [
{
“text”: “Hello there! How can I help you today?”
}
]
},
“finishReason”: “STOP”,
“avgLogprobs”: -0.45475735664367678
}
],
“usageMetadata”: {
“promptTokenCount”: 1,
“candidatesTokenCount”: 10,
“totalTokenCount”: 33,
“trafficType”: “ON_DEMAND”,
“promptTokensDetails”: [
{
“modality”: “TEXT”,
“tokenCount”: 1
}
],
“candidatesTokensDetails”: [
{
“modality”: “TEXT”,
“tokenCount”: 10
}
],
“thoughtsTokenCount”: 22
},
“modelVersion”: “gemini-2.5-flash”,
“createTime”: “2026-07-29T10:31:34.164297Z”,
“responseId”: “htZpasmDCrnyxs0PubWNyAM”
}
The request format is correct, and gemini-2.5-flash on the global endpoint supports Priority PayGo. However, Priority PayGo can be downgraded to Standard PayGo when organization-level ramp limits are exceeded or capacity is temporarily constrained; in that case, trafficType is returned as ON_DEMAND instead of ON_DEMAND_PRIORITY. I would retry with a low, steady request rate and, if every request remains downgraded, open a support case with the project ID and response IDs.
Just to add to this - using the example above but switching the model to gemini-3.5-flash - the exact same request but for ‘flex’ request type works (ON_DEMAND_FLEX is returned). However, for ‘priority’ requests still appear to be standard ON_DEMAND. This implies the request is correct but is being downgraded to standard.
I ran into the same behavior. Even after setting both:
the response still shows trafficType: "ON_DEMAND" instead of PRIORITY.
Based on the documentation, I expected these headers to route the request through the Priority tier. Since the request completes successfully without any errors, it’s hard to tell whether the headers are being ignored or if the project isn’t actually enabled for Priority.
Could someone clarify whether any additional project configuration or enablement is required? Also, is there a way to verify that a request is actually being processed using the Priority tier?