Skip to main content
POST /v1beta/models/{model}:embedContent Send content.parts with text parts; read embedding.values. Use a bare path model ID. The gateway maps the path model and rewrites body model values. taskType, title, and outputDimensionality depend on the model. Empty input is outside the example. This is neither SSE nor asynchronous Batch. See native embeddings. 阅读中文版

Authorizations

x-goog-api-key
string
header
required

网关令牌 / Gateway token

Path Parameters

model
string
required

Body

application/json
content
object
required
model
string

models/ 前缀的模型名 / Model name prefixed with models/

taskType
string
title
string
outputDimensionality
integer
Required range: x >= 1

Response

读取业务字段,不只检查 HTTP 状态 / Validate business fields, not only HTTP status.

embedding
object
required