跳转到主要内容
POST /v1beta/models/{model}:embedContent 发送 content.parts,每个文本 part 使用 text;返回 embedding.values。 路径 model 使用裸 ID。网关会按路径模型映射并改写请求模型。taskType、title、outputDimensionality 支持依模型而定,不接受空输入作为有效示例。不是 SSE 或异步 Batch;更多边界和可运行示例见原生向量指南。 Read in English

授权

x-goog-api-key
string
header
必填

网关令牌 / Gateway token

路径参数

model
string
必填

请求体

application/json
content
object
必填
model
string

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

taskType
string
title
string
outputDimensionality
integer
必填范围: x >= 1

响应

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

embedding
object
必填