Gemini AI Studio icon

Gemini AI Studio

Use the Google Gemini API through direct AI Studio REST calls

Actions16

Embedding → Batch Embed Contents

AI-generated

Summary

Generate multiple embeddings for a batch of input texts using the specified Gemini embedding model.

Inputs

  • Model (required) — Embedding model ID or resource name to generate embeddings.
  • Batch Input Mode (required) — Mode to provide input texts: as a simple text list (one text per line), a JSON array of texts, or a raw JSON request body.
  • Texts / Texts (JSON Array) / Raw Request Body (JSON) (required) — The input texts to embed, either as a multiline string, JSON array, or full raw request JSON depending on the chosen input mode.
  • Options — Optional embedding generation settings including output vector dimensionality, task type (such as semantic similarity or classification), and an optional title for retrieval-document embeddings.

Output shape

a single item containing a JSON object with the model name, an array of embedding vectors corresponding to each input text, and the full API response.

The response JSON includes an "embeddings" array with one embedding object per input text. Each embedding object has a numeric "values" array representing the embedding vector.

Links

Discussion