Skip to Content
goldflow.cc Docs
Audio & MoreOther Capabilities

Gemini 原生向量生成

POST
/v1beta/models/{model}:embedContent

Gemini Embedding 原生格式,支持 gemini-embedding-001 和 gemini-embedding-2。媒体能力按模型与渠道支持确认,不能使用 generateContent 聊天格式。

Authorization

bearerAuth
headerAuthorizationBearer <API key>

使用 Authorization Bearer API Key 进行鉴权。

Path Parameters

model*string

Gemini 兼容接口路径中的模型 ID。

Request Body

application/json
  1. body
content*
taskType?string
outputDimensionality?integer

Response Body

原生向量结果。

application/json
  1. response
embedding?
Example Request
curl -X POST 'https://goldflow.cc/v1beta/models/gemini-2.5-flash:embedContent' \  -H 'Content-Type: application/json' \  -d '{  "content": {    "parts": [      {        "text": "A quiet garden"      }    ]  }}'
Example Response
{  "embedding": {    "values": [      0    ]  }}