This sample proxy shows how to do failover with service callouts if target service load balancing can't be used. It first tries to reach the Gemini API in europe-west1, and if it fails, tries a secondary API endpoint in europe-west4.
To deploy, just use the apigeecli or import manually using the Apigee console.
PROJECT_ID=YOUR_GCP_PROJECT
APIGEE_ENV=YOUR_APIGEE_ENVIRONMENT
apigeecli apis create bundle -f apiproxy --name GenAI-v2 -o $PROJECT_ID -e $APIGEE_ENV --ovr -t $(gcloud auth print-access-token)