ModelSell Docs
Audio & MoreOther Capabilities

Gemini 原生向量生成

POST
/v1beta/models/{model}:embedContent

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

Authorization

bearerAuth
AuthorizationBearer <token>

使用 Authorization Bearer API Key 进行鉴权。

In: header

Path Parameters

model*string

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

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/v1beta/models/gemini-2.5-flash:embedContent" \  -H "Content-Type: application/json" \  -d '{    "content": {      "parts": [        {          "text": "A quiet garden"        }      ]    }  }'
{
  "embedding": {
    "values": [
      0
    ]
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "request_id": "string"
  }
}