---
title: "Embed content (Gemini format)"
method: POST
path: "/genai/v1beta/models/{model}:embedContent"
tags: ["GenAI Integration"]
---

# Embed content (Gemini format)

`POST /genai/v1beta/models/{model}:embedContent`

Creates embeddings using Google Gemini API format.

## Path parameters

- `model` string, required

## Request body

- GeminiEmbeddingRequest
  - `model` string
  - `content` GeminiContent
    - `role` 'user' | 'model' — The producer of the content. Must be either 'user' or 'model'
    - `parts` GeminiPart[] — List of parts that constitute a single message
      - `text` string — Text part (can be code)
      - `thought` boolean — Indicates if the part is thought from the model
      - `thoughtSignature` string, byte — Opaque signature for thought that can be reused in subsequent requests
      - `inlineData` object
        - `mimeType` string — The IANA standard MIME type of the source data
        - `data` string, byte — Base64-encoded raw bytes
        - `displayName` string — Display name of the blob (not currently used in GenerateContent calls)
      - `fileData` object
        - `mimeType` string — The IANA standard MIME type of the source data
        - `fileUri` string — URI of the file
        - `displayName` string — Display name of the file data
      - `functionCall` object
        - `id` string — Unique ID of the function call. If populated, client should return response with matching id
        - `name` string — The name of the function to call. Matches FunctionDeclaration.name
        - `args` object — Function parameters and values in JSON object format
      - `functionResponse` object
        - `id` string — ID of the function call this response is for. Matches FunctionCall.id
        - `name` string — The name of the function. Matches FunctionDeclaration.name and FunctionCall.name
        - `response` object — Function response in JSON object format. Use "output" key for output and "error" key for error details
        - `willContinue` boolean — Signals that function call continues (NON_BLOCKING only). If false, future responses will not be considered
        - `scheduling` string — How the response should be scheduled (NON_BLOCKING only). Defaults to WHEN_IDLE
      - `executableCode` object
        - `language` string — Programming language of the code
        - `code` string — The code to be executed
      - `codeExecutionResult` object
        - `outcome` 'OUTCOME_UNSPECIFIED' | 'OUTCOME_OK' | 'OUTCOME_FAILED' | 'OUTCOME_DEADLINE_EXCEEDED' — Outcome of the code execution
        - `output` string — Contains stdout when successful, stderr or other description otherwise
      - `videoMetadata` object
        - `fps` number — Frame rate of the video. Range is (0.0, 24.0]
        - `startOffset` string — Start offset of the video
        - `endOffset` string — End offset of the video
  - `taskType` string
  - `title` string
  - `outputDimensionality` integer

## Response `200`

Successful response

- GeminiEmbeddingResponse
  - `embeddings` object[]
    - `values` number[]
    - `statistics` object
      - `tokenCount` integer
  - `metadata` object
    - `billableCharacterCount` integer

## Other responses

- `400` — Bad request
- `500` — Internal server error

---

[API](https://skmtc.net/getbifrost/apis/bifrost-api.md) · [All operations](https://skmtc.net/getbifrost/apis/bifrost-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/getbifrost/bifrost-api/versions/f8cab88f64ea/schema)
