Feature extraction using Inference API error

I had this same issue. It appears in the model hub some of the sentence-transformer API endpoints are set up for sentence similarity while others are set up for feature extraction. Passing the query as you have there to a sentence similarity endpoint results in an error. Try using a different model with a feature extraction endpoint like: Craig/paraphrase-MiniLM-L6-v2 or julien-c/distilbert-feature-extraction