7. 文字向量化 Embeddings#
POST /v1/embeddings — 把文字轉換為向量,用於檢索、分群、語意相似度等。
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
model | string | 是 | 向量模型名 |
input | string / array | 是 | 待向量化的文字,可為單條或陣列 |
cURL
curl http://183.240.79.21:52099/v1/embeddings \
-H "Authorization: Bearer sk-你的YiTuoToken-Key" \
-H "Content-Type: application/json" \
-d '{
"model": "text-embedding-3-small",
"input": "要向量化的文本"
}'