Can one get embeddings from an inference API that computes Sentence Similarity (in 2023)?

I’m trying to get embedding from a sentence similarity endpoint directly.

I found some old threads providing solutions that don’t seem to work, like this one

Locally I can get the effect I want calling model.encode via sentence-transformers and grabbing ‘embeddings’ from the output.

Is it possible to use HF API for that?