Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms.
cURL
curl --request POST \ --url https://api.anyapi.ai/v1/embeddings \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "input": "The food was delicious and the waiter...", "model": "text-embedding-ada-002", "encoding_format": "float" }'
{ "object": "list", "data": [ { "object": "embedding", "embedding": [ 123 ], "index": 123 } ], "model": "<string>", "usage": { "prompt_tokens": 123, "completion_tokens": 123, "total_tokens": 123 } }
Bearer token authentication. Get your API key from the dashboard.
Successful response
The response is of type object.
object