Vectors in the OpenAI format.
POST /v1/embeddings takes one text or a list and returns the vectors in the same order. Your call with the OpenAI library stays the same; only the base URL and the model name change.
List of numbers or Base64.
With encoding_format you choose between float and base64. Base64 is the compact form: the vectors as little-endian float32, the way the OpenAI libraries expect them.
curl https://api.flowmodels.one/v1/embeddings \
-H "Authorization: Bearer $FLOWMODELS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "ionos/BAAI/bge-m3",
"input": ["Oak dining table", "Chair with armrests"],
"encoding_format": "float",
"dimensions": 256
}'
{
"object": "list",
"data": [
{ "object": "embedding", "embedding": [0.0123, -0.0456, 0.0789], "index": 0 },
{ "object": "embedding", "embedding": [-0.0312, 0.0654, 0.0098], "index": 1 }
],
"model": "ionos/BAAI/bge-m3",
"usage": {
"prompt_tokens": 14,
"total_tokens": 14,
"cost": "<euros>",
"currency": "EUR"
}
}