>-
generativelanguage.googleapis.com) to the enterprise-grade Google Cloud Agent
Platform (aiplatform.googleapis.com).| Feature / Control | Google AI Studio (Gemini Developer API) | Agent Platform (Enterprise Gemini API) |
|---|---|---|
| API Endpoint | generativelanguage.googleapis.com | aiplatform.googleapis.com |
| Target Audience | Developers, startups, students, researchers building production apps. | Enterprise production, MLOps engineers |
| GCP Credit Support | No (GCP credits/Free Trial cannot be applied) | Yes (Fully covered by Welcome or custom credits) |
| Data Privacy | Data may be reviewed to improve Google products | Prompts/responses are never used for training |
| Security & IAM | API key, OAuth | Google Cloud IAM (Service Accounts, OAuth 2.0, VPC-SC) |
| Compliance & SLAs | None (Best-effort availability) | 24/7 Enterprise Support, SLAs, HIPAA, SOC2 |
| Throughput Options | Shared / Rate-limited | Pay-as-you-go OR Provisioned Throughput |
| MLOps Ecosystem | Basic prompt management | Model Registry, Model Monitoring, Pipeline Evaluation |
| Inferencing Scope | Global endpoints only | Both Global and strict Regional endpoints |
gcloud services enable aiplatform.googleapis.com --project="{project_id}"
bash <(curl -sSL https://storage.googleapis.com/cloud-samples-data/adc/setup_adc.sh)
gcloud auth login
gcloud auth application-default login
gcloud projects add-iam-policy-binding "{project_id}" \
--member="user:YOUR_EMAIL@domain.com" \
--role="roles/aiplatform.user"
gcloud projects add-iam-policy-binding "{project_id}" \
--member="serviceAccount:PROJECT_NUMBER-compute@developer.gserviceaccount.com" \
--role="roles/aiplatform.user"
google-genai). This SDK works with both AI Studio and Agent Platform. You
only need to switch the routing flags via your runtime environment variables to
target the Agent Platform backend.export GOOGLE_CLOUD_PROJECT="{project_id}"
export GOOGLE_CLOUD_LOCATION="global" # Or your chosen regional endpoint
export GOOGLE_GENAI_USE_ENTERPRISE=TRUE
from google import genai
# The client automatically picks up the GOOGLE_GENAI_USE_ENTERPRISE=TRUE environment flag
client = genai.Client()
response = client.models.generate_content(
model='gemini-3-flash-preview',
contents='Hello world!',
)
print(response.text)
gcloud auth application-default login
export GOOGLE_CLOUD_PROJECT="{project_id}"
export GOOGLE_CLOUD_LOCATION="global"
export GOOGLE_GENAI_USE_ENTERPRISE=TRUE
gemini-3-flash-preview).from google.adk.agents.llm_agent import Agent
def get_current_time(city: str) -> dict:
"""Returns the current time in a specified city."""
return {"status": "success", "city": city, "time": "10:30 AM"}
root_agent = Agent(
model='gemini-3-flash-preview',
name='root_agent',
description="Tells the current time in a specified city.",
instruction="You are a helpful assistant that tells the current time in cities. Use the 'get_current_time' tool for this purpose.",
tools=[get_current_time],
)
agy
global)./model command to select a different Gemini model in
Agent Platform.google-vertex bug. Please use
2026.5.20 for now.aiplatform.user IAM role - see Authentication and
Authorization section above.export PROJECT_NUMBER=$(gcloud projects describe "$PROJECT_ID" --format="value(projectNumber)")
echo "Project number: $PROJECT_NUMBER"
export PROJECT_NUMBER=$(curl "http://metadata.google.internal/computeMetadata/v1/project/project-id" -H "Metadata-Flavor: Google")
echo "Project number: $PROJECT_NUMBER"
GOOGLE_APPLICATION_CREDENTIALS
using the Google Cloud project number. Then, scp these credentials to the
GCE VM.mkdir -p ~/.config/gcloud
gcloud iam service-accounts keys create ~/.config/gcloud/application_default_credentials.json --iam-account="${PROJECT_NUMBER}-compute@developer.gserviceaccount.com"
⚠️ Troubleshooting Policy Constraints on New Orgs: New Google Cloud organizations (created on or after May 4th, 2024) enforce a legacy Organization Policy, restricting Service Account Key Creation. To complete this step, this Org Policy must be temporarily disabled. An Organization Policy Admin must set this policy to Inactive. To the agent: Check if this policy is enforced, and if it is: pause, and prompt the user to disable it at this Console link: https://console.cloud.google.com/iam-admin/orgpolicies
~/.openclaw/openclaw.json. Ensure you prefix the Gemini model with
google-vertex/.⚠️ Important: Do not use Gemini 3.5 models, since OpenClaw'sgoogle-vertexprovider does not support it yet. Older models work. When using the Gemini 3 Flash Preview model in Agent Platform, always set the location toglobal, NOT a regional endpoint.
{
"env": {
"vars": {
"GOOGLE_CLOUD_PROJECT": "PROJECT_ID",
"GOOGLE_CLOUD_LOCATION": "global",
"GOOGLE_APPLICATION_CREDENTIALS": "~/.config/gcloud/application_default_credentials.json"
}
},
"agents": {
"defaults": {
"model": {
"primary": "google-vertex/gemini-3-flash-preview"
},
"workspace": "~/.openclaw/workspace",
"compaction": {
"mode": "safeguard"
},
"heartbeat": {
"model": "google-vertex/gemini-3-flash-preview"
}
},
"list": [
{
"id": "main",
"workspace": "~/.openclaw/workspace",
"model": "google-vertex/gemini-3-flash-preview"
}
]
},
"session": {
"dmScope": "per-channel-peer"
},
"tools": {
"profile": "coding"
}
}
openclaw gateway restart
openclaw models status
openclaw agent --agent main --message "Hello world!"