Create embeddings
Changed onThis endpoint follows the OpenAI API format for generating vector embeddings from input text. The handler receives pre-processed metadata from middleware and forwards the request to the selected node.
Returns
- Ok(Response) - The embeddings response from the processing node
- Err(AtomaProxyError) - An error status code if any step fails
Errors
- INTERNAL_SERVER_ERROR - Processing or node communication failures
Request
- Base URLhttps://api.atoma.network
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"encoding_format": "float",
"input": "The quick brown fox jumped over the lazy dog",
"model": "intfloat/multilingual-e5-large-instruct",
"user": "user-1234"
}Response
Embeddings generated successfully
Example response
{
"data": [
{
"object": "embedding"
}
],
"model": "intfloat/multilingual-e5-large-instruct",
"object": "list",
"usage": {
"prompt_tokens": 8,
"total_tokens": 8
}
}Changes
- breaking
added the new required request property
- breaking
added the new required request property
- breaking
the request's body type changed from no type to
object - breaking
the response's body type changed from no type to
objectfor status - info
api operation id
embeddings_handlerremoved and replaced withembeddings_create - info
the endpoint scheme security
bearerAuthwas added to the API - info
added the new optional request property
- info
added the new optional request property
- info
added the new optional request property
- info
added the required property
to the response with the status - info
added the required property
to the response with the status - info
added the required property
to the response with the status - info
added the required property
to the response with the status
- breaking
- info
api tag
Embeddingsadded
- info