Creates an embedding vector representing the input text.

Log in to see full request history
Body Params
string
required

The name of the embedding model to use.要使用的 embedding 模型名称。

required
Defaults to 硅基流动embedding上线,多快好省的 embedding 服务,快来试试吧

Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays. The input must not exceed the max input tokens for the model (512 tokens for all models except BAAI/bge-m3 which is 8192), cannot be an empty string.
输入的文本将被编码为字符串或 tokens 数组。要在单个请求中嵌入多个输入,请传递字符串数组或字符串数组。每个字符串不得超过模型的最大 tokens 限制(BAAI/bge-m3模型为8192tokens,其余模型为512tokens),且不能为空字符串。

string
Defaults to float

"The format to return the embeddings in. Can be either float or base64. 返回嵌入的格式。可以是 float 或 base64."

Responses

Response body
object
string
required

The object type, which is always "list".

list

string
required

The name of the model used to generate the embedding.

data
array of objects
required

The list of embeddings generated by the model.

data*
object
string
required

embedding

embedding
array of numbers
required
embedding*
integer
required
usage
object
required

The usage information for the request.

integer
required

The number of tokens used by the prompt.

integer
required

The number of tokens used by the completion.

integer
required

The total number of tokens used by the request.

Language
Credentials