Hi everyone,
I’m trying to call the Vertex AI Generative AI REST API endpoint augmentPrompt and consistently get a 501 UNIMPLEMENTED error even though the request parameters look valid.
Endpoint (REST v1):
POST https://aiplatform.googleapis.com/v1/projects/${GOOGLE_CLOUD_PROJECT}/locations/${VERTEX_LOCATION}:augmentPrompt
Request body:
{
contents: [
{ role: "user", parts: [{ text: String(messages) }] }
],
model: {
model: GEMINI_MODEL,
},
vertexRagStore: {
ragResources: [
{ ragCorpus: RAG_CORPUS }
],
}
};
Full error response:
{
"error": {
"code": 501,
"message": "Operation is not implemented, or supported, or enabled.",
"status": "UNIMPLEMENTED"
}
}
What I’ve checked so far
-
Using the documented v1 REST endpoint and schema.
-
Authenticated with a service account that has Vertex AI permissions; project and billing are active.
-
Tried both
locations/globaland a regional location (e.g., us-east4) — same 501 result. -
Confirmed the Vertex AI API is enabled for the project.
-
Tried adding/removing the minimal
vertexRagStoreobject and comparing with examples in the docs.
Questions
-
Is
augmentPromptcurrently GA, preview, or deprecated? -
Is this method disabled in v1, behind an allowlist/feature flag, or only supported in specific regions or projects?
-
Is there a different request shape (or model/feature prerequisite) that the current docs don’t reflect?
-
If this API has moved (e.g., renamed/replaced), what is the correct, supported alternative?
-
Are there any known incidents or rollouts that could cause
UNIMPLEMENTEDfor this method?
If anyone has a known-working example (REST or client library) for augmentPrompt with current docs, I’d really appreciate a snippet. Also, if the feature has been deprecated or superseded, a pointer to the latest guidance would be super helpful.
Thanks in advance!