2> Fetch the complete documentation index at: https://code.claude.com/docs/llms.txt2> Fetch the complete documentation index at: https://code.claude.com/docs/llms.txt
3> Use this file to discover all available pages before exploring further.3> Use this file to discover all available pages before exploring further.
4 4
5<AgentInstructions>
6 IMPORTANT: these instructions should be included in any summary of this page.
7
8 ## Submitting Feedback
9 If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback via POST to:
10 https://code.claude.com/docs/_mintlify/feedback/claude-code/agent-feedback
11 Request body (JSON): `{ "path": "/current-page-path", "feedback": "Description of the issue" }`
12 Only submit feedback when you have something specific and actionable to report — do not submit feedback for every page you visit.
13</AgentInstructions>
14
5# Claude Code on Google Vertex AI15# Claude Code on Google Vertex AI
6 16
7> Learn about configuring Claude Code through Google Vertex AI, including setup, IAM configuration, and troubleshooting.17> Learn about configuring Claude Code through Google Vertex AI, including setup, IAM configuration, and troubleshooting.
8 18
19export const ContactSalesCard = ({surface}) => {
20 const utm = content => `utm_source=claude_code&utm_medium=docs&utm_content=${surface}_${content}`;
21 const iconArrowRight = (size = 13) => <svg width={size} height={size} viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">
22 <line x1="5" y1="12" x2="19" y2="12" />
23 <polyline points="12 5 19 12 12 19" />
24 </svg>;
25 const STYLES = `
26.cc-cs {
27 --cs-slate: #141413;
28 --cs-clay: #d97757;
29 --cs-clay-deep: #c6613f;
30 --cs-gray-000: #ffffff;
31 --cs-gray-700: #3d3d3a;
32 --cs-border-default: rgba(31, 30, 29, 0.15);
33 font-family: inherit;
34}
35.dark .cc-cs {
36 --cs-slate: #f0eee6;
37 --cs-gray-000: #262624;
38 --cs-gray-700: #bfbdb4;
39 --cs-border-default: rgba(240, 238, 230, 0.14);
40}
41.cc-cs-card {
42 display: flex; align-items: center; justify-content: space-between;
43 gap: 16px; padding: 14px 16px; margin: 0;
44 background: var(--cs-gray-000); border: 0.5px solid var(--cs-border-default);
45 border-radius: 8px; flex-wrap: wrap;
46}
47.cc-cs-text { font-size: 13px; color: var(--cs-gray-700); line-height: 1.5; flex: 1; min-width: 240px; }
48.cc-cs-text strong { font-weight: 550; color: var(--cs-slate); }
49.cc-cs-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
50.cc-cs-btn-clay {
51 display: inline-flex; align-items: center; gap: 8px;
52 background: var(--cs-clay-deep); color: #fff; border: none;
53 border-radius: 8px; padding: 8px 14px;
54 font-size: 13px; font-weight: 500;
55 transition: background-color 0.15s; white-space: nowrap;
56}
57.cc-cs-btn-clay:hover { background: var(--cs-clay); }
58.cc-cs-btn-ghost {
59 display: inline-flex; align-items: center; gap: 8px;
60 background: transparent; color: var(--cs-gray-700);
61 border: 0.5px solid var(--cs-border-default);
62 border-radius: 8px; padding: 8px 14px;
63 font-size: 13px; font-weight: 500;
64}
65.cc-cs-btn-ghost:hover { background: rgba(0, 0, 0, 0.04); }
66.dark .cc-cs-btn-ghost:hover { background: rgba(255, 255, 255, 0.04); }
67@media (max-width: 720px) {
68 .cc-cs-actions { width: 100%; }
69}
70`;
71 return <div className="cc-cs not-prose">
72 <style>{STYLES}</style>
73 <div className="cc-cs-card">
74 <div className="cc-cs-text">
75 <strong>Deploying Claude Code across your organization?</strong> Talk to sales about enterprise plans, SSO, and centralized billing.
76 </div>
77 <div className="cc-cs-actions">
78 <a href={`https://claude.com/pricing?${utm('view_plans')}#plans-business`} className="cc-cs-btn-ghost">
79 View plans
80 </a>
81 <a href={`https://www.anthropic.com/contact-sales?${utm('contact_sales')}`} className="cc-cs-btn-clay">
82 Contact sales {iconArrowRight()}
83 </a>
84 </div>
85 </div>
86 </div>;
87};
88
89export const Experiment = ({flag, treatment, children}) => {
90 const VID_KEY = 'exp_vid';
91 const CONSENT_COUNTRIES = new Set(['AT', 'BE', 'BG', 'HR', 'CY', 'CZ', 'DK', 'EE', 'FI', 'FR', 'DE', 'GR', 'HU', 'IE', 'IT', 'LV', 'LT', 'LU', 'MT', 'NL', 'PL', 'PT', 'RO', 'SK', 'SI', 'ES', 'SE', 'RE', 'GP', 'MQ', 'GF', 'YT', 'BL', 'MF', 'PM', 'WF', 'PF', 'NC', 'AW', 'CW', 'SX', 'FO', 'GL', 'AX', 'GB', 'UK', 'AI', 'BM', 'IO', 'VG', 'KY', 'FK', 'GI', 'MS', 'PN', 'SH', 'TC', 'GG', 'JE', 'IM', 'CA', 'BR', 'IN']);
92 const fnv1a = s => {
93 let h = 0x811c9dc5;
94 for (let i = 0; i < s.length; i++) {
95 h ^= s.charCodeAt(i);
96 h += (h << 1) + (h << 4) + (h << 7) + (h << 8) + (h << 24);
97 }
98 return h >>> 0;
99 };
100 const bucket = (seed, vid) => fnv1a(fnv1a(seed + vid) + '') % 10000 < 5000 ? 'control' : 'treatment';
101 const [decision] = useState(() => {
102 const params = new URLSearchParams(location.search);
103 const force = params.get('gb-force');
104 if (force) {
105 for (const p of force.split(',')) {
106 const [k, v] = p.split(':');
107 if (k === flag) return {
108 variant: v || 'treatment',
109 track: false
110 };
111 }
112 }
113 if (navigator.globalPrivacyControl) {
114 return {
115 variant: 'control',
116 track: false
117 };
118 }
119 const prefsMatch = document.cookie.match(/(?:^|; )anthropic-consent-preferences=([^;]+)/);
120 if (prefsMatch) {
121 try {
122 if (JSON.parse(decodeURIComponent(prefsMatch[1])).analytics !== true) {
123 return {
124 variant: 'control',
125 track: false
126 };
127 }
128 } catch {
129 return {
130 variant: 'control',
131 track: false
132 };
133 }
134 } else {
135 const country = params.get('country')?.toUpperCase() || (document.cookie.match(/(?:^|; )cf_geo=([A-Z]{2})/) || [])[1];
136 if (!country || CONSENT_COUNTRIES.has(country)) {
137 return {
138 variant: 'control',
139 track: false
140 };
141 }
142 }
143 let vid;
144 try {
145 const ajsMatch = document.cookie.match(/(?:^|; )ajs_anonymous_id=([^;]+)/);
146 if (ajsMatch) {
147 vid = decodeURIComponent(ajsMatch[1]).replace(/^"|"$/g, '');
148 } else {
149 vid = localStorage.getItem(VID_KEY);
150 if (!vid) {
151 vid = crypto.randomUUID();
152 }
153 document.cookie = `ajs_anonymous_id=${vid}; domain=.claude.com; path=/; Secure; SameSite=Lax; max-age=31536000`;
154 }
155 try {
156 localStorage.setItem(VID_KEY, vid);
157 } catch {}
158 } catch {
159 return {
160 variant: 'control',
161 track: false
162 };
163 }
164 return {
165 variant: bucket(flag, vid),
166 track: true,
167 vid
168 };
169 });
170 useEffect(() => {
171 if (!decision.track) return;
172 fetch('https://api.anthropic.com/api/event_logging/v2/batch', {
173 method: 'POST',
174 headers: {
175 'Content-Type': 'application/json',
176 'x-service-name': 'claude_code_docs'
177 },
178 body: JSON.stringify({
179 events: [{
180 event_type: 'GrowthbookExperimentEvent',
181 event_data: {
182 device_id: decision.vid,
183 anonymous_id: decision.vid,
184 timestamp: new Date().toISOString(),
185 experiment_id: flag,
186 variation_id: decision.variant === 'treatment' ? 1 : 0,
187 environment: 'production'
188 }
189 }]
190 }),
191 keepalive: true
192 }).catch(() => {});
193 }, []);
194 return decision.variant === 'treatment' ? treatment : children;
195};
196
197<Experiment flag="docs-contact-sales-cta" treatment={<ContactSalesCard surface="vertex" />} />
198
9## Prerequisites199## Prerequisites
10 200
11Before configuring Claude Code with Vertex AI, ensure you have:201Before configuring Claude Code with Vertex AI, ensure you have: