音频与其他其他能力
Gemini 嵌入(Embeddings)
使用指定引擎/模型创建嵌入
使用指定引擎/模型创建嵌入
Authorization
bearerAuth AuthorizationBearer <token>
使用 Authorization Bearer API Key 进行鉴权。
In: header
Path Parameters
model*string
模型/引擎 ID
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/v1/engines//embeddings" \ -H "Content-Type: application/json" \ -d '{ "model": "text-embedding-ada-002", "input": "string" }'{
"object": "list",
"data": [
{
"object": "embedding",
"index": 0,
"embedding": [
0
]
}
],
"model": "string",
"usage": {
"prompt_tokens": 0,
"completion_tokens": 0,
"total_tokens": 0,
"input_tokens": 0,
"output_tokens": 0
}
}