{
"embedding": {
"values": [
0.1,
0.2
]
}
}API reference
Gemini single embedding
Native content.parts input and embedding.values output.
{
"embedding": {
"values": [
0.1,
0.2
]
}
}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
GeminiApiKeyBearerAuth
网关令牌 / Gateway token
Path Parameters
Body
application/json
Response
读取业务字段,不只检查 HTTP 状态 / Validate business fields, not only HTTP status.
Show child attributes
Show child attributes