Embeddings
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
modelstringRequiredExample:
Text Embedding 3 Largeinputone ofOptional
Input text to get embeddings for.
stringOptionalExample:
The food was delicious and the waiter...string[]OptionalExample:
["The food was delicious","The waiter was friendly"]integer[]OptionalExample:
[1,2,3,4,5]encoding_formatstring · enumOptionalDefault:
The format to return the embeddings in. Can be either float or base64.
floatPossible values: dimensionsinteger · min: 1OptionalExample:
The number of dimensions the resulting output embeddings should have. Only supported in text-embedding-3 and later models.
1536Responses
200
Represents an embedding response returned by model, based on the provided input.
application/json
objectstringOptionalExample:
The object type, which is always "list"
listmodelstringOptional
The model used for generating embeddings
400
Invalid request data.
402
The company has run out of AI credits. Returned when the company's budget limit has been reached.
application/json
500
Server error.
post/v1/embeddings
POST /v1/embeddings HTTP/1.1
Host: api.nexos.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 98
{
"model": "Text Embedding 3 Large",
"input": "There are three letters 'r' in the word 'strawberry'."
}{
"object": "list",
"data": [
{
"object": "embedding",
"embedding": [
0.0023064255,
-0.009327292
],
"index": 0
}
],
"model": "text",
"usage": {
"prompt_tokens": 8,
"total_tokens": 8,
"nexos_credits_cost": 0.000016
}
}Last updated

