Skip to main content
POST
/
v1
/
embeddings
创建嵌入
curl --request POST \
  --url https://aiapi.xiaoliu.fun/v1/embeddings \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "<string>",
  "input": "<string>"
}
'
{
  "object": "<string>",
  "data": [
    {
      "embedding": [
        123
      ],
      "index": 123,
      "object": "<string>"
    }
  ],
  "model": "<string>",
  "usage": {}
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
model
string
required

模型名称

input
string
required

要转化的文本

Response

200 - application/json

成功响应

object
string
data
object[]
model
string
usage
object