Thanks for your response @osanseviero but that does not work.
curl \
  -H 'Authorization: Bearer <API KEY>' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' -X POST \
  --data '{"inputs": ["this is my test"]}' \
  https://api-inference.huggingface.co/pipeline/feature-extraction/sentence-transformers/all-mpnet-base-v2
curl: (18) transfer closed with 7580 bytes remaining to read