# Google AI Studio

> Configure googleaistudio deployments and understand provider-specific behavior.

URL: https://boelabs.com/en/docs/ai-gateway/providers-google
Language: English

## Configure a deployment

Send this body to `POST /admin/deployments` with an operator credential. Replace the example
credentials and choose a model available to your provider account. See
[Creating deployments](https://boelabs.com/docs/ai-gateway/creating-deployments) for the shared configuration fields.

```json
{ "publicModel": "gemini", "adapterKey": "googleaistudio", "upstreamModel": "gemini-3-pro", "credentials": { "apiKey": "..." } }
```

## Behavior and limitations

- **Credentials**: `apiKey` only.
- **Default transport**: `generateContent` for text and image operations, `generate_videos` for Veo
  video generation, and `embedContent`/`batchEmbedContents` for embeddings. Gemini Omni Flash must
  override `video.generate` to `interactions`.
- **Tool schemas are translated, not passed through.** Non-strict tools and pre-Gemini-3 models use
  Gemini's OpenAPI-shaped `parameters` field and its narrower schema translator. Gemini 3 and later
  models declare `capabilities.strictTools: true`; a request containing an OpenAI `strict: true`
  function uses `parametersJsonSchema` and Gemini's schema-constrained `VALIDATED` mode. Pre-Gemini-3
  models reject strict requests instead of silently downgrading them. This is generation-time
  enforcement; the gateway does not coerce arguments or retry a hidden repair request. Constructs
  outside Google's supported schema subset may still require a simpler tool definition.
- **Reasoning**: `gemini_level` (discrete `thinkingLevel`, with `xhigh` mapped to `high`) or
  `gemini_budget` (raw `thinkingBudget` tokens), per model — see [Reasoning](https://boelabs.com/docs/ai-gateway/reasoning).
- **Thought signatures round-trip statelessly inside the tool call id.** When Gemini returns a
  `thoughtSignature` on a function call, the gateway embeds it in the public tool call id as
  `<id>__thought__<signature>` (LiteLLM-compatible) across all three surfaces. Any client that echoes
  tool call ids verbatim — every standard OpenAI/Anthropic client, including the Vercel AI SDK —
  round-trips it with no changes and no server-side state. The signature is also mirrored as
  `provider_specific_fields.thought_signature` and `extra_content.google.thought_signature` on the
  rendered tool call, and all three inbound forms are accepted. See
  [Provider-specific fields](https://boelabs.com/docs/ai-gateway/provider-specific-fields).
- **Signatures on text responses round-trip on `/v1/responses`.** Gemini also signs responses that
  have no function call. When the request includes `reasoning.encrypted_content`, the gateway seals
  that state into a `reasoning` item at the end of the turn, which standard clients replay; on
  the next turn Gemini receives each signature on its own model turn. See
  [Provider-specific fields](https://boelabs.com/docs/ai-gateway/provider-specific-fields#gemini-signatures-on-text-responses-message-bound).
- **Embeddings** accept text input and float vectors only through this gateway — no tokenized input,
  no `base64` encoding — regardless of what the catalog profile might otherwise allow.
- **Image `quality` maps to native thinking** on the models that expose the control (Gemini 3.1 Flash
  Image and Flash Lite Image), which declare the rungs `low` (`thinkingLevel: minimal`) and `high`
  (`thinkingLevel: high`); other rungs snap onto those two. `auto` or an omitted quality sends no
  thinking level and Gemini's own default applies. Models without the control, such as Gemini 3 Pro
  Image, declare no rungs at all. See [Images](https://boelabs.com/docs/ai-gateway/images).
- **Veo** uses the Gemini `:predictLongRunning` REST flow. Image/video references must be data URLs
  because the REST request sends them as `inlineData`; multiple image references are forwarded as
  `referenceImages`, while `video_url` is used for Veo extension on models that declare it.
- **Gemini Omni Flash 1.1** uses the Interactions API for text-to-video, image-to-video,
  reference-to-video, edit, extend, and frame interpolation. The gateway runs interactions in the
  background, polls by interaction id, and fetches inline output into object storage without storing
  base64 in Postgres. Files API inputs, multi-turn `previous_interaction_id`, audio references, and
  URI-only 1080p/4K output are intentionally unsupported.
- Catalog: `src/adapters/google/catalog.json` (folder is `google`; adapter key is `googleaistudio` —
  the one place today those two names don't match).

## Next steps

- [Reasoning](https://boelabs.com/docs/ai-gateway/reasoning) — `gemini_level` / `gemini_budget` in detail.
- [Embeddings](https://boelabs.com/docs/ai-gateway/embeddings) — the reduced Google embedding contract.
- [Images](https://boelabs.com/docs/ai-gateway/images) — the quality-to-thinking mapping.
- [Videos](https://boelabs.com/docs/ai-gateway/videos) — the async video lifecycle and object storage.

