Comment on page
🧿
Embeddings
Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms.
Creates an embedding vector representing the input text.
Example request
1
curl https://api.eye-ai.com/v1/embeddings \
2
-X POST \
3
-H "Authorization: Bearer YOUR_API_KEY" \
4
-H "Content-Type: application/json" \
5
-d '{"input": "The food was delicious and the waiter...",
6
"model": "text-similarity-babbage-001"}'
7
Parameters
1
{
2
"model": "text-similarity-babbage-001",
3
"input": "The food was delicious and the waiter..."
4
}
5
Response
1
{
2
"object": "list",
3
"data": [
4
{
5
"object": "embedding",
6
"embedding": [
7
0.018990106880664825,
8
-0.0073809814639389515,
9
.... (1024 floats total for ada)
10
0.021276434883475304,
11
],
12
"index": 0
13
}
14
],
15
"usage": {
16
"prompt_tokens": 8,
17
"total_tokens": 8
18
}
19
}
20
Last modified 11mo ago