Access to OpenAI models through Google Cloud is currently in private preview. To use them in your project, request access.
OpenAI models are available on the Gemini platform through Google Cloud, with usage billed to your Google Cloud account. The models run within Google Cloud’s security perimeter, and your organization manages access through Google Cloud IAM.
This guide covers how to make a Responses API request through Google Cloud and how feature support differs from the first-party OpenAI API.
The following models are available:
| Model | Model ID |
|---|---|
| GPT-6 Luna | gpt-6-luna |
| GPT-6.1 Sol | gpt-6.1-sol |
| GPT-6.1 Terra | gpt-6.1-terra |
| GPT-6 Astra | gpt-6-astra |
Before you begin
Before you can make requests, your Google Cloud administrator needs to:
- Enable billing for the project, arrange project approval, and coordinate acceptance of the Marketplace private offer with your billing administrator.
- Enable the Vertex AI API (
aiplatform.googleapis.com) and the model in Model Garden, including acceptance of the model terms. - If your organization’s policy restricts model access, allow the model in that policy.
- Grant the user or service account making requests permission to call the model, for example by assigning the
roles/aiplatform.userrole.
Once the project is ready, ask your administrator for the project ID.
Make your first API call
For local development, install the Google Cloud CLI and sign in with the Google account that has access to your project:
gcloud auth application-default login
Get an access token in the terminal where you’ll run the request:
export GOOGLE_CLOUD_ACCESS_TOKEN="$(gcloud auth application-default print-access-token)"
When the access token expires, run this command again to get a new one using your saved sign-in.
Send the request with cURL or the OpenAI SDK, replacing your-project-id with your project ID.
PROJECT_ID="your-project-id"
PROJECT_URL="https://aiplatform.googleapis.com/v1/projects/$PROJECT_ID"
curl --fail-with-body "$PROJECT_URL/locations/global/publishers/openai/v1/responses" \
-H "Authorization: Bearer $GOOGLE_CLOUD_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-6-luna",
"input": "Write a one-sentence bedtime story about a unicorn.",
"store": false
}'To get access tokens through Google’s authentication library instead of exporting them in your terminal, follow Google’s getting-started guide, which explains how to use Application Default Credentials (ADC) and troubleshoot API errors.
Feature availability
The table compares feature support on Google Cloud with the first-party OpenAI API.
| Capability | OpenAI API | Google Cloud |
|---|---|---|
API requests | ||
| Text generation | Available | Available |
| Streaming responses over HTTP (SSE) | Available | Available |
| Responses API endpoint | Available | Available |
| Response token usage | Available | Available |
| Input token count endpoint | Available | Not available |
| Realtime WebSocket connections | Available | Not available |
| Background requests | Available | Not available |
| Background stream resume | Available | Not available |
| Chat Completions API | Available | Not available |
| Batch processing | Available | Not available |
Output and reasoning | ||
| Structured outputs with JSON Schema | Available | Available |
| JSON mode | Available | Available |
| Reasoning effort | Available | Available |
| Encrypted reasoning | Available | Available |
| Reasoning summaries | Available | Not available |
Tools and integrations | ||
| Client-side function calling | Available | Available |
| Parallel tool calls | Available | Available |
| Structured function arguments | Available | Available |
| Custom tools | Available | Available with freeform input or regex constraints |
| Client-side tool search | Available | Available |
| Client-run MCP and namespaced tools | Available | Available |
| Client-side shell tool | Available | Available |
| Hosted web search | Available | Not available |
| Hosted file search and vector stores | Available | Not available |
| Hosted code execution | Available | Not available |
| Server-side remote MCP | Available | Not available |
Documents and media | ||
| PDF text extraction | Available | Available |
| Inline image input | Available | Available |
| Image generation | Available | Not available |
Conversation state | ||
| Saved conversation continuation | Available | Available |
| Stateless conversation continuation | Available | Available |
| Conversation compaction | Available | Available |
| Explicit prompt-cache controls | Available | Available |
Data retention
Your prompts and responses are not used to train OpenAI models. Default retention is up to 30 days.
If you require Zero Data Retention (ZDR), contact your OpenAI or Google Cloud representative during onboarding and wait for confirmation of support. Setting store: false on a request does not enable ZDR.