We use cookies. Cookies and browser storage keep you signed in and remember your preferences. With your permission we also measure how the site is used. You can any time. See our cookie policy.

Sentence Transformers: all-MiniLM-L6-v2

sentence-transformers/all-minilm-l6-v2
EmbeddingsInput: text1KAdded Nov 17, 2025

Try Sentence Transformers: all-MiniLM-L6-v2 now

Runs on your balance at the prices above. New accounts start with free usage.

Sign in to use thisCreate free account

Results will appear here.

5 of 5 free messages left today. A free account adds free usage and an API key.Create free accountSign inSession cost $0.00

Sentence Transformers: all-MiniLM-L6-v2 at a glance

  • Input price is 75% lower than the median of 34 Embeddings models.

About Sentence Transformers: all-MiniLM-L6-v2

Sentence Transformers: all-MiniLM-L6-v2 is an embedding model from Sentence Transformers, listed on api14 under the embeddings category. It is a compact sentence embedding model rather than a chat or text generation model, so its job is to turn text into vectors that capture meaning. If you are building semantic search, deduplication or clustering, this is the kind of model you reach for rather than a generative one.

The model takes text as input and returns embeddings as output. It maps sentences and short paragraphs into a 384-dimensional dense vector space, which is what makes it useful for semantic representation. The context window is 512 tokens, and the maximum output is 460, so it is designed for sentences and short passages rather than long documents. There is no support for sampling or generation style parameters, because the model does not generate text.

Those capabilities point to a fairly specific set of use cases. Information retrieval and semantic search are the obvious ones: embed your documents and your query, then compare vectors by similarity. Clustering and topic grouping work well because nearby vectors tend to mean similar things. The same property helps with deduplication, near-duplicate detection and building recommendation or reranking pipelines where you need a fast, small embedding step. Because the vectors are only 384 dimensions, storage and comparison stay cheap at scale.

You call it through api14's OpenAI-compatible API using the model id "sentence-transformers/all-minilm-l6-v2". Because the endpoint follows the OpenAI embeddings shape, you send your text in the input field and read the vector back from the response. The model lists no supported parameters, so there is nothing extra to tune in the request body beyond the model id and the input itself. Treat the 512 token context as a hard boundary when preparing your input.

That context limit is the main practical constraint. If your unit of meaning is longer than a short paragraph, you will need to split it into chunks before embedding, and the quality of your chunking will matter more than anything else in the pipeline. If you need a model that generates text, answers questions or follows instructions, an embeddings model is the wrong tool and you should look at a chat or completion model instead. For semantic similarity over sentences and short passages, this one fits the job directly.

How to call the Sentence Transformers: all-MiniLM-L6-v2 API

  1. Create an API key in your dashboard.
  2. Install the official openai SDK for your language.
  3. Set baseURL to https://api14.com/api/v1 and model to "sentence-transformers/all-minilm-l6-v2".
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api14.com/api/v1",
  apiKey: process.env.API14_API_KEY,
});

const result = await client.embeddings.create({
  "model": "sentence-transformers/all-minilm-l6-v2",
  "input": [
    "The quick brown fox",
    "Lorem ipsum"
  ]
});
console.log(result.data.map((d) => d.embedding.length));

Specifications

Context length
512
Max output
460
Input
text
Output
embeddings

Requests on api14 · last 7 days

10-1710-1810-1910-2010-2110-2210-23

Sentence Transformers: all-MiniLM-L6-v2: frequently asked questions

How much does the Sentence Transformers: all-MiniLM-L6-v2 API cost?
Sentence Transformers: all-MiniLM-L6-v2 costs Input $0.02 / 1M tokens. It is charged from your USD balance only for successful requests; failed requests are free.
What is the context window of Sentence Transformers: all-MiniLM-L6-v2?
Sentence Transformers: all-MiniLM-L6-v2 reads up to 512 tokens per request: prompt, history and documents together. It writes up to 460 output tokens per response.
What can Sentence Transformers: all-MiniLM-L6-v2 do?
Sentence Transformers: all-MiniLM-L6-v2 accepts text and returns embeddings.
How do I call Sentence Transformers: all-MiniLM-L6-v2 from my code?
Point any OpenAI SDK at https://api14.com/api/v1 and set the model to "sentence-transformers/all-minilm-l6-v2". No other code changes. Copy a ready example from the code panel on this page.
What are alternatives to Sentence Transformers: all-MiniLM-L6-v2?
Comparable Embeddings models at a similar price: Thenlper: GTE-Base, Intfloat: E5-Base-v2, Sentence Transformers: paraphrase-MiniLM-L6-v2. Each runs through the same API key, so switching is one string.

Sentence Transformers: all-MiniLM-L6-v2 community

New topic

This community has no topics yet. Open the first one about Sentence Transformers: all-MiniLM-L6-v2.