Skip to content

Embeddings

Embeddings 接口用于把文本转换为向量,常用于搜索、召回、聚类和 RAG。

http
POST https://ccwai.tech/v1/embeddings
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

请求示例

bash
curl https://ccwai.tech/v1/embeddings \
  -H "Authorization: Bearer $CCWAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "text-embedding-3-small",
    "input": [
      "CCWAI 提供统一 API 接入。",
      "向量检索可以用于知识库问答。"
    ]
  }'

常用字段

字段说明
modelEmbedding 模型名称
input单条文本或文本数组

注意事项

Embedding 模型和对话模型通常不是同一类模型。请在模型列表中确认模型用途。

CCWAI 用户文档