I'm writing code in Python SDK to connect to a created endpoint, but my code fails with "Dedicated public endpoints."

Hi

So far, I have only used the shared public endpoint. However, the payload is currently too low. As a result, I started using the dedicated public endpoint. The code was working before, but it stopped after I changed the endpoint type.

I copied and pasted the code below, which is part of a larger function. I updated the endpoint ID and the API endpoint type from ${REGION}.aiplatform.googleapis.com to ${ENDPOINT}.europe-west4.{PROJECT}.prediction.vertexai.googleapis.com. However, when I use the code, I receive the error message:

“{“error”:{“code”:404,“message”:“The server could not process your request because the specified resource was not found.” Please verify that you are using the correct URL, protocol (e.g., HTTPS), HTTP method (e.g., GET or POST), and port number. If the issue persists, contact support https://cloud.google.com/contact for assistance.”,“status”:“UNIMPLEMENTED”}}

I do not know the reason why this is happening.

if client is None:
    client_options = {"api_endpoint": api_endpoint}
    client = aiplatform.gapic.PredictionServiceClient(client_options=client_options)


endpoint = client.endpoint_path(
    project=project_id, location=location, endpoint=endpoint_id
)
response = client.predict(endpoint=endpoint, instances=instances, parameters=parameters)

Hi @Filip_Surma

It looks like you are hitting a configuration mismatch between how the Python SDK constructs requests and the custom URL you provided. The error suggests that while the client is reaching a server, that server does not recognize the specific path or method the SDK is trying to call.

Also, roughly how large is the payload you are trying to send? And where did you get the URL pattern?
Can you also please provide a more detailed breakdown of the issue, including the sequence of events.
Thanks