# Return embeddings via inference api

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Freturn-embeddings-via-inference-api%2F29914%3E%5C
**Category:** 🤗Transformers\
**Created:** [January 17, 2023, 10:11pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Freturn-embeddings-via-inference-api%2F29914 "2023-01-17T22:11:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mattaylor](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/mattaylor/32/13660_2.png) [@mattaylor](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fmattaylor)%5C
**Post date:** [January 17, 2023, 10:11pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Freturn-embeddings-via-inference-api%2F29914%2F1 "2023-01-17T22:11:16Z")

</div>

Is there any way to use the public inference api to return embedding vectors for a a set of input sentances.

eg…

```auto
model = SentenceTransformer('sentence-transformers/all-MiniLM-L6-v2')
embeddings = model.encode(sentences)
print(embeddings)

```
