星海智算开发文档

生成文本向量

接口参考来自当前平台公开协议。具体模型的模式和规格请在模型详情中确认。

POST/v1/embeddings

身份认证

bearerAuth
认证方式Bearer <token>

传入位置: header

请求头参数

X-Client-Request-Id?string

可选客户端关联值,只能包含可见 ASCII,最多 512 字节;不能替代服务端 requestId。

长度length <= 512

请求正文

application/json

响应正文

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

{  "data": [    {      "embedding": [        0      ],      "index": 0,      "object": "string"    }  ],  "model": "string",  "object": "string",  "usage": {    "completion_tokens": 0,    "prompt_tokens": 0,    "total_tokens": 0  }}