For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
Primary navigation
Theme

OpenAI on Google Cloud

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.user role.

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.

Responses API request on Google Cloud
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.

CapabilityOpenAI APIGoogle Cloud

API requests

Text generationAvailableAvailable
Streaming responses over HTTP (SSE)AvailableAvailable
Responses API endpointAvailableAvailable
Response token usageAvailableAvailable
Input token count endpointAvailableNot available
Realtime WebSocket connectionsAvailableNot available
Background requestsAvailableNot available
Background stream resumeAvailableNot available
Chat Completions APIAvailableNot available
Batch processingAvailableNot available

Output and reasoning

Structured outputs with JSON SchemaAvailableAvailable
JSON modeAvailableAvailable
Reasoning effortAvailableAvailable
Encrypted reasoningAvailableAvailable
Reasoning summariesAvailableNot available

Tools and integrations

Client-side function callingAvailableAvailable
Parallel tool callsAvailableAvailable
Structured function argumentsAvailableAvailable
Custom toolsAvailableAvailable with freeform input or regex constraints
Client-side tool searchAvailableAvailable
Client-run MCP and namespaced toolsAvailableAvailable
Client-side shell toolAvailableAvailable
Hosted web searchAvailableNot available
Hosted file search and vector storesAvailableNot available
Hosted code executionAvailableNot available
Server-side remote MCPAvailableNot available

Documents and media

PDF text extractionAvailableAvailable
Inline image inputAvailableAvailable
Image generationAvailableNot available

Conversation state

Saved conversation continuationAvailableAvailable
Stateless conversation continuationAvailableAvailable
Conversation compactionAvailableAvailable
Explicit prompt-cache controlsAvailableAvailable

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.