文本嵌入(Embeddings)¶
兼容 OpenAI Embeddings API,将文本转换为向量表示。
端点¶
请求示例¶
curl https://www.lalc.ltd/v1/embeddings \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $LALC_API_KEY" \
-d '{
"model": "text-embedding-3-small",
"input": "LALC 是一个 AI 接口聚合平台"
}'
参数¶
| 参数 | 类型 | 必需 | 说明 |
|---|---|---|---|
model |
string | 是 | 嵌入模型名称 |
input |
string/array | 是 | 要嵌入的文本(单条或批量) |
encoding_format |
string | 否 | 返回格式(float / base64) |