Create embeddings
Creates an embedding vector representing the input text.
POST
/
embeddings
Copy
curl --request POST \
--url https://api.ap.siliconflow.com/v1/embeddings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "BAAI/bge-large-zh-v1.5",
"input": "Silicon flow embedding online: fast, affordable, and high-quality embedding services. come try it out!",
"encoding_format": "float"
}'
Copy
{
"model": "<string>",
"data": [
{
"object": "embedding",
"embedding": [
123
],
"index": 123
}
],
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123
}
}
Authorizations
Use the following format for authentication: Bearer <your api key>
Body
application/json
Response
200
application/json
200
The response is of type object
.
Copy
curl --request POST \
--url https://api.ap.siliconflow.com/v1/embeddings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "BAAI/bge-large-zh-v1.5",
"input": "Silicon flow embedding online: fast, affordable, and high-quality embedding services. come try it out!",
"encoding_format": "float"
}'
Copy
{
"model": "<string>",
"data": [
{
"object": "embedding",
"embedding": [
123
],
"index": 123
}
],
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123
}
}
Assistant
Responses are generated using AI and may contain mistakes.