BAAI general embedding (Small) model that transforms any given text into a 384-dimensional vector
curl https://api.aigateway.sh/v1/embeddings \
-H "Authorization: Bearer $AIGATEWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"baai/bge-small-en-v1.5","input":"hello"}'{
"model": "baai/bge-small-en-v1.5",
"input": "Text to embed, or an array of strings for batch."
}{
"object": "list",
"data": [
{
"object": "embedding",
"index": 0,
"embedding": [0.0123, -0.0456, 0.0789, /* ... */]
}
],
"model": "baai/bge-small-en-v1.5",
"usage": { "prompt_tokens": 5, "total_tokens": 5 }
}from openai import OpenAI client = OpenAI(base_url="https://api.aigateway.sh/v1", api_key="sk-aig-...") r = client.embeddings.create(model="baai/bge-small-en-v1.5", input="hello world") print(r.data[0].embedding[:5])