Skip to content

创建嵌入请求

Creates an embedding vector representing the input text.

http
POST https://api.woagent.net/embeddings

Authorizations

Authorization string header required

Use the following format for authentication: Bearer <your api key>

Body

application/json

model enum<string> default:BAAI/bge-large-zh-v1.5 required

Corresponding Model Name. To better enhance service quality, we will make periodic changes to the models provided by this service, including but not limited to model on/offlining and adjustments to model service capabilities. We will notify you of such changes through appropriate means such as announcements or message pushes where feasible.

Available options: BAAI/bge-large-zh-v1.5, BAAI/bge-large-en-v1.5, netease-youdao/bce-embedding-base_v1, BAAI/bge-m3, Pro/BAAI/bge-m3, Qwen/Qwen3-Embedding-8B, Qwen/Qwen3-Embedding-4B, Qwen/Qwen3-Embedding-0.6B

Example: "BAAI/bge-large-zh-v1.5"


input string default:Silicon flow embedding online: fast, affordable, and high-quality embedding services. come try it out! required

Input text to embed must be provided as a string or an array of tokens. To process multiple inputs in a single request, pass an array of strings or an array of token arrays. The input length must not exceed the model's maximum token limit and should not be an empty string.

The maximum input tokens for each model are as follows:

BAAI/bge-large-zh-v1.5, BAAI/bge-large-en-v1.5, netease-youdao/bce-embedding-base_v1: 512

BAAI/bge-m3, Pro/BAAI/bge-m3: 8192

Qwen/Qwen3-Embedding-8B, Qwen/Qwen3-Embedding-4B, Qwen/Qwen3-Embedding-0.6B: 32768

The string that will be turned into an embedding. the item must not exceed the max models tokens limitation.

Example: "Silicon flow embedding online: fast, affordable, and high-quality embedding services. come try it out!"


encoding_format enum<string> default:float

"The format to return the embeddings in. Can be either float or base64."

Available options: float, base64

Example: "float"


dimensions integer

The number of dimensions the resulting output embeddings should have. Only supported in Qwen/Qwen3 series. - Qwen/Qwen3-Embedding-8B: [64,128,256,512,768,1024,2048,4096] - Qwen/Qwen3-Embedding-4B: [64,128,256,512,768,1024,2048] - Qwen/Qwen3-Embedding-0.6B: [64,128,256,512,768,1024]

Example: 1024

Response

200 application/json

200

object enum<string> required

The object type, which is always "list".


model string required

The name of the model used to generate the embedding.


data object[] required

The list of embeddings generated by the model.

Hide child attributes

object enum<string> required

Available options: embedding

embedding number[] required

index integer required


usage object required

The usage information for the request.

Hide child attributes

usage.prompt_tokens integer required

The number of tokens used by the prompt.

usage.completion_tokens integer required

The number of tokens used by the completion.

usage.total_tokens integer required

The total number of tokens used by the request.