LinkexLinkex Docs
API ReferenceGeneratedGemini

Gemini 嵌入(Embeddings)

POST
/v1/engines/{model}/embeddings

使用指定引擎/模型创建嵌入

Authorization

BearerAuth
AuthorizationBearer <token>

使用 Bearer Token 认证。 格式: Authorization: Bearer sk-xxxxxx

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,    "total_tokens": 0  }}