Gemini Embeddings API

Create embeddings for text

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/gemini-embeddings-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

gemini-embeddings-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Google Gemini Embeddings API
  description: 'REST API for Google Gemini generative AI models. Supports text generation,

    chat, multimodal input, embeddings, file management, token counting,

    and batch operations. Authenticated with an API key from Google AI Studio.

    '
  version: v1beta
  contact:
    name: Gemini API Documentation
    url: https://ai.google.dev/api
servers:
- url: https://generativelanguage.googleapis.com
  description: Production
security:
- apiKeyQuery: []
- apiKeyHeader: []
tags:
- name: Embeddings
  description: Create embeddings for text
paths:
  /v1beta/models/{model}:embedContent:
    post:
      tags:
      - Embeddings
      summary: Embed content
      operationId: embedContent
      parameters:
      - $ref: '#/components/parameters/Model'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmbedContentRequest'
      responses:
        '200':
          description: Embedding result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmbedContentResponse'
  /v1beta/models/{model}:batchEmbedContents:
    post:
      tags:
      - Embeddings
      summary: Batch embed contents
      operationId: batchEmbedContents
      parameters:
      - $ref: '#/components/parameters/Model'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                requests:
                  type: array
                  items:
                    $ref: '#/components/schemas/EmbedContentRequest'
      responses:
        '200':
          description: Batched embeddings
          content:
            application/json:
              schema:
                type: object
                properties:
                  embeddings:
                    type: array
                    items:
                      $ref: '#/components/schemas/ContentEmbedding'
components:
  schemas:
    ContentEmbedding:
      type: object
      properties:
        values:
          type: array
          items:
            type: number
    Part:
      type: object
      properties:
        text:
          type: string
        inlineData:
          type: object
          properties:
            mimeType:
              type: string
            data:
              type: string
              format: byte
        fileData:
          type: object
          properties:
            mimeType:
              type: string
            fileUri:
              type: string
    EmbedContentResponse:
      type: object
      properties:
        embedding:
          $ref: '#/components/schemas/ContentEmbedding'
    EmbedContentRequest:
      type: object
      required:
      - content
      properties:
        content:
          $ref: '#/components/schemas/Content'
        taskType:
          type: string
        title:
          type: string
        outputDimensionality:
          type: integer
    Content:
      type: object
      properties:
        role:
          type: string
          enum:
          - user
          - model
          - system
        parts:
          type: array
          items:
            $ref: '#/components/schemas/Part'
  parameters:
    Model:
      name: model
      in: path
      required: true
      description: Model identifier (e.g. "gemini-1.5-pro")
      schema:
        type: string
  securitySchemes:
    apiKeyQuery:
      type: apiKey
      in: query
      name: key
      description: Gemini API key from Google AI Studio
    apiKeyHeader:
      type: apiKey
      in: header
      name: x-goog-api-key
      description: Gemini API key passed via header