# OpenRouter APIs — Sentence Transformers: paraphrase-MiniLM-L6-v2 (sentence-transformers/paraphrase-minilm-l6-v2)

Guide for calling every confirmed OpenRouter API that serves `sentence-transformers/paraphrase-minilm-l6-v2`.

Model page: https://openrouter.ai/sentence-transformers/paraphrase-minilm-l6-v2
Create an API key: https://openrouter.ai/settings/keys

## Pricing

Standard-variant prices for `sentence-transformers/paraphrase-minilm-l6-v2`, per provider, in the unit each provider bills (tokens, images, seconds of video, or characters of audio). Pay-as-you-go with no markup on the provider's price.

- DeepInfra: $0.005/M tokens

Full price table, including other variants and per-request charges: https://openrouter.ai/sentence-transformers/paraphrase-minilm-l6-v2
How OpenRouter prices requests: https://openrouter.ai/pricing

## EU in-region routing

`sentence-transformers/paraphrase-minilm-l6-v2` is not currently available through EU in-region routing.

Docs: https://openrouter.ai/docs/guides/features/in-region-routing

## Authentication

Send this header with every request:

- Authorization: Bearer $OPENROUTER_API_KEY

## Embeddings API

Create vector embeddings with `sentence-transformers/paraphrase-minilm-l6-v2` through OpenRouter's Embeddings API.

Docs: https://openrouter.ai/docs/api/api-reference/embeddings/submit-an-embedding-request

### Endpoint

POST https://openrouter.ai/api/v1/embeddings

Headers:
- Content-Type: application/json

### Request fields (sentence-transformers/paraphrase-minilm-l6-v2)

- model: string (required) — `"sentence-transformers/paraphrase-minilm-l6-v2"`
- input: string | string[] (required) — the text, or a batch of texts, to embed
- dimensions: integer (optional) — output vector size, where the model supports it
- encoding_format: "float" | "base64" (optional)

### Response

JSON with one embedding per input, in input order, plus usage:

```json
{
  "object": "list",
  "data": [{ "object": "embedding", "index": 0, "embedding": [0.0123, -0.0456] }],
  "usage": { "prompt_tokens": 8, "total_tokens": 8 }
}
```

### Examples

#### Embed text

```bash
# Note: "input" also supports batch processing with arrays: ["text1", "text2", "text3"]
        curl https://openrouter.ai/api/v1/embeddings \
          -H "Authorization: Bearer $OPENROUTER_API_KEY" \
          -H "Content-Type: application/json" \
          -d '{
            "model": "sentence-transformers/paraphrase-minilm-l6-v2",
            "input": "Your text string goes here",
            "encoding_format": "float"
          }'
```

## Errors

Failures return `{"error": {"code": <number>, "message": <string>}}` with the HTTP status:

- 400 — malformed request or an unsupported parameter
- 401 — missing or invalid API key
- 402 — insufficient credits
- 403 — spend limit reached, key disabled, or access blocked
- 404 — unknown model or no provider can serve the request
- 429 — rate limited; retry with backoff
- 502 — the operation failed upstream; failed generations are not billed

---

Canonical version of this document: https://openrouter.ai/sentence-transformers/paraphrase-minilm-l6-v2/llms.txt
