curl --location --request POST 'http://dev-cn.your-api-server.com/v1/embeddings' \
--header 'Authorization: Bearer $BAICHUNA_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "Baichuan-Text-Embedding",
"input": ["新年快乐", "百川大模型"]
}'
{
"data":[
{
"index":0,
"embedding":[
-0.019259492,
0.060714953,
-0.03308828,
0.02188026,
-0.0083048185,
-0.040358588,
...
],
"object":"embedding"
},
{
"index":1,
"embedding":[
0.009904957,
0.0043520057,
-0.0013257528,
0.03802269,
-0.011389915,
0.010124389,
...
],
"object":"embedding"
}
],
"model":"Baichuan-Text-Embedding",
"object":"list",
"usage":{
"prompt_tokens":14,
"total_tokens":14
}
}