POST
/
embeddings
Create Embeddings
curl --request POST \
  --url https://api.siliconflow.com/v1/embeddings \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "Qwen/Qwen3-Embedding-8B",
  "input": "Silicon flow embedding online: fast, affordable, and high-quality embedding services. come try it out!"
}'
{
  "model": "<string>",
  "data": [
    {
      "object": "embedding",
      "embedding": [
        123
      ],
      "index": 123
    }
  ],
  "usage": {
    "prompt_tokens": 123,
    "completion_tokens": 123,
    "total_tokens": 123
  }
}

Authorizations

Authorization
string
header
required

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

Body

application/json
model
enum<string>
default:Qwen/Qwen3-Embedding-8B
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:
Qwen/Qwen3-Embedding-8B,
Qwen/Qwen3-Embedding-4B,
Qwen/Qwen3-Embedding-0.6B
Example:

"Qwen/Qwen3-Embedding-8B"

input
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: 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

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.

usage
object
required

The usage information for the request.