> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bytez.com/llms.txt
> Use this file to discover all available pages before exploring further.

# sentence-similarity

> Measure how similar two sentences are for applications like duplicate question detection, paraphrase detection, and text clustering

> **Basic usage**
>
> Send sentences to generate embeddings so you can compare their similarity
>
> ```javascript javascript theme={null}
> import Bytez from 'bytez.js';
>
> // insert your key
> const sdk = new Bytez('BYTEZ_KEY');
>
> // choose your model
> const model = sdk.model('sentence-transformers/all-MiniLM-L6-v2');
>
> // provide the model with input
> const input = "Turn this sentence into a vector";
>
> // send to the model
> const { error, output } = await model.run(input);
>
> // observe the output
> console.log({ error, output });
>
> ```
>
> ```python python theme={null}
> from bytez import Bytez
>
> # insert your key
> sdk = Bytez("BYTEZ_KEY")
>
> # choose your model
> model = sdk.model("sentence-transformers/all-MiniLM-L6-v2")
>
> # provide the model with input
> input = "Turn this sentence into a vector"
>
> # send to the model
> result = model.run(input)
>
> # observe the output
> print({"error": result.error, "output": result.output})
>
> ```
>
> ```bash http theme={null}
> curl -X POST 'https://api.bytez.com/models/v2/sentence-transformers/all-MiniLM-L6-v2' \
> -H 'Authorization: BYTEZ_KEY' \
> -H 'Content-Type: application/json' \
> --data '{
>   "text": "Turn this sentence into a vector"
> }'
> ```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.