Vertex AI augmentPrompt returns 501 UNIMPLEMENTED despite valid parameters — deprecated, disabled, or am I using it wrong?

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/global and 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 vertexRagStore object and comparing with examples in the docs.

Questions

  1. Is augmentPrompt currently GA, preview, or deprecated?

  2. Is this method disabled in v1, behind an allowlist/feature flag, or only supported in specific regions or projects?

  3. Is there a different request shape (or model/feature prerequisite) that the current docs don’t reflect?

  4. If this API has moved (e.g., renamed/replaced), what is the correct, supported alternative?

  5. Are there any known incidents or rollouts that could cause UNIMPLEMENTED for 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!